3 Antenna/Baseline Selection

This expression is used to perform baseline based selections. Baseline can be specified as a pair of antenna specifications. Since antenna specification can itself be a list of antennas, the expression allows a rich selection syntax which is simple for simple selections.

ANT in the description below is a comma-separated list of antenna specifications. A baseline specification is an single ANT, ANT followed by an operator or a pair of ANT separated by an operator. A baseline expression is single baseline specification or a semi-colon separated list of baseline specifications.

The full antenna and baseline expression syntax is described in the Railroad Diagram format in Table 2 and explained in the following sections.


Table 2: Railroad diagrams for the syntax of full baseline selection expression. Note that this is also referred to as “antenna selection” expression.



Syntax of Railroad Diagram


BASELINE Expression PIC


Antenna Expression PIC
(ANT-EXPR)


Antenna/Station Spec. PIC
(ANTSPEC, STATIONSPEC)



3.1 Syntax

3.1.1 Antenna Specification

An ANT can be given as a single string (section 1.4) (literal/pattern/regular expression), single integer ID, a range (section 1.2) of integer IDs or a comma separated list of integers. For VLA-specific reasons (see Section 3.2), only for antenna specifications, integers are first converted to strings and matched against the antenna names. E.g.

The precise logic applied to the antenna specification (ANT) is as follows:

  1. If ANT is an integer index (or a list or range (section 1.2) , it is first used as a name (e.g. the index 1 is converted to a string ”1” etc.) and matched against the NAME column of ANTENNA sub-table. If no match is found, it is treated as an integer index and matched against the antenna indices.
  2. If ANT is a string which cannot be converted to an integer, it is first matched against the NAME column of the ANTENNA sub-table. If no match is found, match against the STATION column is attempted.

3.1.2 Antenna@Station Specification

A fully qualified antenna specification can also include the station name via the ANT@STATION syntax. STATION specification follows the same rules as antenna specification. When antenna or station in a ANT@STATION syntax is a comma-separated list, the list must be enclosed in a left- and right-parenthesis pair to distinguish it from a comma-separated list of ANT@STATION (i.e., "A1@S1, A2@S2, A3@S3" versus "(A1,A2,A3)@(S1,S2,S3)"). All antennas in the ANT part of the specification on any of the stations in the STATION part of the specification will be selected. The ANT part of the specification is optional and when not specified is replaced with the wild-card "⋆" (i.e. "@STATION" is equivalent to "⋆@STATION").

The two forms of specifications that are interpreted differently are:

  1. List of ANT@STATION: A1@S1, A2@S2, A3@S3,....
  2. (List of ANT)@(List of STATION): (A1, A2, A3)@(S1,S2,S3)

First form is similar to the comma-separated list of antenna specifications used to construct the baseline to be selected (see Section 3.1.3). The latter will select all members of the antenna list that are on any of the stations listed in the station list. E.g. if antenna A1 appears on stations S1 and S3, both will be selected in the second form, but only the antenna A1 on station S1 will be selected in the first form. Note that the second form of specification can itself be a member of a comma-separated list.

3.1.3 Baseline Specification

A baseline specification consists of an ANT followed by an operator or a pair of antenna specifications separated by an operator. Operator can be one, two or three ampersands ('&'):


Table 3: Table of allowed baseline selection operators and their meaning.



The operatorOperation


& Select only cross-correlation data


&& Select cross- and auto-correlation data


&&& Select only auto-correlation data



Possible forms of baseline specifications are tabulated in Table 4.


Table 4: Baseline specification syntax: ANT, ANT1 and ANT2 in the table below represent a comma-separated list of antennas names or a list of ANT@STATION specifications. ANT and STATION in ANT@STATION can themselves be comma-separated lists enclosed in braces.



Specification Meaning


ANT Select only cross-correlation baselines between all the
antennas in ANT and all other available antennas


ANT& Select only cross-correlation baselines between antennas
in ANT only


ANT1 & ANT2 Select only cross-correlation baselines between antennas
in ANT1 and ANT2


ANT&& Select cross- and auto-correlation baselines between all
the antennas in ANT only


ANT&&⋆ Select cross- and auto-correlation baselines between all
the antennas in ANT and all other available antennas


ANT1 && ANT2 Select cross- and auto-correlation baselines between
antennas in ANT1 and ANT2


ANT&&& Select only auto-correlation baselines for antennas in ANT


!ANT Excludes all baselines involving antennas in ANT. ANT can be
any of the above expressions


ANT1 ; !ANT2 ANT1 and ANT2 can be any of the above expressions. This
selects only cross-correlation baselines between all the
antennas in ANT1 and all other available antennas except
those involving antennas in ANT2.




A1@S1 Select baselines with antenna A1 on station S1 only


(A1,A2)@(S1,S2)Select baselines with antenna A1 on station S1 or S2 and
antenna A2 on station S1 or S2



Formally, baseline specification is of the form [!]ANT[<OP>[ANT]] (where the parts in square brackets are optional and <OP> can be '&', '&&' or '&&&').

3.1.4 Baseline Negation Operator

The negation operator '!' can be used to exclude a baseline specification from the final selection. The negation operator applies to the single expression only. Hence in a compound expression (collection of expressions separated by “;”), if a baseline specification is negated in one expression and included in a following expression, it will not be excluded from the selection. Note that this is a baseline negation operator and not an antenna negation operator. The negation operator applies only to the baseline specification immediately following it. E.g.,

Note that the negation operator cannot be applied to individual members of the antenna specification/antenna list. E.g. the expression "1,2,!5,8" is syntactically incorrect.

3.1.5 Baseline negation and Regular Expression negation

Since antenna names in a antenna/baseline selection can be a regular expression or a pattern, one can preceed a name, pattern or regex by “^’  ’ (the regular expression negation operator) to negate that name. Thus

      ^VLA:N⋆

means all antennas except VLA:N⋆. Note that ^VLA:N⋆ and !VLA:N⋆ are very different. The first one forms all cross-correlation baselines of the antenna in the remaining arms with all antenna (also VLA:N antenna). Thus ^VLA:N⋆ is the same as VLA:[SE]⋆. The second one has all baselines between the antenna in the remaining arms, but also autocorr between VLA:N antenna.

3.1.6 Examples

In the most common usage, an atomic ANT selects all baselines containing all the antennas in ANT. ANT& selects only baselines between the list of antennas in the antenna specification. ANT1&ANT2 selects baselines between antennas in ANT1 and ANT2 only. E.g.

Following are more examples of baseline specification using ranges and names:

The full baseline selection expression is any of the examples shown above or a semi-colon-separated list of baseline specifications. E.g.

with each elements of the semi-colon separated list being interpreted as explained above.

3.2 Integers-as-names VLA Naming Convention

Antenna naming convention for VLA is such that the antenna names are actually valid integers converted to strings. While we feel that this is indeed a bad idea and it will be best to translate the VLA antenna names to something like VLA1, VLA2 in the CASA VLA filler (or something that does reflect that its a name and not get confused with integer indexes), for now, to accommodate the VLA tradition, the following logic is used:

Just for antenna selection, a user supplied integer (or integer list) is converted to a string and matched against the antenna name. If that fails, the normal logic of using an integer as an integer and matching it with antenna index is done.

For example, if the antenna with index 17 is named ”21”, the string "21,VLA22" will expand into an antenna index list of 17,22 (assuming that the antenna named VLA22 has index 22).

If we conclude that this style of antenna selection is indeed the way we wish to go, users should be aware that the antenna selection will behave differently for telescopes other than VLA. For example, assuming that antenna with names ”21”,”17”, and ”11” have indices 1,2 and 3, for VLA only a selection string ”21,17,11” will select antenna with indices 1, 2 and 3. For other instruments where this is not the naming convention, the same selection string (”21,17,11”) will select antennas with indices 21, 17, and 11.