Reducing ATCA data with AIPS and Miriad
Warning
The instructions given below are only valid for data taken with the old correlator at the ATCA. With the installation of the new broadband correlator (CABB) in early 2009 some of the reduction steps described below will not work anymore and need to be modified!
Introduction
This documents provides a very brief instruction on how spectral line mosaics observed with the Australia Telescope Compact
Array (ATCA) can be reduced with AIPS and Miriad in a combined approach. The advantage of using two different software packages is
that we can benefit from the comfortable and interactive flagging tasks of AIPS on the one hand and the convenient and easy
handling of mosaic observations in Miriad on the other hand.
To understand the different steps in the data reduction process the reader should already be familiar with the principles of interferometry and data reduction. For more information about Miriad and the individual Miriad tasks use the command 'help' in your Miriad session or consult the Miriad User's Guide. For detailed information about data reduction with AIPS, please consult the AIPS Cookbook. No responsibility is taken for the correctness or completeness of the information given on this page.
1. Read original ATCA data files into AIPS
INFILE 'DISK:FILENAME'
APARM -1,0
...
By setting APARM(1) = -1, the linear polarisations XX and YY will be relabelled as RR and LL. Since we are using AIPS for flagging only, this has no negative effect, but it is required for some AIPS tasks to work correctly.
2. Interactive flagging of bad data
GETN n
...
3. Write flagged data files to disk
GETN n
OUTFILE 'DISK:FILENAME'
...
4. Read flagged data files into Miriad
At this point, Miriad will automatically rename the polarisations into XX and YY again. A corresponding message should be displayed in the terminal window.
5. Apply flags
6. Concatenate all data files into one
7. Split data file up into individual sources
8. Check gain amplitudes
uvplt vis=<infile> axis=time,amplitude options=nobase nxy=1,1 device=/xs
9. Flag absorption lines, shadowed antennas, and bad data
uvflag vis=<infile> select="shadow(25)" flagval=flag
blflag vis=<infile> axis=time,amplitude device=/xs
where applicable. It is wise to specify a somewhat larger value of 25 m instead of the true antenna diameter of 22 m when flagging shadowed data to allow for some “safety margin”.
10. Obtain bandpass solution
(Only for primary calibrator.)
11. Check bandpass solution
gpplt vis=<primary> device=/xs yaxis=phase options=bandpass nxy=3,2
12. Copy bandpass solution to secondary calibrator
13. Obtain gain solutions
(Only for secondary (gain) calibrator.)
14. Check gain solutions
gpplt vis=<secondary> device=/xs yaxis=phase options=gains nxy=3,2
15. Apply flux calibration
(It seems like mfboot is a better alternative.)
16. Copy bandpass and gain solutions to source file
17. Apply bandpass and gain corrections
18. Subtract continuum
19. Create dirty beam and map
(Please substitute appropriate values for imsize, cell, and sup!)
20. Deconvolve dirty map
(Please substitute appropriate values for cutoff!)
21. Restore clean map
At this point we are done with the data reduction and image deconvolution. Both AIPS and Miriad can be used for the calculation of moment maps and further data analysis.
Using Miriad only
Of course it is possible to use Miriad for the entire reduction. In this case, data files can be read in with atlod in=infile1,infile2,... out=outfile options=birdie,noauto,noif. All flagging must be done with the corresponding Miriad tasks, e.g. uvflag. After flagging one can proceed with point 7 in the above list (splitting up the data file into individual sources).
Self-calibration
In principle it is possible to self-calibrate on bright continuum sources in the mosaic field after successful gain calibration. First of all, a continuum file must be created from the calibrated visibility data file, using the Miriad task uvlin with mode=chan0 (see point 17). This continuum file must be inverted, deconvolved, and restored as described in points 18–20. The following steps are then required for self-calibration:
The task demos splits the mosaic of the model created by mossdi up into individual pointings again. <continuum> is the continuum visibility data file to be calibrated, and <template> is a template for the names of the individual model files created by demos. Each file name will automatically be complemented by a number.
This will self-calibrate on the continuum sources using the models of the individual pointings created before. Note that a wildcard can be used to address all files at once. Again, <continuum> is the continuum visibility data file to be calibrated. The interval for gain solutions should be chosen such that reliable solutions can be obtained. It is also wise to calibrate phases only.
The self-calibrated data can then be inverted, deconvolved, and restored again to check the quality of the new gain solution. If required, the entire self-calibration procedure can be iterated a few times to improve the solution. In the end, the final solution must be copied to the spectral line data file with gpcopy.
Velocity conversion
Instead of using spectral channels, it is also possible to specify velocities in invert. Before doing this, however, we must apply the correct frequency-velocity relation to our uv data. First of all, we have to write the correct rest frequency into the header. For the H i line, e.g., we would define
Next, we must set the desired velocity rest frame, using the Miriad task uvredo. In the following example the local standard-of-rest frame (lsr) has been chosen, but the values barycentric and observatory are also possible:
Having applied uvredo to our uv data, we will be able to specify velocities in invert which will provide us with a data cube with correct radial velocities in the specified rest frame. This is absolutely crucial when combining data from different observing runs which would otherwise not be properly aligned in the spectral dimension.