EVN Data Reduction "Quick Start" Guide

Congratulations on getting EVN data! What now?

JIVE correlates all EVN observations and performs a preliminary reduction using the EVN pipeline. At this point you would have received an email from your friendly support scientist with details on how to access your data. You should also have had a look at the results from the pipeline analysis. In general the pipeline results are to be used as a guide and should not be considered the final science product. We generally recommend using the amplitude calibration table from the pipeline, and fringe-fitting, bandpass calibrating, and imaging by hand.

We recommend using AIPS to reduce EVN data as, to-date, other packages do not have the ability to fringe fit data, which is integral for non-connected element arrays. This guide is written for the simple case of a phase-referenced continuum experiment.

1. Obtain data

Download the fits files from the EVN data archive (under the 'Fitsfiles' tab), as well as the EXP.tasav.FITS file (Click the 'Pipeline' tab and then right click "AIPS calibration tables"). This file contains the extension tables that have been applied to your data, a summary of which may be found in EXP.tasav.txt.

Set up the environment variable MYDIR to avoid having to type long paths. In the directory where your data are type

(for tcsh)
setenv MYDIR `pwd`

(for bash)
export MYDIR=`pwd`

2. Start AIPS

aips

3. Load in the data

The data are loaded into AIPS using the task fitld.

This guide assumes you are using an "empty" AIPS user number. That is to say, the data you are loading in here will go into catalogue number 1.

default fitldCall the task fitld with all parameters set to default values.
datain 'MYDIR:EXP_1_1.IDI Note no trailing number after "IDI" and no closing quote.
digicor -1 This should be off for the EVN correlator.
doconcat 1 To concatanate all data together in a single file.
ncount n Where n is the number of files we are loading in
outname 'data'
go

The message server will notify you that your data are being loaded. This may take a minute. The data will have finished loading when the message server says that FITLD "Appears to have ended successfully."

AIPS Tip: Make sure you do not have a quote at the end of the file name, or else the lower case characters get changed into upper case and the file won't be found!

AIPS Tip: AIPS supports both minimum match and tab-completion.

You should inspect your data using imh, listr, dtsum, prtab, etc.

(For example default listr; getn 1; opty 'scan'; go)

4. Copy the appropriate tables to your dataset

The EXP.tasav.txt file summarises the extension tables in EXP.tasav.FITS. We generally recommend using the amplitude calibration provided by JIVE (CL2 in EXP.tasav.FITS), and we should also apply the flags from FG1. First we'll load in the extension tables.

default fitldCall the task fitld with all parameters set to default values.
datain 'MYDIR:EXP.tasav.FITS Fits file containing calibration tables used in the pipeline.
outname 'data' The 'Class' will be different...
go

These tables are copied into Catalogue number 2. You can see from the header (getn 2; imh) that there are 3 CL tables, and 1 FG table. We want to copy CL2 and FG1 to our dataset in Catalogue number 1.

default tacopCall the task tacop with all parameters set to default values.
getn 2 Get the 'tasav' catalogue.
geto 1 Copy the table to this catalogue.
inext 'cl' Extension type. 'CL' --> calibration table
inver 2 Copy CL table #2.
ncount 1 Copy over only 1 table.
go

tget tacopCall the task tacop with all parameters set as before.
inext 'fg' Extension type. 'FG' --> flag table
inver 1 Copy FG table #1.
go

AIPS Tip: Feel free to use tget instead of default.

There will now be 2 CL tables and 1 FG table associated with your uvdata (getn 1; imh).

5. Inspect and Flag

One of the (many!) nice things about VLBI is that most terrestrial RFI won't correlate. The FG#1 table that we already flags some data such as the edge-channels. Nonetheless, there are times that flagging is necessary. AIPS has a number of flagging tasks such as UVFLG, TVFLG, SPFLG and RFLAG. Use plotting tasks such as POSSM and UVPLT to determine if you wish to flag any data. You should also look at the pipeline plots (e.g. plots of amplitude and phase against frequency channel) as they will provide invaluable information about the location of bad data. It is recommended that obvious bad data is flagged from your calibrators to ensure good calibration.

