The user interface of this program is same as that provided by all GMRT off-line programs.
In the simplest form, when started, this program will list out all the parameters it depends upon. This will be presented to the user as list of keywords and an interactive shell will be started. From this shell, the user can set/reset any of the keywords. Typing help would give a list of commands available inside this shell and typing explain would give more detailed explaination about the program and the various keywords it understands.
The output depends on the value of the keyword fmt (short form for 'format'). This keyword takes a format which is hybrid of the implicit loops in the write statement of FORTRAN (see the FORTRAN manual) and the formatting string used by the output functions of C (see documentation on printf in C manual).
Such a format string encapsulates the fact that whatever numbers we need to extract from the visibility database will be either antenna based, interferometer based and/or a function of time and/or frequency within the given observing band. Interferometer based (or equivalently - baseline based) numbers will automatically be a function of the antenna pairs making the various baselines. One may also like to extract data for a list of antennas, baselines, frequency channels and/or various time stamps.
We therefore need four variables for time, baseline, channels and antenna. All numbers extracted will then be a function of all or some of these variables. In our format, we call them ``timestamp'', ``base'', ``chan'' and ``ant''. Since all these can take a list of values, we call them operators in our terminology.
The format string allows the user to write implicit loops. The loop indices are controlled by the operators. These operators represent a list of values and they loop over the ``body'' of the loops for each value of this list. The body is a list of parameters that the user wants, enclosed in '{' and '}' pairs. We refer to these parameters inside a "body" as the elements of the body. Each operator must be followed by a body and the elements of the body can be another operator-body pair. Hence, nested loops are possible.
Out of these four operators, the user cannot have control on the ``timestamp'' operator. Therefore, the entire format string is implicitly the body of the time operator. This means that time in the output will vary at the slowest rate.
Various elements that the syntax recognizes are listed below. Some of these are independent of any operator while others need to be part of the body of one or more operators. The operators that these elements need are also listed with them.
Elements | Operators Needed |
u,v,w | base (baseline based) |
ua,va,wa | ant (antenna based) |
re,im | base,chan |
a,p | base,chan |
ha,ist,lst | none |
delay,phs0 | ant |
ua,va,wa are the co-ordinates of the antenna in the (U,V,W) co-ordinate system in units of the wavelength of the center of the observing band. u is u1-u2 where 1 and 2 represent the two antenna which make the given baseline.
Thus, to get the output such that each line is tagged with the HA value and has the data in Real,Imag format for all channels listed for the ``chan'' operator, and for all baselines listed for the ``base'' operator, one can write
base{ha;chan{re;im};\\n}
The special element n represents the actual
character that will appear at the given position in your output (which
is a NEWLINE here). The only other special element that this
syntax currently allows is
t (TAB).
If one also wants the values of U,V,W for each baseline to appear in each line, one could write
base{ha;u;v;w;chan{re;im};\\n}
However note that the following syntax is an error
ha;u;v;w;base{chan{re;im};\\n}
This is because the elements u,v,w are a function of the baseline and they do not appear are part of the body of the base operator. If this syntax is supplied to the program, it will generate an error message to this effect.
The elements can also be qualified with a C language's printf styled format field. Hence, if one wants the HA to be written with field length of 8 characters and precision of 3 digits, one can write the above expression as
base{ha%8.3f;u;v;w;chan{re;im};\\n}
The format can be of any of the 'f','g','G','e', or 'E' type (see the documentation on printf function of C language for more details).
Various output formats can be generated by changing the order of loops and elements in this syntax. Here are some examples. Each of these will generate a table. The values in the various columns will be as given in the explanation.
base{ha;u;v;w;chan{re;im};\\n}
Column 1 will be the Hour Angle. Columns 2,3,4 will have the u,v,w values. Columns 5-2*N will be real and imaginary values for the N channels listed in the ``chan'' operator.
There will be one such row in the table for each value of the ``base'' operator.
ha;lst;\\n;base{u;v;w;chan{re;im};chan{a;p};\\n}
This format will generate a table in which rows will have variable lengths.
The first row of the table will have only HA and LST values.
Next line will have u,v,w in the first 3 columns followed by real, imaginary, amplitude and phase for all channels listed in the ``chan'' operator. There will be one such row for every value of the ``base'' operator.
ha;base{u;v;w};\\n;base{chan{re;im}};\\n
This format will also generate table which will have rows with variable lengths.
The first row will have HA,U,V,W values.
The second row will have real and imaginary values of the visibilities for all channels listed for the ``chan'' operator and for all values listed for the ``base'' operator. The values will appear as a function of frequency first and then as a function of baseline.