Website of Tobias Westmeier

Reducing WSRT data with AIPS in 30 steps

Introduction

WSRT near Westerbork 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

TASK 'FITLD'
INFILE 'DISK:FILE.UVF'
GO

...and so on until all files are read in.

2. Change header elements

TASK 'PUTHEAD'
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

TASK 'INDXR'
INFILE ' '
CPAR 0,0,1
FOR i=1 TO n; INS i; WAIT; GO; END

4. Make SN tables

TASK 'APCAL'
FOR i=1 TO n; INS i; WAIT; GO; END

5. Concatenate all files

TASK 'DBCON'
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

TGET 'INDXR'
GETN n
GO

7. Check the SN tables for a change in UT date

TASK 'PRTAB'
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

TASK 'TABED'
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

TASK 'TACOP'
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

TASK 'CLCAL'
INV 0
SAMP 'MWF'
BPAR 0.2
DOBT -1
DOBLANK 0
CALSOU ' '
GO

11. Check the new version 2 of the CL table

TASK 'SNPLT'
INEX 'CL'
OPTY 'AMP'
DOTV 1
NPLOT 6
GO

12. Interactive data flagging

TASK 'SPFLG'
DOCAL 1
DPAR(6)=60
DOHIS 1
GO

13. Flag spectral regions with absorption lines

TASK 'UVFLG'
TIMER 0
SOURCE 'calibrator_name',' '
ANTEN 0
BCH x1
ECH x2
REASON 'ABSORPTION'
GO

14. Create BP table

TASK 'BPASS'
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

TASK 'POSSM'
APARM(8) 2
TVINI
GO

16. Create a continuum file

TASK 'SPLAT'
OUTCL 'CONT'
DOBAND 1
APARM(1) 1
ICHANS x1 x2 1 1 ...
GO

17. Create NX table for continuum file

TGET 'INDXR'
GETN n
GO

18. Determine flux of known calibrators

TASK 'SETJY'
OPTYPE 'CALC'
INCL 'CONT'
GO

19. Check time-baseline plot

TASK 'TVFLG'
DPARM(6) 60
GO

20. Flag shadowed dishes

TGET 'UVFLG'
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

TASK 'CALIB'
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

TASK 'LISTR'
OPTYPE 'GAIN'
DPARM(1) 5
GO

23. Determine flux of secondary calibrator

TASK 'GETJY'
SOURCE 'secondary_calibrator',' '
CALSOUR 'primary_calibrator',' '
SNVER 0
GO

24. Apply external gain calibration

TGET 'CLCAL'
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

TGET 'SNPLT'
INEXT 'CL'
INVERS 3
OPTY 'AMP'
GO
OPTY 'PHAS'
GO

26. Self-calibrate on continuum sources

TASK 'IMAGR'
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
TGET 'CALIB'
CALSOU 'source_name',' '
GET2N 'cleaned_image'
DOCAL 1
GAINU 3
SNVER 7
SOLMO 'P'
CPAR 0,1
SOLIN 10
GO
TGET 'CLCAL'
CALSOU 'source_name',' '
INTERPOL 'SELF'
SNVER 7
GAINV 3
GAINU 4
GO
TGET 'IMAGR'
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

TASK 'TACOP'
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

TASK 'SPLIT'
SOURCE 'source_name',' '
STOKES 'I'
APARM 0
DOCAL 1
GAINU 4
GO

29. Subtract continuum

TASK 'UVSUB'
GETN n (SPLIT file)
IN2NAME 'cleaned_image'
GO
TASK 'UVLIN'
ICHANSEL x1 x2 1 1 ...
GO

30. Produce cleaned images

TGET 'IMAGR'
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

Status

© 2023 Tobias Westmeier
Contact | Last modified: 26 September 2023