Guide to Spectral Line VLBA Tutorial

The VLBA astrometry tutorial can be found here.

Please note before you start:

Instructions for reducing the data

  1. Load the data with FITLD
    default 'fitld'
    clint 0.25
    ➜ set CL table interval to 15 seconds.
    ➜ run once for each dataset:
    datain '/var/nrao/vlba/BM235G.LORES➜ 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
    datain '/var/nrao/vlba/BM235G.HIRES
    ➜ again remember to leave off the close '.
    go

  2. 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
    • IMPORTANT: For steps 3-12 use the LORES dataset!

  3. Fix ionosphere contribution to the dispersive delay by running VLBATECR.
    default vlbatecr
    getn LORES file
    inp
    vlbatecr
    ➜ to run VLBATECR

  4. Fix earth orientation parameters by running VLBAEOPS.
    default vlbaeops
    getn LORES file
    inp
    vlbaeops

  5. Fix parallactic angle by running VLBAPANG.
    default vlbapang
    getn LORES file
    inp
    vlbapang

  6. Perform amplitude calibration by running VLBACALA.
    default vlbacala
    getn LORES file
    inp
    vlbacala

  7. Edit the data using EDITR on each source separately.
    default editr
    getn LORES file
    docal 1; gainuse 0 ➜ calibrate data with highest CL table.
    crowded 1
    ➜ to plot all polarization and IFs on top of each other.
    antuse 1 2 3 4 5 6 7 8 9 10 ➜ to plot all the baselines to one antenna at the same time.
    Run on one source at a time:
    source 'J2202+4216''
    inp
    go
    source 'J0042+5708''
    go
    source 'IRAS00420''
    go

    Note that the data looks great and there really isn't anything to flag. EDITR plots both amplitudes and phases, so this is a good way to just look at your data. If you plot the phases on all the sources, some are coherent and some are not. Which aren't and why?This has something to do with why this is a phase referenced data set.

  8. Find scan with good fringes on all baselines by running POSSM.
    default possm
    getn LORES file
    baseline 2 0
    ➜ to plot all baseline to one antenna
    docal 1; gainuse 0 ➜ calibrate data with highest CL table.
    source 'J2202+4216''➜ just look for scan on strongest source.
    aparm(9) 3➜ plot all IFs and polarizations together.
    nplot 9➜ plot 9 baselines per page.
    solint -1➜ plot one scan at a time.
    dotv 1➜ plot to the TV.
    inp
    go

  9. Find and remove instrumental delay by running VLBAMPCL.
    default vlbampcl
    getn LORES file
    calsour 'J2202+4216''
    ➜ strongest source.
    timer 0 18 42 0 0 18 45 0 ➜ scan with good fringes we found in POSSM plots.
    refant 2➜ choose reference antenna from in the middle of array, FD (antenna 2) is a good choice.
    gainu 6➜ apply highest CL table. Please do an imh here to make sure the highest CL table is really 6.
    inp
    vlbampcl

    At this point you should check on the calibration:
    • First check you have no failed solutions. At the end of the FRING run it should tell you how many "good" and "failed" solutions it has found. For this step there must be no failed solutions, failed solutions in this step mean that whatever antenna the failed solution was on is deleted from your data. For this data there should be 10 good solutions.
    • check solutions in POSSM, the jumps in phase between the IFs should be gone. The phases may also be flattened.
      tget possm➜ to "get" all the inputs from the last run.
      source 'J2202+4216' 'J0042+5708' 'J0047+5657'➜ lets look at all the calibrators.
      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

  10. Perform a global fringe fit with FRING.
    default fring
    getn LORES file
    calsour '-IRAS00420''
    ➜ do a global fringe fit on all sources except the target (its continuum is too weak).
    refant 2
    search 2 9 5 4 1 3 7 8
    ➜ list of antennas to search if a solution is hard to find.
    aparm(9) 1➜ do exhaustive baseline search.
    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

    There will be some failed solutions here and that is O.K..

  11. Check fringe solutions with SNPLT.
    default snplt
    getn LORES file
    inext 'sn'
    nplots 8
    dotv 1
    opty 'phas';go
    ➜ check for smoothly changing phases.
    opty 'rate';go➜ rates should not change much, there is some bouncing here between positive and negative rates, this might cause some weird interpolation when CLCAL in run.

    Smooth rates with SNSMO.
    default snsmo
    getn LORES file
    samptype 'mwf'
    ➜ smooth with median window filtering.
    smoty 'VLBI'➜ coherent phase, rate and delay smoothing.
    bparm 0 0 1 1➜ smooth rate and delays with a hour support time, do not smooth amplitudes or delays.
    cparm 0 0 1.0 1.0 0 0 0 100 100➜ clip delays and rates.
    inp
    go

  12. Interpolate the fringe solutions, and apply calibration from phase calibrator (J0042+5708) to target (IRAS00420) with CLCAL.
    default clcal
    getn LORES file
    gainv 7
    ➜ CL table with all the calibration.
    gainu 8➜ CL table to write next step of calibration in.
    snver 5➜ smoothed table out of SNSMO, contains final fringe fit.
    interpol '2PT'➜ use 2PT interpolation.
    refant 2
    sour 'IRAS00420''
    ➜ target.
    calsour 'J0042+5708''➜ phase calibrator, phases/rates/delays will be applied from J0042+5708 to IRAS00420.
    inp
    go
    sour 'J0047+5657''
    ➜ check source.
    go
    sour 'J0042+5708' 'J2202+4216' ➜ all the calibrators.
    calsour sour➜ set calsour to sources.
    interpol 'self'➜ only apply solutions for a source to itself.
    inp
    go

    At this point you must copy the last CL table to HIRES data because the next two steps must be done on the full resolution data.

  13. Copy highest CL (probably 8) table to CL #2 in HIRES dataset with TACOP.
    default tacop
    getn LORES file
    geton HIRES file
    ➜ set outname etc. to the HIRES file.
    inext 'cl'➜ copy a CL table.
    invers 8➜ copy CL table with all the calibration.
    ncount 1➜ only copy one CL table, not them all.
    inp
    go

  14. Calibrate bandpass shape with BPASS.
    default bpass
    getn HIRES file
    calsour 'J2202+4216''
    ➜ use strongest source for bandpass calibrator.
    solint -1➜ use all the scans on J2202+4216.
    docal 1; gainu 2➜ apply the calibration that was copied from LORES data.
    bpassprm(1) 1; bpassprm(5) 1; bpassprm(9) 1; bpassprm(10) 1➜ use autocorrelation data; normalize bandpass; interpolate over flagged channels (if necessary; normalize the amplitude portion of the bandpass function.
    inp
    go

    Now check the bandpass solutions with POSSM (tget possm; getn HIRES;baseline=0; aparm(8)=2; bpver=1;doband=1). The solutions should look like a reasonable fit of the bandpass shape.

  15. Set the rest frequency in the SU table for target with SETJY.
    default setjy
    getn HIRES file
    sour 'IRAS00420''
    sysvel -44.7
    ➜ velocity of source in km/s.
    aparm 512, 0➜ channel corresponding to sysvel.
    restfreq 22.23e9 5.08e6➜ rest frequency of line, is restfreq(1)+restfreq(2).
    veltyp 'lsr'➜ local standard of rest velocity system
    veldef 'optical'➜ optical velocity definition.
    inp
    go

    Check this was inserted correctly. Do a PRTAB on the SU table:
    default prtab
    getn HIRES file
    inext 'su'
    ➜ print SU (source) table.
    inp
    go

    Look for the columns called LSRVEL and RESTFREQ, these should have different numbers in them.

  16. Shift data to a given velocity with CVEL.
    default cvel
    getn HIRES file
    freqid 0
    sour 'IRAS00420''
    ➜ shift maser source.
    doband 1; bpver 1➜ apply bandpass, average all entries and apply to entire time range; use BP version 1.
    gainu 2➜ CL table that contains time and antenna dependent frequency offsets.
    inp
    go

    Check the shift was done correctly with POSSM (tget possm; getn CVEL file; baseline 2, 0;aparm(7)=2; aparm(8)=0;go. You can also set bchan 495; echan 535, to only plot a few channels around the masers.), the brightest maser should be at about -44km/s).

  17. Make single source data sets with SPLIT. I like to work with single source files, it's less confusing, especially when self-caling.
    default split
    getn CVEL file
    freqid 0
    docal 1; gainu 2
    ➜ apply calibration; from CL#2.
    sour 'J0042+5708' 'IRAS00420'➜ split out target and phase calibrator.
    inp
    go

  18. Image IRAS00420 with IMAGR.
    default imagr
    getn SPLIT file
    bchan 495; echan 535; nchav 2; chinc 2
    ➜ image channels 495-535; average every 2 channels.
    cell 0.0001; imsi 4096➜ cell size of 0.1 mas; image size of 4096x4096.
    dotv 1; niter 1000➜ do interactive clean; with 1000 interations.
    inp
    go

    You can try autoboxing this works reasonably well:
    im2parm 10 6 9 0.5➜ only do 10 boxes per major cycle; find islands with > 6*rms; box is accepted if peak > 9*rms; box is accepted if its peak brightness is >0.5*max residual.
    go

    HINT:First few channels will not have any masers, just hit "STOP CLEANING" until you see some emission. Look at cube with TVMOVIE and use SQASH (bdrop 3; dparm 1 0) to collapse cube and then use TVLOD to look at the SQASH image.
Other things to do if you finish early.
  1. Try to improve phase referencing by editing the final CL table and getting rid of spurious phase winds and/or when the phases just change too fast for the interpolation to be any good. Either with SNEDT or SNFLG can be used, SNEDT is a graphical interface which allows you to flag the CL table, SNFLG is a program that flags the data based on the phases in the CL table, you select the amount of phase change with time is acceptable.
  2. Self-cal the calibrator with CALIB, and re-fring fit with the best image as a model and redo last few steps. Does this improve the phase referenced image (probably not, but good practice)? Teaches self-cal.

If you have any question please contact Amy Mioduszewski. Last updated 06-May-2014.