6. Remove instrumental delay

You may have noticed in POSSM that not only is there a gradient in phase within each IF, the mean phases for each IF are also quite different. This is due to the independent signal paths for each IF, and must be corrected for.

In this step we will be correcting for instrumental delays, the phase slope as a function of frequency, and as such we only want data over a short time period because we do not want changes as a function of time to come into play. This is why it is important to have bright calibrators for VLBI observations! The effect of removing instrumental delays is to bring all the phases to zero, at least for the chosen timerange. To correct the instrumental delay choose a few minutes on a bright fringe-finder (FF) that all antennas observed.

default fring
getn 1
timer d1 h1 m1 s1 d2 h2 m2 s2Choose a timerange of a few mins on your FF that all ants see.
docal 1; gainu 2 gainu 0 would work here too
weightit 1 This is usually done for EVN data.
refant n Choose ant n to be large and reliable. EF is a good ref antenna
solint 5 Make this longer than the timerange to ensure we get one data point only.
dparm(9) 1 Do not fit rate.
inp
go

Look at the header (imh). FRING should have generated a solution (SN) table. You can use SNPL to look at the delay solutions.

TableContent
CL 1 Pristine calibration table (always keep)
CL 2 A-Priori calibration: amplitude, parallactic angle (CL1+SNx+SNy+..)
SN 1 Fringe Finder: instrumental delay/clocks

default snplt
getn 1
inext 'sn' Look at the SN table. There is only 1 right now so the default for inver is ok.
opty 'dela'
dotv 1
nplots 8 8 is nice because you see all IFs in two pages
inp
go

The reference antenna should display a zero delay correction. Make sure to look at the AIPS message server. Ideally there will be solutions for all IFs on all antennas.

When you are happy with the SN table, you can apply it to your CL table (CL2+SN1 = CL3). It is best to be explicit with gainver and gainuse when using CLCAL. This is because for this task, snver 0 will apply ALL SN tables.

default clcal
getn 1
gainv 2 Using CL2
gainu 3 Create CL3
snver 1 Using SN1
refant n
opcode 'CALI'
inp
go

TableContent
CL 1 Pristine calibration table (always keep)
CL 2 A-Priori calibration: amplitude, parallactic angle (CL1+SNx+SNy+..)
SN 1 Fringe Finder: instrumental delay/clocks
CL 3 CL2+SN1: Cumulative calibration

You can use SNPL to look at CL3, and use POSSM to see how the phases have been corrected.

7. Frequency and time-dependent phase, delay, and rate calibration

We have corrected for the instrumental delay. However, we now need to correct for delay and rate as a function of time.

We will fringe-fit the fringe-finder/bandpass calibrator first.

default fring
getn 1
calsour 'fringefinder''' Fringe finder
docal 1; gainu 3 gainu 0 would work here too
weightit 1
refant 1
solint 1
aparm(5) 1 Combine all IFs for improved SNR
aparm(9) 1 Turns on search (below)
dparm 1 200 50 1 0 0 1 The delay and rate windows within which to find solutions. dparm(4) comes from dtsum
search 1 3 2 If solutions fail using ant 1, try ant 3 etc ...
inp
go

Fringe-fit the phase calibrator (feel free to use tget here).

default fring
getn 1
calsour 'phasecal''' Phase calibrator
docal 1; gainu 3 gainu 0 would work here too
weightit 1
refant 1
solint t Set this to scan length to get one solution per phase cal scan
aparm(5) 1 Combine all IFs for improved SNR
aparm(9) 1 Turns on search (below)
dparm 1 200 50 1 0 0 1 The delay and rate windows within which to find solutions.
search 1 3 2 If solutions fail using ant 1, try ant 3 etc ...
inp
go

TableContent
CL 1 Pristine calibration table (always keep)
CL 2 A-Priori calibration: amplitude, parallactic angle (CL1+SNx+SNy+..)
SN 1 Fringe Finder: instrumental delay/clocks
CL 3 CL2+SN1: Cumulative calibration
SN 2 Fringe Fit/Rate (atmospheric phase/delay) for the FF
SN 3 Fringe Fit/Rate (atmospheric phase/delay) for the phase cal

