8 ”Scan intent” Based Selection

”Scan intent” selection is based on the entries in the "OBS_MODE" column of the "STATE" sub-table, as described in the Railroad diagram format in Table 7. The main table of a Measurement Set has the "STATE_ID" column containing the row number of the "STATE" sub-table appropriate for each row in the main table. The "OBS_MODE" column of the STATE sub-table contains strings describing the observational intent. These intents are referred to as ”scan intents” and the scan-intent expressions in the MSSelection module can be used for data selection based on these intents.


Table 7: Railroad diagrams for the syntax of scan-intent expression.



Syntax of Railroad Diagram


Scan Intent expresssionPIC



8.1 Syntax

The scan-intent selection expression is a comma-separated list of specifications. Each specification can be a string (section 1.4) , an integer or an integer range (section 1.2). As in other such expressions, a range [N0,N1] can be specified as N0~N1 (see Section 1.2). String (section 1.4) can be regular expressions or patterns or quoted-strings for as-is matching (see Section 1.4).

A single scan can have multiple scan-intents represented by a comma-separated list of strings like "CALIBRATE_BANDPASS.UNSPECIFIED,CALIBRATE_AMPLI.UNSPECIFIED". Each of these comma-separated components are referred to as the scan-intent components. All string specifications in scan-intent expression are matched against each of these comma-separated components. Scans with any of the scan-intent components matching the string(s) in the scan-intent expression are selected. E.g. scanintent=⋆CAL⋆, ⋆BAND⋆ will select all scans which have the strings "CAL" or "BAND".

To allow selection based on scan-intent components, scan-intent selection specifications can also be ampersand-separated ('&') list strings. Only those scans, at least one scan-intent components of which match all the ampersand-separated components are selected. E.g. scanintent=⋆CAL⋆ & ⋆BAND⋆ will select only those scans the intent strings of which contain the strings "CAL" and "BAND". See Section 8.2 for more examples.

8.2 Examples

Table 8 shows an example-table of scan-intents. Table 9 shows a list of some scan-intent selection expressions and the corresponding list of selected scan numbers from Table 8.


Table 8: Example scan-intent table



Scan No.Scan-intent strings


0 CALIBRATE_BANDPASS, CALIBRATE_PHASE
1 CALIBRATE_BANDPASS, CALIBRATE_AMPLI
2 CALIBRATE_BANDPASS, CALIBRATE_AMPLI, CALIBRATE_PHASE
3 AMPLI_UNSPECIFIED, PHASE_UNSPECIFIED




Table 9: Examples of scan-intent selection expressions for intents shown in Table 8




Scan-intent SelectedRemarks
selection expression scans






CALI⋆ 0,1,2



⋆PHASE 0,2 Matches CALIBRATE_PHASE but
not PHASE_UNSPECIFIED



⋆UNSPEC⋆ 3



⋆AMPLI, ⋆PHASE 1,2 ⋆AMPLI matches CALIBRATE_AMPLI;
⋆PHASE matches CALIBRATE_PHASE



⋆AMP⋆ 1,2,3 ⋆AMP⋆ matches CALIBRATE_AMPLI and
AMPLI_UNSPECIFIED



⋆BAND & ⋆PHASE 0,2 ⋆BAND and ⋆PHASE are simultaneous present
for scans 0 and 2 only



AMP⋆ & ⋆PHASE⋆ 3 ⋆PHASE⋆ matches scans 0,2,3. AMP⋆ matches
only scan 3.



⋆BAND & ⋆PHASE⋆ & ⋆AMP⋆2 Only scan that matches ⋆BAND and
⋆PHASE⋆ and ⋆AMP⋆ is scan 2



⋆BAND & ⋆PHASE⋆, AMPLI⋆0,2,3 ⋆BAND & ⋆PHASE selects scans 0,2.
AMPLI⋆ selects scan 3