Monday, June 2, 2008

Calibrating One Calibrator with Two UVranges

The VLA calibrator manual recommends that if you are using 3c286 as your flux calibrator at 20 cm in A configuration, you should use the uvrange 0-18 AND 90-180 (for the latter, decrease flux by 6%). This makes me wonder how on earth one would do this. First of all, I do not know how to calibrate on two separate uvranges and then merge that information. Second of all, I do not know how to reduce a flux by 6%. Anyone? Anyone?



6 comments:

emily said...

hmm, that is weird. they don't want any of the flux from the 18-90 klambda baselines??? SETJY is usually the task you run on the flux calibrator to set its true flux in the SU table. i guess you could UVCOP out the 3c286 with the two different uvranges and run SETJY on them and decrease the second flux by the 6%. it looks like SETJY has aparm(3) which would do the 6% decrease for you. i can't easily see any other way to do the two uvranges though. and in the end you would add the two flux values together and write that into the SU table of the original dataset and use it to bootstrap the phase calibrator.

Laura said...

Yup, no 18-90 klambda baselines. Although it's not the end of the world; they say including the 18-90 baselines will only give you a 5% error on your flux at max.

Hmmm...But you should weight the two different flux values differently, right? There will be a flux calculated by SETJY for 0-18 and a flux for 90-180 and presumably you'd want to average them together in some weighted fashion and then put this averaged value in the SU table. But I have no idea how'd you know what the prope weight are.

Also, how do you just write something into the SU table? Using SETJY? Or TABED?

Anonymous said...

setjy is to set absolute flux values for calib, right? As far as I remember calib solutions are antenna based. I guess you can choose any of those two ranges (0-18 or 90+), provided all the antennas have some baselines in that range.

Claudia said...

My understanding is that the uvranges are obsolete (before the development/availability of the calibrator models) and one should always use the models instead. to get them, run
inp calrd
enter the source name and band you want, eg
>inp
AIPS 2: CALRD: Task to read in a calibrator FITS image file
AIPS 2: Adverbs Values Comments
AIPS 2: ----------------------------------------------------------------
AIPS 2: OBJECT '3C286' Object name
AIPS 2: BAND 'L' Code for arrays and band
AIPS 2: OUTDISK 9 Disk drive # (0 => any)

I just checked and there is an L-band model for 3C286.

So you run setjy as normal, but then when you do the calibration with calib, you use the model as the "get2n" input.

Anonymous said...

that sounds good! calibration with a model for flux cal. Will try it out..

Claudia said...

Here's the full sequence of what I would do (I've used it on C band and shorter wavelengths; might be overkill for L band, I don't know.) In case it might be useful.

9a. CALRD to get models
this is a verb

eg
>inp calrd
AIPS 1: CALRD: Task to read in a calibrator FITS image file
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: OBJECT '3C286' Object name
AIPS 1: BAND 'C' Code for arrays and band
AIPS 1: OUTDISK 3 Disk drive # (0 => any)

go calrd

to load the model

