Thursday, March 5, 2009

WBR Step 7C: Apply Your Calibration

After you have calibrated your calibrators, you are going to want to apply this calibration to your source data-- the object you actually care about imaging.

First, you need to make a CL table that interpolates the amplitude/phase solutions found every ~30 minutes for the phase calibrator to your source data. You can use CLCAL or VLACLCAL to do this. Let's say your sources are "PHS_CAL' and 'COOL_GAL', and you have a lovely SN table for 'PHS_CAL' which you determined using the steps in Section 6. Then your inputs to CLCAL will look like this:


AIPS 1: CLCAL Task to manage SN and CL calibration tables
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'NICE_DATA' Input UV file name (name)
AIPS 1: INCLASS 'L BAND' Input UV file name (class)
AIPS 1: INSEQ 2 Input UV file name (seq. #)
AIPS 1: INDISK 1 Input UV file disk unit #
AIPS 1: SOURCES 'PHS_CAL' Source list to calibrate
AIPS 1: 'COOL_GAL' *rest ' '
AIPS 1: SOUCODE ' ' Source "Cal codes"
AIPS 1: CALSOUR 'PHS_CAL' Cal sources for calibration
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: TIMERANG *all 0 Time range to calibrate
AIPS 1: SUBARRAY 0 Subarray, 0=>all,
AIPS 1: ANTENNAS *all 0 Antennas selected, 0=> all
AIPS 1: SELBAND -1 Bandwidth to select (kHz)
AIPS 1: SELFREQ -1 Frequency to select (MHz)
AIPS 1: FREQID -1 Freq. ID to select.
AIPS 1: OPCODE ' ' Operation 'MERG','CALI',
AIPS 1: 'CALP'; ' ' => 'CALI'
AIPS 1: INTERPOL '2PT' Interpolation function,
AIPS 1: choices are: '2PT','SIMP',
AIPS 1: 'AMBG','CUBE','SELF','POLY',
AIPS 1: 'SELN'; see HELP for details
AIPS 1: CUTOFF 0 Interpolation limit in
AIPS 1: time (min); 0=> no limit.
AIPS 1: SAMPTYPE ' ' Smoothing function
AIPS 1: BPARM *all 0 Smoothing parameters
AIPS 1: ICUT 0.1 Cutoff for functional forms
AIPS 1: DOBLANK 0 Blanked value interpolation
AIPS 1: DOBTWEEN 0 > 0 -> smooth all sources
AIPS 1: together; else separate them
AIPS 1: SMOTYPE ' ' Data to smooth
AIPS 1: SNVER 0 Input SN table, 0=>all.
AIPS 1: INVERS 0 Upper SN table vers in a
AIPS 1: range. 0=>SNVER
AIPS 1: GAINVER 1 Input Cal table 0=>high
AIPS 1: GAINUSE 2 Output CAL table 0=>high+1
AIPS 1: REFANT 8 Reference antenna 0=>pick.
AIPS 1: BADDISK *all 0 Disks to avoid for scratch

Now CL table #2 has all the info you need to calibrate your data!

Next, you want to apply this calibration and split your 'COOL_GAL' data off into a single source file. For this, use SPLIT.

AIPS 1: SPLIT Task to split multi-source uv data to single source
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: also works on single files.
AIPS 1: INNAME 'NICE_DATA' Input UV file name (name)
AIPS 1: INCLASS 'L BAND' Input UV file name (class)
AIPS 1: INSEQ 2 Input UV file name (seq. #)
AIPS 1: INDISK 1 Input UV file disk unit #
AIPS 1: SOURCES 'COOL_GAL' Source list
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: TIMERANG *all 0 Time range to copy
AIPS 1: STOKES ' ' Stokes type to pass.
AIPS 1: SELBAND -1 Bandwidth to select (kHz)
AIPS 1: SELFREQ -1 Frequency to select (MHz)
AIPS 1: FREQID -1 Freq. ID to select.
AIPS 1: BIF 0 Lowest IF number 0=>all
AIPS 1: EIF 0 Highest IF number 0=>all
AIPS 1: BCHAN 0 Lowest channel number 0=>all
AIPS 1: ECHAN 0 Highest channel number
AIPS 1: SUBARRAY 0 Subarray, 0=>all
AIPS 1: DOCALIB 2 > 0 calibrate data & weights
AIPS 1: > 99 do NOT calibrate weights
AIPS 1: GAINUSE 2 CL (or SN) table to apply
AIPS 1: DOPOL -1 If >0 correct polarization.
AIPS 1: BLVER -1 BL table to apply.
AIPS 1: FLAGVER 0 Flag table version
AIPS 1: DOBAND -1 If >0 apply bandpass cal.
AIPS 1: Method used depends on value
AIPS 1: of DOBAND (see HELP file).
AIPS 1: BPVER 1 Bandpass table version
AIPS 1: SMOOTH *all 0 Smoothing function. See
AIPS 1: HELP SMOOTH for details.
AIPS 1: OUTCLASS 'SPLIT' Output UV file name (class)
AIPS 1: OUTSEQ 0 Output UV file name (seq. #)
AIPS 1: OUTDISK 0 Output UV file disk unit #.
AIPS 1: DOUVCOMP -1 1 (T) => compressed data
AIPS 1: APARM *all 0 Control information:
AIPS 1: 1 = 1 => avg. freq. in IF
AIPS 1: multi-channel out
AIPS 1: = 2 => avg. freq. in IF
AIPS 1: single channel out
AIPS 1: = 3 => avg IF's also
AIPS 1: 2 = Input avg. time (sec)
AIPS 1: 3 > 0 => Drop subarrays
AIPS 1: 4 > 0 => calibrate weights
AIPS 1: 5 = 0 pass only xc data
AIPS 1: = 1 pass xc and ac data
AIPS 1: = 2 pass only ac data
AIPS 1: 6 > 0 add full source name
AIPS 1: to header
AIPS 1: NCHAV 0 Number of chan. to average.
AIPS 1: (used if APARM(1) = 1)
AIPS 1: <= 0 -> ALL
AIPS 1: CHINC 0 Channel incr. between output
AIPS 1: channels (used if APARM(1)=1)
AIPS 1: ICHANSEL *all 0 Array of channel start, stop,
AIPS 1: and increment numbers and IF
AIPS 1: number to be used when
AIPS 1: averaging in frequency.
AIPS 1: (used if APARM(1) = 2, 3)
AIPS 1: BADDISK *all 0 Disks to avoid for scratch

The most important things to have set here are DOCAL = 2 and GAINUSE=2. If you have done other fancy things like a baseline-dependent calibration or a bandpass calibration, you can also apply those here.

SPLIT will make a file with just the calibrated data for your source of interest. You'll need to flag this single-source file, and then you'll be ready to image!



No comments: