Tobias Westmeier

Astrophysicist & Radio Astronomer

Reducing WSRT data with Miriad

Westerbork Synthesis Radio Telescope

This documents provides a very brief instruction on how H Ⅰ 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 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 unflagged records to a new visibility file

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

4. Apply Tsys calibration

attsys vis=<infile> out=<outfile>

5. Remove outliers from 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 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 density if not known to Miriad.

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

gpcopy vis=<calibrator> out=<datafile>

9. Set calibration interval to 24 hours

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

10. Apply bandpass & 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

Create a continuum image from the visibility file:

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

Clean the continuum image:

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

Ensure that the cleaned image looks fine:

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 need to be repeated iteratively to improve the amplitude and phase solutions. For the later steps one should use the most recent model for the clean procedure. In addition, the cutoff can be slowly lowered as the model improves. In the self-calibration step the interval can also be gradually decreased down to the original sampling interval of 1 minute. In the final iteration, options=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 edges of 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>