In some observations, users might wish to process only a subset of the possible visibility data. In Miriad the visibility data to be selected are usually specified by one parameter - the select keyword. This parameter is constructed from select a number of subcommands, each subcommand selecting or rejecting visibility data which satisfies some condition. The subcommands, which can be abbreviated to uniqueness, are as follows:
time(t1,t2) - This selects visibilities observed between times t1 and t2. Times are given in UT. The second time (t2) is optional. If missing, it is assumed to be 24 hours after t1.
The time is composed of a date and `time-of-day' portions, either of which can be omitted (but not both at the same time!). When the date is omitted, then the selection matches data, for the given time-of-day, regardless of the day. This is most useful for files containing only a single day's data. When the time-of-day is omitted, then 00:00 is assumed.
The times t1 and t2 are given in the form:
yymmmdd.fff
or
yymmmdd:hh:mm:ss.s
Here yy is the year, mmm are the first three letters of the month's name, dd is the day of the month, fff is a fraction of a day, hh is the hour (24-hour clock), mm are the minutes, and ss.s are seconds and fractions of a second. The `time-of-day' portion can be abbreviated. For example, the seconds part can be omitted. Indeed (provided a date is given) the `time-of-day' portion can be totally omitted if desired.
Note that only a two-digit year is given. These two digits give a year in the century 1940 - 2040.
For example:
05jan12:12:30represents 12:30 on 12 January, 2005, whereas
98jun03.5represents midday on 3 June, 1998, and finally
04apr01is April Fools Day in the year 2004.
To give some examples:
select=time(05jan05:10:50,05jan05:17:20)will select data observed on 5th January, 2005, between 10:50 UT to 17:20 UT.
The form where no date is given:
select=time(10:50,17:20)will select data observed on any day between 10:50 and 17:20.
To give an example where only one time is given,
select=time(05jan03)will select all data observed on 3rd January, 2005. This form is only useful for a file containing several days of data.
antenna(a1,a2,...)(b1,b2...) - This selects according to the antennas and baseline. Here a1,a2,... is a list of antennas to select. The second list, b1,b2,... is optional. If present, only baselines corresponding to the antennas pair (a1,b1), (a1,b2), ..., (a2,b1), ..., etc are selected. For example, to select all visibilities using antennas 1 or 3, use
select=antenna(1,3)To select all visibilities using baselines with antennas 1 and 2, or 3 and 2, use
select=antenna(1,3)(2)uvrange(uvmin,uvmax) - This selects visibilities whose u-v radius is in the range uvmin to uvmax. If only one value is given, then uvmin is taken as zero. The units of uvmin and uvmax are kilowavelengths. uvnrange(uvmin,uvmax) - This is the same as the uvrange subcommand, except that the units are nanoseconds.
visibility(n1,n2) - This selects visibilities numbered n1 to n2 inclusive.
increment(inc) - This selects only every inc'th visibility.
ra(hh:mm:ss1,hh:mm:ss2) - Select visibility data within a particular range of right ascension. Right ascension is given in hh:mm:ss format, or as decimal hours.
dec(dd:mm:ss1,dd:mm:ss2) - Select visibility data within a particular range of declination. Declination is given in dd:mm:ss format, or as decimal degrees.
dra(p1,p2) - For data files containing several pointing centers, this selects visibilities whose pointing center is offset, in RA, from the main pointing center, by between p1 and p2 arcseconds.
ddec(p1,p2) - For data files containing several pointing centers, this selects visibilities whose pointing center is offset, in DEC, from the main pointing center, by between p1 and p2 arcseconds.
pointing(p1,p2) - For data files containing rms pointing error data, this selects visibilities with the rms pointing error in the range p1 to p2 arcseconds. If only one number is given, p1 is taken as 0. The rms pointing error of a visibility is taken as the maximum of the rms azimuth and rms elevation pointing errors of the two antennas.
source(srcnam1,srcnam2,...) - For data files which contain multiple sources, this selects data according to source name. Several source names can be given, separated by commas. The source name can include an asterisk (), which acts as a wildcard.
frequency(loval,hival) - This selects data according to the sky frequency of the first channel. The loval and hival values give the permissible range, in GHz, of frequencies to accept. If only a single value is given, then this is used as a mid-frequency, and frequencies within a tolerance of 1% are accepted.
amplitude(x,y) - Any correlation, where the amplitude is between x and y, is processed. If only one value is given, it is assumed to be x, and y is assumed to be infinity.
window(w1,w2,...) - This can be used when the dataset contains multiple spectral windows (or chunks in SMA terminology).
shadow(d) - This selects data that would be shadowed by an antenna of diameter d meters. If d is zero, then the actual diameter of the antennas (if known) is used. If some data is shadowed, it is advisable to use an antenna diameter value greater than the physical antenna size (e.g. 20% larger).
auto - This selects auto-correlation data only. So the negated form (-auto) selects cross-correlation data only.
on - This is intended for use with beam switched single dish observations, and selects based on the `on' variable in the visibility dataset. The `on' variable indicates whether the telescope is pointing on or off source.
bin(n1,n2) - This selects visibilities whose pulsar bin number is in the range n1 to n2 inclusive. The current version of SMA software does not support it.
or - This is discussed below.
As noted before, all subcommand names can be abbreviated to the minimum number of characters needed to keep them unambiguous (minimum match).
Each subcommand can
be prefixed with a plus or minus sign (+
or
-
). A plus sign means to select the data given by the following
subcommand, whereas a minus sign means to discard the data. If neither
a plus nor a minus sign is present, a plus sign is assumed. For example
select=uvrange(0,10)
means to select all visibilities between 0 and 10 kilowavelengths, whereas
select=-uvrange(0,10)
selects all data except visibilities between 0 and 10 kilowavelengths.
Several subcommands can be combined on the same line, separated by commas. When combining several subcommands of different types, the visibility must be selected by all the subcommands to be accepted (a logical AND). When combining several subcommands of the same type, then the visibility is accepted if it is selected after sequentially examining each of the subcommands (a logical OR). For example:
select=uvrange(0,10),uvrange(20,30)
selects data with a u-v radius in the intervals 0 to 10 kilowavelengths as well as 20 to 30 kilowavelengths. The following uses a `select then discard' approach to selecting the same u-v ranges as above:
select=uvrange(0,30),-uvrange(10,20)
The following selects the same u-v ranges, but only for the baseline between antennas 1 and 3.
select=uvrange(0,10),uvrange(20,30),antennae(1)(3)
The following selects all baselines, with the exception of 1-2, 5-7 and 6-7:
select=-antennae(1)(2),-antennae(5,6)(7)Another way of combining subcommands, is with the or subcommand. This allows you to OR together two `clauses' of selection commands. For example, to select spectral windows 1 and 2 for the times 0:00 to 1:00, and spectral windows 4 and 5 for times 2:00 to 3:00, use:
select=time(0:00,1:00),window(1,2),or time(2:00,3:00),window(4,5)
By combining the various subcommands and the or subcommand, quite
complex
selection criteria can be developed. For complex selections, an
@
file may be preferred.
For example, consider a file, select.data, containing the text:
time(1:00,2:00),window(1,2),or time(2:00,3:00),window(1,2),-uvrange(50,100),-antennae(1)(3), or time(3:00,4:00),window(1,2,3,4)
Then
select=@select.datawill use windows 1 and 2 for time 1:00 to 2:00, and windows 1, 2, 3 and 4 for times 3:00 to 4:00. For time 2:00 to 3:00, it uses windows 1 and 2, but omits data for baseline 1-3 which has a u-v range of 50 to 100 kilowavelengths.
There are a few limitations on the use of amplitude, polarization and window selection. Some of these limitations are mentioned in following sections, whereas others are not. Few of these limitations affect normal practice, and the selection software will inform you if there is a problem.
A Miriad visibility dataset can contain simultaneous observations at multiple spectral bands, or spectral windows. These are called `IF-bands' in AIPS. When there are multiple spectral windows, channels are still numbered from 1 to N, where channel 1 is the first channel of the first spectral window, and channel N is the last channel of the last spectral window. That is, channel numbering takes no regard of spectral window boundaries.
When there are multiple spectral windows, it is often convenient to be able
to select based on the spectral window, rather than a channel range. This is
achieved with select=window
, which selects data from a set of
spectral windows. The general form is
select=window(w1,w2,...)where w1, w2, etc, are spectral window numbers. For example, selecting the data from spectral windows 1, 2 and 3 would be achieved with
select=window(1,2,3)
Spectral window selection and velocity/felocity linetypes are quite complementary. The different spectral windows might correspond to different spectral lines with different rest frequencies, and so it is desirable to select only a subset of spectral windows (those corresponding to a given spectral line) in forming the output velocity channels.
Spectral window selection is not particularly complementary to
channel linetype processing - both select a range of input channels.
When line=channel and select=window are used together, the
total apparent number of input channels is equal to the number of channels
in the selected spectral windows, and the start channel number of the
line
parameter is relative to the first selected spectral
window. For example, if there are multiple spectral windows, then
select=window(2)
line=channel,1
would select just the first channel of the second spectral window. Similarly
select=window(2)would select 10 channels, being every second channel starting at the 8th channel of the second spectral window.
line=channel,10,8,1,2
There are some restrictions on the use of spectral window selection.
select=time(0:00,1:00),window(1,2),or time(0:00,2:00),window(3,4)Here data in the times 0:00 to 1:00 could have been selected by either of the two clauses. There is no guarantee as to which of the two window subcommands will be used during this time interval.
Having no distinction between single- and multi-source files has the advantage that all visibility tasks can manipulate any visibility dataset. However manipulating a dataset with, say, several sources can require more care. For example, it rarely makes sense to make an image using data from several sources. Generally the user is given reasonable flexibility to perform whatever she/he deems appropriate - but this has some disadvantages. For example, consider determining calibration for an observation where the calibrator (a point source) and the program source are within the one dataset. In deriving the antenna gains, one would want to select only the data from the calibrator, whereas when imaging one would select only the data from the program source. The visibility selection mechanism handles this situation. But to forget to select the appropriate data (calibrating with data including the program source, or imaging including the calibrator) would result in a mess.
The selection criteria most appropriate for datasets containing multiple sources, frequencies and mosaiced pointing centers are source, frequency, window, ra, dec, dra and ddec.
Other examples of using the select
keyword are given below:
select=window(2) % Select only data from the 2nd IF select=freq(4.74) % Select data where the frequency of the first channel is 4.74 GHz ($\pm 1$\%) select=ra(05:30,06:00) % Select visibilities with RA between 5:50 and 6:00 hours. select=dra(0),ddec(0) % Select data from only the central pointing (delta RA and DEC of 0) of a mosaiced observation. select=source(vela) 5 Take data for source vela only select=window(2),freq(4.74)% Select data from the 2nd IF where its frequency is 4.74 GHz.