Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: sditerator.sel2string - Function Up: sditerator - Tool Previous: sditerator.flush - Function


sditerator.select - Function



Package dish
Module dish
Tool sditerator


Make a new sditerator by applying a selection criteria record


Synopsis
select(selection)


Description
A new sditerator is constructed by applying the indicated selection criteria record to this sditerator. The returned sditerator is an sditerator which references this sditerator. Only sdrecords which match the criteria are found in the returned sditerator. The returned sditerator may be empty. The structure of the selection criteria record follows the structure of an sdrecord. Only fields which are to be selected on need be included in the selection criteria record. Only scalar fields (strings and numeric fields) in the sdrecord can be part of the criteria. Fields which are measures or quanta records in the sdrecord can be selected if they are single valued. The values used in the selection record should be in the same units as the first sdrecord in this sditerator. For string fields, the selection criteria value for that field should be a vector of values to match during the selection. A simple wildcard can be indicated using an asterisk. For numeric fields, the selection criteria should be a 2-dimensional array of values having dimensions (2, nranges). In other words, this is a set of range pairs. Values in this sditerator for that field which fall within that range or are equal to the range endpoints are considered to match this criteria.



Arguments

selection in Selection criteria record
    Allowed: Glish record
    Default: [=]


Returns
sditerator tool


Example
   sdit := sditerator('a302_SP');
   sel := [header=[scan_number=array(0,2,3),source_name="UGC1*"]];
   sel.header.scan_number[,1] := [-1, 10];
   sel.header.scan_number[,2] := [15,15];
   sel.header.scan_number[,3] := [50,9999999];
   s2 := sdit.select(sel);

In this example, scan numbers which are less than or equal to 10 or equal to 15 or greater than or equal to 50 are selected, so long as the source name matches the one given in the example (a wild card is used here).



next up previous contents index
Next: sditerator.sel2string - Function Up: sditerator - Tool Previous: sditerator.flush - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01