You should look at SN2 and SN3 using SNPL with opty='phas', opty='dela', and opty='rate'.

8. Apply solutions to the calibration table

When you are happy with the SN tables, you can apply them to your final CL table (CL3+SN2+SN3 = CL4).

As this is a phase referencing experiment, we will apply the phase calibration from the phase calibrator to the target. We will also be applying the fringe-fitting solutions for the calibrators to the same CL table

default clcal
getn 1
calsour 'phasecal''' Phase calibrator
sour 'target''' Apply solutions to the target
gainv 3 The default would also work here.
gainu 4 The default would also work here.
snver 3 This must be set explicitly, otherwise all SN tables would be applied
interpol 'ambg' Linear interpolation but including rates to resolve phase ambiguities
opcode 'CALI' Flag uncalibrated data
refant n
inp
go

Apply the solutions for the phase calibrator to itself. (Feel free to use tget here.)

default clcal
getn 1
calsour 'phasecal''' Phase calibrator
sour 'phasecal''' Apply solutions to the phase cal
gainv 3 The default would also work here.
gainu 4 The default would also work here.
snver 3 This must be set explicitly, otherwise all SN tables would be applied
interpol 'self' Applying solutions for the calibrator to itself
opcode 'CALI'
refant n
inp
go

Apply the solutions for the fringe finder to itself. Note that different snver.(Feel free to use tget here.)

default clcal
getn 1
calsour 'fringefinder''' Fringe finder
sour 'fringefinder''' Apply solutions to the fringe finder
gainv 3 The default would also work here.
gainu 4 The default would also work here.
snver 2 This must be set explicitly. Note the different snver.
interpol 'self' Applying solutions for the calibrator to itself
opcode 'CALI'
refant n
inp
go

TableContent
CL 1 Pristine calibration table (always keep)
CL 2 A-Priori calibration: amplitude, parallactic angle (CL1+SNx+SNy+..)
SN 1 Fringe Finder: instrumental delay/clocks
CL 3 CL2+SN1: Cumulative calibration
SN 2 Fringe Fit/Rate (atmospheric phase/delay) for the FF
SN 3 Fringe Fit/Rate (atmospheric phase/delay) for the phase cal
CL 4 CL3+SN2+SN3: Total calibration

Use snplt to check your calibration tables.

9. Bandpass calibration

Bandpass calibration corrects for the response of the receiver as a function of frequency.

default bpass
getn 1
calsour 'bandpass cal''' Often the BP cal is the same as the FF
docal 1 Apply calibration (in this case CL4)
refant n
solint -1 Use whole time range.
weightit 1
inp
go

TableContent
CL 1 Pristine calibration table (always keep)
CL 2 A-Priori calibration: amplitude, parallactic angle (CL1+SNx+SNy+..)
SN 1 Fringe Finder: instrumental delay/clocks
CL 3 CL2+SN1: Cumulative calibration
SN 2 Fringe Fit/Rate (atmospheric phase/delay) for the FF
SN 3 Fringe Fit/Rate (atmospheric phase/delay) for the phase cal
CL 4 CL3+SN2+SN3: Total calibration
BP 1 Bandpass calibration

Look at the bandpass table.

default possm
getn 1
dotv 1
aparm 0, 1, 0, 2, -180, 180, 0, 2, 3aparm(8) 2 plots the bandpass table.
nplots 2
stokes 'half'
inp
go

10. Apply the calibration (Split the data)

We are now ready to apply our calibration tables to the data. We will split the data to make imaging easier, and in the process of splitting the data we will apply CL4, BP1 and FG1 to these data.

default split
getn 1
doband 1; bpver 1 Apply the bandpass table.
docal 1; gainu 4 Apply the calibration table.
flagv 1 Apply the flags.
aparm 2 1 0 Average all channels per IF.
inp
go

Take a look at the available catalogue entries now (pcat).

11. Go forth and image!

Congratulations! Your data are now calibrated! Now image and self-cal to your heart's content!