NGCALC is a program for extracting information from .SCN-file data and then manipulating it in a great variety of ways. The data may be either interferometer-based (visibilities) or telescope-based (e.g. corrections).
This document is still far from complete, but it is hoped that it gives you somethging of a handle to start exploring on your own the many possibilities that NGCALC offers.
The extracted data are organised and manipulated in a special type of file, the .NGF file.
The .NGF file contains a collection of cuts i.e. vectors representing the values of some quantity as a function of either hour angle or frequency. (You may still come across the term plots for these cuts, - and corresponding the the .NGF file may be referred to as a plot file -, but this unfortunate terminology is being phased out.) Each cut has a header containing relevant parameters such as interferometer designation, bandwidth, center frequency, hour-angle range etc.
The cuts are organised in an index structure similar to that for sectors in a .SCN file and maps in the .WMP file. The order of the indices is
<grp>.<fld>.<chn>.<pol>.<iort>.<seq>
For each cut, the index is derived automatically from the index of the sector from which the data are taken. This is shown schematically in figure and explained below:
Derivation of .NGF-file cut indices from .SCN-file sector indices
FIGURE
.]
This diagram schematically indicates how the cut indices in the .NGF file are related to the sector indices in the .SCN file, - which in turn are derived from the hierarchical structure of the WSRT observation file.
Overview of NGCALC's parameter interface.
FIGURE
.]
See also:
figure for details of the EXTRACT operation
figure for details of the display operations
NGCALC's cut-extract interface.
FIGURE
.]
See figure for the overall interface.
NGCALC's header/data display interface.
FIGURE
.]
See figure for the overall interface.
In certain operations, sets of input cuts are combined to produce some output, e.g. some statistic as in the CALC option, or a new cut as in the MERGE option. To process such sets per interferometer, the NGF_LOOPS parameter may be used to loop over the interferometers one by one by specifying an increment for the iort index, e.g.
NGF_LOOPS = 65, ....1
If you do not know the number of interferometers, you may have all of them processed by their number as 91 (the largest possible number) or higher.
It is rather easy to make mistakes in defining operations that combine cuts. To get rid of the resultant clutter in an .NGF file, NGCALC offers the option to DELETE (sets of) cuts. The data are not actually deleted but simply disconnected from the index structure which makes them invisible; be careful: this process is irrevrsible!
Deleted data may still occupy more disk space than you want. The COPY operation may be used to create a new .NGF file from which the deleted data along with the corresponding index structures are actually removed. The indices of valid data are copied unchanged, so e.g. the group numbers in the output file may form a non-contiguous series.
Several options, such as MERGE and COMBINE, combine data from multiple input cuts to create new cuts. In such cases, NGCALC tries to assign sensible values to the output cut's header parameters, but one cannot rely blindly on them.
The TRANS and BASE operations transpose data in the three-dimensional hour-angle/baseline/frequency-channel data cube. The cuts for the transposed data mostly use the same header parameters as the original cuts and some educated guessing may be necessary to figure out what these parameters mean.
The BRIEF and FULL options can be used to inspect the composition of your file. BRIEF provides a quick survey, FULL gives details per individual cuts. Since the number of cuts in a file may be quite large, the recommended way to explore a .NGF file is to start with BRIEF and use FULL only to get details about one or a few cuts.
The first step in using NGCALC is to extract the necessary data from one or more .SCN files and store it in an .NGF file. The number of output cuts equals the number of input sectors times the numer of selected interferometers; so in cases where the former is already considerable you should think carefully about what you need.
The mapping of the .SCN-file sector indices to .NGF-file cut indices is shown schematically in a diagram figure.
The MERGE option enables you to merge a set of cuts into a new one; the NGF_LOOPS parameter may be used to execute a whole series of mergers in a single operation.
In the merge algorithm, the input cut data are sorted in hour-angle bins .25 deg wide and averaged per bin. The resulting output is stored in a contiguous sequence of points equidistant at .25 deg, long enough to hold the data; see figure.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.