Website of Tobias Westmeier

Reducing WSRT data with Miriad

Introduction

WSRT near Westerbork This documents provides a very brief instruction on how H i spectral line data observed with the Westerbork Synthesis Radio Telescope (WSRT) can be reduced using Miriad. To understand the different steps in the 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. No responsibility is assumed for the correctness or completeness of the information provided on this page.

1. Read in the data files

ivcFits in=<infile> out=<outfile> op=uvin velocity=lsr

2. Flagging of bad data

uvflag vis=<infile> "select=auto" flagval=flag
uvflag vis=<infile> "select=shadow(27)" flagval=flag
...

3. Extract the unflagged records to a new uv file

uvcat vis=<infile> out=<outfile> options=unflagged

4. Apply Tsys calibration

attsys vis=<infile> out=<outfile>

5. Remove outliers in the visibility data

tvclip vis=<infile> line=channel,<number>,<start>,<width>,<step> taver=10 clip=5 options=notv,nopixel,nochannel commands=diff,clip

6. Add rest frequency to the header

puthd in=<infile>/restfreq value=1.420405752 type=double

7. Obtain bandpass and gain solutions

mfcal vis=<infile> interval=10000 edge=x1,x2 [flux=<flux/Jy>]

(Only for calibrators! Specify flux if not known to Miriad!)

8. Copy the gain and bandpass corrections from one (good) calibrator to all data files

gpcopy vis=<calibrator> out=<datafile>

9. Set the calibration interval to 24 hours

puthd in=<datafile>/interval value=1.0 type=double

10. Apply bandpass and gain corrections to all data files

uvcat vis=<infile> out=<outfile>

11. Extract continuum

uvlin vis=<datafile> out=<continuumfile> chans=x1,x2,x3,x4,... mode=chan0 order=2

12. Perform self-calibration

Make a map from the uv file:

invert vis=<continuum> map=<output_map> beam=<output_beam> imsize=<size/px> cell=<size/arcsec> options=double

Clean this map:

clean map=<input_map> beam=<input_beam> out=<output_model> cutoff=<cutoff/Jy> niters=100000

Check if the cleaned map looks okay:

restor model=<input_model> beam=<input_beam> map=<input_map> out=<output_map>

If yes, self-calibrate:

selfcal vis=<continuum> model=<clean_model> interval=5 options=phase refant=9

These four steps have to be repeated iteratively to improve the complex gain solutions. For the later steps one should use the latest model for the clean procedure. In addition, the cutoff can slowly be decreased as the model improves. In the self-calibration step the interval can also be decreased down to the original data interval of 1 minute. In the last iteration option=amplitude should be selected to calibrate both the amplitude and phase of the gain.

13. Copy gain solutions to line data

gpcopy vis=<self-calibrated_continuum> out=<line_data>

14. Apply gain solutions

uvcat vis=<input_line_data> out=<output_line_data>

15. Subtract continuum from line data

uvlin vis=<input_line_data> out=<output_line_data> chans=x1,x2,... order=2

16. Cut off the edges of the spectra

uvaver vis=<infile> out=<outfile> line=channel,<number>,<start>,<width>,<step>

17. Make image cube

invert vis=<input_line_data> map=<output_map> beam=<output_beam> imsize=<size/px> cell=<size/arcsec> options=double line=velocity,<number>,<start>,<width>,<step> robust=<robustness> fwhm=<taper/arcsec>

18. Clean & restore image cube

clean map=<input_map> beam=<input_beam> out=<output_model> cutoff=<value> niters=100000 [region=@region]
restor model=<input_model> beam=<input_beam> map=<input_map> out=<output_file>

Alternatively, the maximum entropy method can be used:

maxen map=<input_map> beam=<input_beam> out=<output_model> niters=150 rms=<value> flux=<value> [region=@region]
restor model=<input_model> beam=<input_beam> map=<input_map> out=<output_file>

Status

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