9b. SETJY on 3C286
eg
AIPS 1: SETJY Task to enter source info into source (SU) table.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC904_FEB9' Input image name (name)
AIPS 1: INCLASS 'CH.0' Input image name (class)
AIPS 1: INSEQ 1 Input image name (seq. #)
AIPS 1: INDISK 2 Input image disk unit #
AIPS 1: SOURCES '1331+305' Sources to modify.
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: BIF 1 Low IF # for flux density
AIPS 1: EIF 1 High IF # for flux density
AIPS 1: ZEROSP *all 0 I,Q,U,V flux density (Jy)
AIPS 1: OPTYPE 'CALC' ' ' => use other adverbs
AIPS 1: for required operation
AIPS 1: 'CALC' => determine
AIPS 1: 3C286/3C48/1934 fluxes from
AIPS 1: standard formulae
AIPS 1: 'REJY' => reset source
AIPS 1: fluxes to zero.
AIPS 1: 'REVL' => reset velocity
AIPS 1: to zero
AIPS 1: 'RESE' => reset fluxes &
AIPS 1: velocities to zero.
AIPS 1: CALCODE ' ' New calibrator code:
AIPS 1: '----' => change to blank
AIPS 1: SYSVEL 0 Velocity of source (km/s)
AIPS 1: RESTFREQ 0 0 Line rest frequency (Hz)
AIPS 1: VELTYP ' ' Velocity type 'LSR,'HELIO'
AIPS 1: VELDEF ' ' Velocity definition 'RADIO',
AIPS 1: 'OPTICAL'
AIPS 1: FREQID 1 FQ table entry to use for
AIPS 1: velocity information and
AIPS 1: 'CALC' option
AIPS 1: APARM *all 0 (1): Pixel to which SYSVEL
AIPS 1: refers ( 0=>1)
AIPS 1: (2): Only for 'CALC' option:
AIPS 1: <= 0 => use latest VLA
AIPS 1: values (1999.2) or,
AIPS 1: for 1934-638, the
AIPS 1: ATCA value of 30Jul94.
AIPS 1: 1 => use Baars values
AIPS 1: or old ATCA/PKS values
AIPS 1: for 1934-638
AIPS 1: 2 => use VLA 1995.2
AIPS 1: values or for 1934-638
AIPS 1: the ATCA value of
AIPS 1: 30Jul94.
AIPS 1: >= 3 => use oldest VLA
AIPS 1: values (1990) or,
AIPS 1: for 1934-638, the
AIPS 1: ATCA value of 30Jul94.
AIPS 1: (3): Only for 'CALC' option:
AIPS 1: multiply the calculated
AIPS 1: fluxes by APARM(3) with
AIPS 1: 0 -> 1

10a. CALIB

run phase-only CALIB on 3C286, with model

calsour '1331+305''
snver=1
solmode='p'
solint 0.1

get2n modelimage (loaded in step 9a above)

docalib 2
gainuse 1 (2 if you've run VLANT)

10b. CALIB

run phase-only CALIB on all *other* calibrators, using no model

snver=1
solmode='p'
solint=0.1

docal 2
gainuse 2

get2n blank (need to set by typing clr2n)

calsour= all other calibrators
eg

AIPS 1: CALSOUR '1733-130' Calibrator sources
AIPS 1: '2136+006' *rest ' '

10c. CLCAL
source ''

calsource=all calibrators
eg
AIPS 1: CALSOUR '1733-130' Cal sources for calibration
AIPS 1: '2136+006' '1331+305'
AIPS 1: *rest ' '

gainuse=3 ; for files on which VLANT and UVFIX have been run
gainver=2 ; for files on which VLANT and UVFIX have been run
snver=1
inver=0

10d. CALIB

as in 10a, above, except now doing A&P cal with longer time interval

calsour '1331+305''
snver=2 **very important
solmode='a&p'
solint 0

get2n modelimage (loaded in step 9a above)


docalib 2
gainuse 2 (or 3, if started with cl table 2; to apply the phase solutions you found above)

10e. CALIB

as in 10b., above, except A&P cal with longer time interval

snver=2 **very important
solmode='a&p'
solint=0

docal 2
gainuse 3 **very important

get2n blank (need to set by typing clr2n)

calsour= all other calibrators
eg

AIPS 1: CALSOUR '1733-130' Calibrator sources
AIPS 1: '2136+006' *rest ' '


11. GETJY
to get fluxes for other calibrators

***snver=2 to use to solutions found above


>inp
AIPS 1: GETJY Task to determine source flux densities.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC904_FEB17' Input UV file name (name)
AIPS 1: INCLASS 'CH.0' Input UV file name (class)
AIPS 1: INSEQ 3 Input UV file name (seq. #)
AIPS 1: INDISK 4 Input UV file disk unit #
AIPS 1: SOURCES '1733-130' Source list to find fluxes
AIPS 1: '1331+305' *rest ' '
AIPS 1: SOUCODE ' ' Source "Cal codes"
AIPS 1: CALSOUR '2136+006' Cal sources for calibration
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: BIF 1 Lowest IF number 0=1
AIPS 1: EIF 1 Highest IF number
AIPS 1: TIMERANG *all 0 Time range of solutions.
AIPS 1: ANTENNAS *all 0 Antennas to use
AIPS 1: SUBARRAY 0 Subarray, 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: SNVER 2 Input SN table, 0=>all.



12. CLCAL on all sources, using all calibrators

OPCODE 'CALI'

IMPORTANT:

gainver=3 *** you want to _add_ the amplitude solutions to the
phase solutions
gainuse=4
snver=2

>inp
AIPS 1: CLCAL Task to manage SN and CL calibration tables
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC904_FEB17' Input UV file name (name)
AIPS 1: INCLASS 'CH.0' Input UV file name (class)
AIPS 1: INSEQ 3 Input UV file name (seq. #)
AIPS 1: INDISK 4 Input UV file disk unit #
AIPS 1: SOURCES *all ' ' Source list to calibrate
AIPS 1: SOUCODE ' ' Source "Cal codes"
AIPS 1: CALSOUR '1733-130' Cal sources for calibration
AIPS 1: '2136+006' '1331+305'
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 'CALI' 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 1 > 0 -> smooth all sources
AIPS 1: together; else separate them
AIPS 1: SMOTYPE ' ' Data to smooth
AIPS 1: SNVER 2 Input SN table, 0=>all.
AIPS 1: INVERS 0 Upper SN table vers in a
AIPS 1: range. 0=>SNVER
AIPS 1: GAINVER 2 Input Cal table 0=>high
AIPS 1: GAINUSE 4 Output CAL table 0=>high+1
AIPS 1: REFANT 18 Reference antenna 0=>pick.
AIPS 1: BADDISK *all 0 Disks to avoid for scratch

16. TACOP
* cl table 4 from CHO over to line data

* last flag table over to line data

17. SPLIT off each source from each day's LINE data

doband 1
bpver 1

docalib 2
gainuse 3

outclass 'SPLIT'