Reducing WSRT data with AIPS in 30 steps
Introduction
The following document provides a short instruction on the reduction of synthesis observations with the WSRT using AIPS. The reader should already be familiar with the concepts of interferometry and with the use of AIPS. The aim of the instructions below is to provide a check list of reduction steps to be taken and of the important parameters to be set in each task. The parameters given for each task need not be complete. No responsibility is assumed for the correctness of the information provided on this page. If you are uncertain about the impact of a task or parameter, you should use the commands HELP or EXPLAIN to receive additional help. Please consult the AIPS Cookbook for detailed information about data reduction with AIPS (and various Banana recipes).
1. Copy uv data to disk
INFILE 'DISK:FILE.UVF'
GO
...and so on until all files are read in.
2. Change header elements
KEYWORD 'SORTORD'
KEYSTR 'TB'
FOR i=1 TO n; INS i; PUTH; END
KEYWORD 'CRVAL2'
KEYVAL -1,0
FOR i=1 TO n; INS i; PUTH; END
3. Make NX and basic CL tables
INFILE ' '
CPAR 0,0,1
FOR i=1 TO n; INS i; WAIT; GO; END
4. Make SN tables
FOR i=1 TO n; INS i; WAIT; GO; END
5. Concatenate all files
DOARR 1
GETN n
GET2N m
GO
...and so on until all files are concatenated in one final data file.
6. Make NX and CL tables for concatenated file
GETN n
GO
7. Check the SN tables for a change in UT date
INEX 'SN'
DOHMS 1
GETN 1
GO
...and so on for all initial files.
8. Add 1 to all SN tables which are completely on a new day
OPTYPE 'ADD'
APAR 1,0,0,2
KEYV 1,0
INEXT 'SN'
INV 1
OUTV 1
GETN n
GETON n
GO
...and so on for all files n which are completely on a new UT day.
9. Copy additional SN tables to concatenated file
KEYW ' '
KEYV 0
KEYS ' '
INEX 'SN'
INV 1
OUTV 0
NCOUNT 1
FOR i=2 TO n; INS i; WAIT; GO; END
10. Smooth, merge, and apply SN tables for Tsys calibration
INV 0
SAMP 'MWF'
BPAR 0.2
DOBT -1
DOBLANK 0
CALSOU ' '
GO
11. Check the new version 2 of the CL table
INEX 'CL'
OPTY 'AMP'
DOTV 1
NPLOT 6
GO
12. Interactive data flagging
DOCAL 1
DPAR(6)=60
DOHIS 1
GO
13. Flag spectral regions with absorption lines
TIMER 0
SOURCE 'calibrator_name',' '
ANTEN 0
BCH x1
ECH x2
REASON 'ABSORPTION'
GO
14. Create BP table
CALSOU calibrator_name,' '
DOCAL -1
BPASSPRM(5) 0 (or ±1, type 'explain bpass' for more information)
BPASSPRM(9) 1
BPASSPRM(10) 3
GO
15. Plot and check the bandpass solution
APARM(8) 2
TVINI
GO
16. Create a continuum file
OUTCL 'CONT'
DOBAND 1
APARM(1) 1
ICHANS x1 x2 1 1 ...
GO
17. Create NX table for continuum file
GETN n
GO
18. Determine flux of known calibrators
OPTYPE 'CALC'
INCL 'CONT'
GO
19. Check time-baseline plot
DPARM(6) 60
GO
20. Flag shadowed dishes
SOUR ' '
BCH 0; ECH 0
ANTEN x,0
TIMER d1,h1,m1,s1,d2,h2,m3,s2
REASON 'SHADOWING'
GO
This has to be done for all shadowed antennas and for both CONT and LINE data files!
21. Perform external gain calibration
CALSOU 'calibrator_1','calibrator_2'
DOCAL 1
GAINU 2
SOLINT 5
CPAR 0
SOLMO 'A&P'
REFANT 9
SNVER 6
INCL 'CONT'
GO
22. Check amplitude and phase for continuity
OPTYPE 'GAIN'
DPARM(1) 5
GO
23. Determine flux of secondary calibrator
SOURCE 'secondary_calibrator',' '
CALSOUR 'primary_calibrator',' '
SNVER 0
GO
24. Apply external gain calibration
INTER '2PT'
SAMP ' '
BPAR 0
CALSOU 'calibrator_1','calibrator_2'
SOURCE ' '
SNVER 6
GAINV 2
GAINU 3
REFANT 9
GO
25. Check external gain calibration
INEXT 'CL'
INVERS 3
OPTY 'AMP'
GO
OPTY 'PHAS'
GO
26. Self-calibrate on continuum sources
SOURCE 'source_name',' '
CELLS 4
IMSI 2048
BCH 0; ECH 0
DOCAL 1
GAINU 3
IMAGRPRM 0
IMAGRPRM(8) 1E-5
IMAGRPRM(9) 5
OUTS 1
OBOXFILE 'disk:filename.cbox'
TVINI
GO
CALSOU 'source_name',' '
GET2N 'cleaned_image'
DOCAL 1
GAINU 3
SNVER 7
SOLMO 'P'
CPAR 0,1
SOLIN 10
GO
CALSOU 'source_name',' '
INTERPOL 'SELF'
SNVER 7
GAINV 3
GAINU 4
GO
GAINU 4
BOXFILE OBOXFILE
GO
...
Repeat step 26 several times to improve the gain calibration iteratively. For the final run you should choose the solution mode 'A&P' (amplitude and phase) in CALIB, and you should be able to choose a smaller solution interval of down to 1 or 2 minutes as your gain solution improves.
27. Copy CL tables 3 and 4 to your LINE data
GETN n (CONT file)
GETON m (LINE file)
INEXT 'CL'
INVER 3
GO
INVER 4
GO
28. Extract source from line data and apply calibration
SOURCE 'source_name',' '
STOKES 'I'
APARM 0
DOCAL 1
GAINU 4
GO
29. Subtract continuum
GETN n (SPLIT file)
IN2NAME 'cleaned_image'
GO
ICHANSEL x1 x2 1 1 ...
GO
30. Produce cleaned images
DOCAL 0
CELLS <cell size in arc sec>
IMSIZ <image size in pixels>
NITER 100000
OBOXFILE 'disk:filename.cbox'
TVINI
IMAGRPRM 0
IMAGRPRM(6) 5
IMAGRPRM(7) 5
IMAGRPRM(8) 0.00005
UVTAP 1.25
BCH x1
ECH x2
NCHAV 6
CHINC 3
GO