Guide to VLBA Astrometry Tutorial
Please note before you start:
- This tutorial is specifically for the 14th Synthesis Imaging Workshop. You must use the account which is assigned to your computer or AIPS will not work. The data is in /var/nrao/vlba:
- BL118.GEO.FITS (0.1 GB): data from the geodetic blocks. These are observations of many calibrators around the sky.
- BL118.TARGET.CAL.FITS (0.7 GB): calibrated phase referenced data set that includes the target.
- TTAUSB.IMAGE.FITS (1 MB): Image made from BL118.TARGET.CAL.FITS data, so no geodetic calibration.
- Details on what you are doing and why can be found in AIPS Memo 110: Strategy for Removing Tropospheric and Clock Errors using DELZN.
In short, to obtain precise positions and
good image quality with phase referencing in VLBI, two things are needed; a close
calibrator to the target source to minimize atmospheric differences between the target and calibrator and a good correlator model.
The VLBA correlator uses a model for the troposphere
computed from seasonal models as well as the best estimates
of the clocks, positions of each antenna and earth orientation parameters.
This major source of error produces a systematic phase
difference between the calibrator and target which limits the target
positional accuracy and image quality. The troposphere model error,
however, can be estimated by observing about ten calibrators over the
sky over a 30-minute period, and then calculated the erroneous delay. So with
this tutorial you will:
- Calibrate the geodetic style data through instrumental delay removal.
- Compute the MBD. The MBD is a function of a variable clock delay, and a troposphere term (zenith path delay) which has a well-defined function of elevation (called a mapping function), times an unknown constant.
- Use the AIPS task DELZN to fit the MBD and calculate the clock and zenith path delay error.
- Apply these corrections to the dataset that includes the target.
- Image the target and see an improvement over not doing the geodetic calibration.
- Also I am only giving the important inputs to task. The other inputs should be default. An easy way to set all the inputs to the default in a task is to type "default taskname".
- If you want to calibrate the target dataset VLBA data you can follow Appendix C. in the AIPS Cookbook.
- This is an observation of young star TTau Sb, which is part of the Taurus star forming region and was one of the observations that led to a 0.4% distance to that star. The sources in the phase referenced target dataset are as follows:
- TTauSb - target
- J0428+1732 - phase calibrator
- J0431+1731 - check source
- This data was published by Loinard et. al.
- For a comprehensive overview of AIPS see the AIPS COOKBOOK, especially Chapter 3:Basic AIPS Utilities and Chapter 12:AIPS for the More Sophisticated User for the basics. Chapter 9:Reducing VLBI Data in AIPS is the chapter explaining VLBI data reduction, but it is rather overwhelming so Appendix C:A Step-by-Step Recipe for VLBA Data Calibration in AIPS is recommended as a first step. However, below I summarize some useful commands (in parenthesis are the short form of the command):
- getname (getn) catalog #: get the name of catalog # and put in INNAME, INCLASS and INSEQ. Other similar: geton (get outname); get2n (get in2name); get3n (get in3name) etc..
- input (inp) taskname: show the inputs of taskname.
- tget taskname: get a task and fill in the inputs of the last time the task was run.
- ucat (uc): list uvdata catalog.
- mcat (mc): list map catalog.
- tvlod (tvlo): load an map onto the TV.
- tvinit (tvin): initialize and clear TV.
- imhead (imh): Print the file header (this can be used on both uv data and images despite the name). This will list informative things like the date of observation and the number and types of tables attached to the data.
Instructions for reducing the data
- Load the data with FITLD
default 'fitld'
clint 0.25➜ set CL table interval to 15 seconds.
➜ run once for each dataset:
outcl 'geo'➜ set outclass to GEO so you know what file you are working with.
datain '/var/nrao/vlba/BL118.GEO.FITS➜ this is not a typo, you must leave off the close ' or AIPS will capitalize the everything within the ' ' and you will get an error because FITLD will not be able to find the directory.
inp
go
outcl 'target'➜ set outclass to TARGET so you know what file you are working with.
datain '/var/nrao/vlba/BL118.TARGET.CAL.FITS➜ again remember to leave off the close '.
inp
go
outcl ''➜ reset outclass, image file will load in with appropriate name.
datain '/var/nrao/vlba/TTAUSB.IMAGE.FITS ➜ again remember to leave off the close '.
inp
go - Load in the VLBA data reduction procedures: see EXPLAIN VLBAUTIL for full
description of procedures. Procedures are run by just typing their name, rather than using "go".
run vlbautil
- If you get a BLEW CORE or other similar error message, you have filled your procedure memory (VLBAUTIL is very large and loading it three times will do this). To fix it type restore 0 then reload VLBAUTIL
- Fix ionosphere contribution to the dispersive delay by running VLBATECR.
default vlbatecr
getn GEO file
inp
vlbatecr ➜ to run VLBATECR - Fix earth orientation parameters by running VLBAEOPS.
default vlbaeops
getn GEO file
inp
vlbaeops - Fix parallactic angle by running VLBAPANG.
default vlbapang
getn GEO file
inp
vlbapang - Perform amplitude calibration by running VLBACALA.
default vlbacala
getn GEO file
inp
vlbacala - Find scan with good fringes on all baselines by running POSSM.
default possm
getn GEO file
baseline 9 0 ➜ to plot all baseline to one antenna
docal 1; gainuse 0 ➜ calibrate data with highest CL table.
aparm(9) 3➜ plot all IFs and polarizations together.
nplot 9➜ plot 9 baselines per page (i.e., all the baselines to one antenna).
solint -1➜ plot one scan at a time.
dotv 1➜ plot to the TV.
inp
go
- Use pulse cals to remove instrumental delay by running VLBAPCOR.
default vlbapcor
getn GEO file
calsour '0149+370''➜ strong source.
timer 0 5 0 0 0 5 3 ➜ scan with good fringes we found in POSSM plots.
refant 9➜ choose reference antenna from in the middle of array, PT (antenna 9) is a good choice.
gainu 0➜ apply highest CL table.
inp
vlbapcor
At this point you should check on the calibration:- First check you have no failed/missing solutions. PCCOR (which VLBAPCOR runs) will tell you if there are any antennas "missing" pulse cals. If this is the case you must find another scan that has pulse cals for all the antennas. If this is impossible there is a way to run VLBAPCOR so it will do a manual phase cal on the antennas that have missing pulse cals , see the VLBAPCOR help file.
- check solutions in POSSM.
tget possm➜ to "get" all the inputs from the last run.
aparm 0, 1, 0, 0, -180, 180, 0, 0, 3➜ set a fixed scale of -180 to 180 degrees for phase, and plot all IFs and polarizations together.
inp
go
There may still be phase jumps between the IFs but that is because they are widely spaced in frequency. The overall phase slope across the IFs left over after the calibration is the MBD and is caused by clock and atmospheric errors. You will also note that sometimes the IF#2 on MK looks bad, also sometimes the fringes to MK and SC are weak. MK (Mauna Kea, Hawaii) and SC (St. Croix, US Virgin Islands) have the longest baselines, so those particular sources are being resolved out on these long baselines. The occasionally bad IF#2 on MK will probably not be a problem, but we may get fewer or more noisy solutions to MK and SC.
- Determine the MBD with FRING.
default fring
getn GEO file
refant 9
aparm(5) 1➜ solve for MBD.
docal 1; gainu 7➜ calibrate data with highest CL table. Again, do an imh here to make sure the highest CL table is really 7.
inp
go
- Check MBD with SNPLT.
default snplt
getn GEO file
inext 'sn'
nplots 8
dotv 1
opty 'mdel'➜ plot MBD.
xaxis 2➜ plot verses elevation.
tvin➜ clear TV.
go
It is important that the MBD be correct because the fitting in DELZN can easily go wonky. Note that most MBD are smaller than a ns. Large ones are probably wrong and should be clipped. You should note some big delays for LA, MK, NL, OV and SC. The |MBD| should increase with lowering elevation. Here the high LA, NL, OV and MK MBD look bad, but the SC MBD look O.K., because they occur at very low elevations. - Edit the MBD with TABED.
default tabed
getn GEO file
inext 'sn'➜ edit SN table produced by FRING.
invers 4;outvers 5➜ look in SN#4; produce SN#5
opty 'clip'➜ flag row when values out of range.
aparm 9 0➜ check column 9 which contains the MBD.
keyval -5e-9, 5e-9➜ flag entries outside ±5 nsec.
inp
go
Check in SNPLT (tget snplt;go) that all the bad points are clipped. One bad NL (ante# 7) point remains, use PRTAB (default prtab; getn GEO file; inext 'sn'; invers 0; docrt 73; box 1 4 9; to find it, take note of the row number. Then use a TABED to delete that row:
tget tabed
invers 5; outvers 5➜ delete rows in situ from SN table from last run of TABED
bcount 27; ecount 27➜ bad MBD is in row 27.
opty 'DELE'➜ delete row(s) specified from bcount to ecount.
aparm 9 0➜ TABED insists on a column even though for opty='DELE' it doesn't really need one.
keyval 0➜ since tget was used need to reset some inputs that were set in last run of TABED.
inp
go
- Solve for zenith and clock delays with DELZN.
default delzn
getn GEO file
snver 5➜ SN table with edited MBD
gainv 7➜ CL table to copy and correct.
aparm 0 3 2 1 1➜ plot zenith atmos. delay; use 3 polynomial terms to fit atmosphere; use 2 polynomial terms to fit clock; create CL table; correct both atmosphere and clocks.
opty 'mdel'➜ fit MBD.
outfi 'FITS:delzn.clor➜ file to read in with CLCOR; note if you leave of the closing ' the outfi retains the case.
dotv -1➜ don't plot to TV make PL files.
inp
go
Now we transfer these solutions to the target dataset.
This is where it gets a little complicated (although not much). Now we must apply the solutions to the data with the target in it, with all the calibration except the final fringe fit. The calibrated data you have has the final fringe fit in it, so we can compare the DELZNed and non-DELZNed data. So use "imh" on the TARGET data to see how many CL tables there are. We want to apply the DELZN solution to the CL table immediately before the final fringe fit. Look in my text aips log, and see the CL table before the final fring fit is #7 (and #8 contains the final fringe fit). So we will apply the DELZN corrections to CL table #7.
- Apply the zenith and clock delay correction with CLCOR.
default clcor
getn TARGET file
opco 'atmo'➜ read in a file of atmospheric and clock delay corrections and apply them to the given CL table.
clcorprm 1 0➜ correct both the atmosphere and clocks.
gainv 7; gainu 0➜ input CL#7; create a new CL table.
infile 'FITS:delzn.clor➜ file with corrections.
inp
go - Do global fringe fit with FRING.
default fring
getn TARGET file
calsour '-ttausb''➜ find solutions for all sources except ttausb (too weak, and need phase referencing for astrometry).
docal 1; gainuse 9➜ apply CL table out of CLCOR.
refant 9➜ reference antenna PT.
aparm(9) 1➜ do a extended baseline search.
search 9 4 5 2 1 3 7 8➜ search these possible reference antennas in this order (PT, KP, LA, FD, BR, HN, NL, OV).
inp
go - Interpolate the fringe solutions, and apply calibration from phase calibrator (J0428+1732) to target (ttausb) with CLCAL.
default clcal
getn TARGET file
sour 'ttausb''➜ target.
calsour 'J0428+1732''➜ phase calibrator.
interpol '2pt'➜ 2PT interpolation.
snver 5; gainv 9; gainu 10➜ apply SN#5 to CL#9 and produce CL#10.
refant 9➜ reference PT.
inp
go
sour 'J0431+1731''➜ also phase reference check source (J0431+1731) to phase reference source.
go
sour calsour➜ now calibrate phase reference source.
go - Make single source data sets with SPLIT. I like to work with single source files, its less confusing, especially when self-caling.
default split
getn TARGET file
docal 1; gainu 10➜ calibrate the date with CL table out of CLCAL.
aparm 2 0 0 1 1 1➜ average frequencies in IFs, but don't average IFs; 0; 0; calibrate weights; pass cross and autocorrelations; add full source name to header.
outcl 'delzn'➜ use outclass DELZN so we know these SPLIT files are different than ones that might exist.
inp
go - Image with IMAGR.
default imagr
getn SPLIT file
cell 0.00025; imsi 512➜ use pixel size of 0.25 mas; image size of 512x512 pixels.
niter 1000➜ use 1000 clean iterations.
dotv 1➜ do interactive clean.
go
getn non-DELZNed image
tblc 276 150; ttrc 376 249 ➜ set bottom left corner and top right corner of box to display.
pixange -3.00E-04 0.001 ➜ set the range of image intensity.
tvall➜ load the image on the TV; click in the middle of the image and fit "b" a couple times, this will expend the image, then hit "d".
tvps➜ use psuedocolor; hit "d" in the TV immediately.
getn DELZNed image
tvch 2 ➜ set tvchannel to 2.
tvlo➜ load image to 2nd channel of TV, you will not see it yet.
tvbl ➜ blink between two images, because you set pixrange they are on the same scale and the improvement should be pretty obvious.
tvch 1 ➜ set tvchannel to 1. I always to this immediately because if you don't, you will forget it is set to 2 and you will wonder why nothing is displaying to your TV.