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!
Thursday, March 5, 2009
WBR Step 7C: Apply Your Calibration
Posted by
Laura
at
9:11 PM
0
comments
Labels: Wisconsin Banana Recipes
Monday, June 4, 2007
WBR Step 6L: Calibration
Calibration is usually a somewhat iterative process. I will lightly flag my calibrator, then calibrate the calibrator, then see if any new funky looking data points have appeared. If they have, I will flag again and calibrate again. Wash, rinse, repeat until no funky data points show up.
So how do you calibrate your data anyway?
Assuming you've lightly flagged your phase and flux calibrators, according to Step 5, now we're ready to run SETJY. SETJY basically just writes to your data the most accurate flux for your flux calibrator. Important parameters to consider here:
--SOURCES '1331+305', '0137+331', or '0542+498' (whichever one you used. sometimes you will have two different flux calibrators, and you can enter them both here.
--OPTYPE 'CALC'
AIPS 1: SETJY Task to enter source info into source (SU) table.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC825_FQ1' Input image name (name)
AIPS 1: INCLASS 'CH 0' Input image name (class)
AIPS 1: INSEQ 1 Input image name (seq. #)
AIPS 1: INDISK 1 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 0 Low IF # for flux density
AIPS 1: EIF 0 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 0 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
Now it's time to run calib!
(I wouldn't use VLACALIB (like the AIPS cookbook tells you too) because some parts of VLACALIB are a bit of a black box, and can set certain parameters quite mysteriously (I've had it use SOLINT = 400 before, for no good reason).
Run calib on your flux calibrator first. Here are some parameters you should definitely worry about and set:
CALSOUR '1331+305' (name of flux calibrator)
UVRANGE (find this in the VLA calibrator manual. the best calibrators are ones where you don't have to set this.)
DOCALIB 2 (apply weights)
REFANT 6 (you chose a refant in step 3, use it!)
SOLINT 1 (this is how often to solve for a calibration solution. 1 seems to work well often.)
SOLMODE 'A&P' (calibrate amplitudes and phases)
AIPS 1: CALIB: Task to determine calibration for data.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: Input uv data.
AIPS 1: INNAME 'AC825_FQ1' UV file name (name)
AIPS 1: INCLASS 'CH 0' UV file name (class)
AIPS 1: INSEQ 1 UV file name (seq. #)
AIPS 1: INDISK 1 UV file disk drive #
AIPS 1: Data selection (multisource):
AIPS 1: CALSOUR '1331+305' Calibrator sources
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Calibrator qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code ' '=>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: TIMERANG *all 0 Time range to use.
AIPS 1: BCHAN 0 Lowest channel number 0=>all
AIPS 1: ECHAN 0 Highest channel number
AIPS 1: ANTENNAS *all 0 Antennas to select. 0=all
AIPS 1: DOFIT *all 0 Subset of ANTENNAS list for
AIPS 1: which solns are desired.
AIPS 1: ANTUSE *all 0 Mean gain is calculated
AIPS 1: (CPARM(2)>0) using only the
AIPS 1: listed antennas. See explain.
AIPS 1: SUBARRAY 0 Subarray, 0=>all
AIPS 1: UVRANGE 0 0 Range of uv distance for full
AIPS 1: weight
AIPS 1: WTUV 0 Weight outside UVRANGE 0=0.
AIPS 1: WEIGHTIT 0 Modify data weights function
AIPS 1: Cal. info for input:
AIPS 1: DOCALIB 2 If >0 calibrate data
AIPS 1: = 2 calibrate weights
AIPS 1: GAINUSE 0 CL table to apply.
AIPS 1: DOPOL -1 If >0 correct polarization.
AIPS 1: BLVER -1 BL table to apply.
AIPS 1: FLAGVER 1 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:
AIPS 1: CLEAN map. See HELP.
AIPS 1: IN2NAME ' ' Cleaned map name (name)
AIPS 1: IN2CLASS ' ' Cleaned map name (class)
AIPS 1: IN2SEQ 0 Cleaned map name (seq. #)
AIPS 1: IN2DISK 0 Cleaned map disk unit #
AIPS 1: INVERS 0 CC file version #.
AIPS 1: NCOMP *all 0 # comps to use for model.
AIPS 1: 1 value per field
AIPS 1: FLUX 0 Lowest CC component used.
AIPS 1: NMAPS 0 No. Clean map files
AIPS 1: CMETHOD ' ' Modeling method:
AIPS 1: 'DFT','GRID',' '
AIPS 1: CMODEL ' ' Model type: 'COMP','IMAG'
AIPS 1: SMODEL *all 0 Source model, 1=flux,2=x,3=y
AIPS 1: See HELP SMODEL for models.
AIPS 1:
AIPS 1: Output uv data file.
AIPS 1: OUTNAME ' ' UV file name (name)
AIPS 1: OUTCLASS ' ' UV file name (class)
AIPS 1: OUTSEQ 0 UV file name (seq. #)
AIPS 1: OUTDISK 0 UV file disk drive #
AIPS 1:
AIPS 1: Solution control adverbs:
AIPS 1: REFANT 6 Reference antenna
AIPS 1: SOLINT 1 Solution interval (min)
AIPS 1: SOLSUB 0 Solution subinterval
AIPS 1: SOLMIN 0 Min solution interval
AIPS 1: APARM *all 0 General parameters
AIPS 1: 1=min. no. antennas
AIPS 1: 2 > 0 => data divided
AIPS 1: 3 > 0 => avg. RR,LL
AIPS 1: 5 > 0 => avg. IFs.
AIPS 1: 6=print level, 1=good,
AIPS 1: 2 closure, 3 SNR
AIPS 1: 7=SNR cutoff (0=>5)
AIPS 1: 8=max. ant. # (no AN)
AIPS 1: 9 > 0 => pass failed soln
AIPS 1: Phase-amplitude Parameters:
AIPS 1: DOFLAG 0 Flag on closure error?
AIPS 1: SOLTYPE ' ' Soln type,' ','L1','GCON',
AIPS 1: 'R', 'L1R', 'GCOR'
AIPS 1: SOLMODE 'A&P' Soln. mode: 'A&P','P','P!A',
AIPS 1: 'GCON',
AIPS 1: SOLCON 0 Gain constraint factor.
AIPS 1: MINAMPER 0 Amplitude closure error
AIPS 1: regarded as excessive in %
AIPS 1: MINPHSER 0 Phase closure error regarded
AIPS 1: as excessive in degrees
AIPS 1: CPARM *all 0 Phase-amp. parameters
AIPS 1: 1 = Min el for gain
AIPS 1: normalization (deg)
AIPS 1: 2 >0 => normalize gain
AIPS 1: 3 avg. amp. closure err
AIPS 1: 4 avg. ph. closure err
AIPS 1: 5 >0 => scalar average
AIPS 1: 6 limit clipping in robust
AIPS 1: SNVER 0 Output SN table, 0=>new table
AIPS 1: ANTWT *all 0 Ant. weights (0=>1.0)
AIPS 1: GAINERR *all 0 Std. Dev. of antenna gains.
AIPS 1: BADDISK *all 0 Disk no. not to use for
AIPS 1: scratch files.
You will get some output that looks like this:
localh> CALIB1: Writing SN table 1
localh> CALIB1: RPOL, IF= 1 The average gain over these antennas is 3.080E+00
localh> CALIB1: RPOL, IF= 2 The average gain over these antennas is 3.088E+00
localh> CALIB1: LPOL, IF= 1 The average gain over these antennas is 3.033E+00
localh> CALIB1: LPOL, IF= 2 The average gain over these antennas is 3.086E+00
localh> CALIB1: Found 2321 good solutions
localh> CALIB1: Failed on 7 solutions
Some ways to tell if your data is really acting up is if you have tons of bad solutions (if you do, you might want to consider increasing your solint). Additionally, for some telescopes (not really for the VLA), if you have lots of bad solutions, you might have to tell CALIB to accept points of lower quality.
aparm(1) = 4 (CALIB default is a minimum of 6 antennas for a good solution, you could decrease it to 4.)
aparm(7) = 3 (CALIB default is a signal-to-noise in your solutions of 5. This is a bit high for some telescopes, and can reasonably be decreased to 3.)
soltype = 'L1' (this should be a more robust method for finding solutions (robust against outlying points). However, AIPS wants you to know that you will "lose some statistical efficiency". You could try other robust soltypes, too, but be warned they might be slow.)
Additionally, in my experience, it's a good thing that those 4 numbers (one for each polarization and IF) are all about the same (around 3.08). If one is really different than the others, than it might imply that their is bad data in that if/polarization.
All CALIB does is spit out a 'SN' table. The way we have it right now (SNVER = 0), every time you run CALIB it will spit out a new SN table. If you set SNVER = 1, every time you run CALIB, it would just append new information to this table.
Let's see if this calibration brought up any new bad data that needs to be flagged. If we want to apply calibration to our data in tasks like UVPLT and TVFLG, the calibration needs to be in a 'CL' table, not a "SN' table (yeah, stupid AIPS rule). To copy our 'SN' table to a 'CL' table, use VLACLCAL. First, you will need to type:
run vlaprocs
to load up the task VLACLCAL. Then set three important parameters. In this case, we'll use:
SOURCES = '1331+305' (the name of your flux cal)
CALSOUR = '1331+305' (the name of your flux cal)
REFANT = 6 (your reference antenna)
AIPS 1: VLACLCAL Procedure to run CLCAL and LISTR for VLA data.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: Use RUN VLAPROCS first
AIPS 1: INNAME 'AC825_FQ1' Input UV file name (name)
AIPS 1: INCLASS 'CH 0' Input UV file name (class)
AIPS 1: INSEQ 1 Input UV file name (seq. #)
AIPS 1: INDISK 1 Input UV file disk unit #
AIPS 1: SOURCES '1331+305' Source list to calibrate
AIPS 1: *rest ' '
AIPS 1: SOUCODE ' ' Source "Cal codes"
AIPS 1: CALSOUR '1331+305' Cal sources for calibration
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: FREQID 1 Unique frequency code
AIPS 1: TIMERANG *all 0 Time range to calibrate
AIPS 1: SUBARRAY 0 Subarray, 0=>all
AIPS 1: INTERPOL ' ' Interpolation function
AIPS 1: SAMPTYPE ' ' Smoothing function
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: BPARM *all 0 Smoothing parameters
AIPS 1: ICUT .1 Cutoff for functional forms
AIPS 1: GAINVER 0 Input Cal table 0=>1
AIPS 1: GAINUSE 0 Output CAL table 0=>2
AIPS 1: REFANT 6 Reference antenna 0=>pick.
AIPS 1: DOPRINT 1 >0 Print messages to a file
AIPS 1: or to the printer.
AIPS 1: OUTPRINT *all ' ' Printer disk file to save
AIPS 1: BADDISK *all 0 Disks to avoid for scratch
This should write out a CL table 2. If you want to apply this caibration in, say, TVFLG, you would just use
DOCAL = 2
GAINUSE = 2
and that applies the CL table 2.
At this point, I also like to flag on phase. I've had a few data sets where amplitudes looks ok for the calibrators, but there are still some quite aberrant points in phase. In general, any points with phases > +/-10 degrees are probably bad (for your calibrators, which are point sources!!! unfortunately, you won't be able to flag on phase at all for your target source, because your target source will not be a point source and will therefore have phases running the whole gamut from -180 to +180 degrees.)
If you want to 'undo' the calibration (let's say because you flagged some data, and now you want to do a new and improved calibration and no longer need your old one), just delete your SN tables, and all CL tables which are greater than 1. BUT DON'T DELETE CL TABLE 1!!! This has important basic information in it.
When you think you have the very best calibration for your flux calibrator, I like to then repeat this same process for my phase calibrator. Iterate by running CALIB and VLACLCAL on your phase calibrator, and then flagging it until in uvplt there are very no aberrant points left in amplitude or phase. (Make sure you check each IF and each polarization!)
Now, when you trust your calibration/flagging for both your calibrators, Delete your SN tables and CL table #2. Let's do final runs of CALIB. At this point I set SNVER = 1 so that CALIB will write out solutions for both calibrators to the same SN table.
--Run CALIB on your flux calibrator.
--Run CALIB on your phase calibrator.
Now, run GETJY to get a flux for your phase calibrator. Parametrs to set:
SOURCES = your phase calibrator
CALSOUR = your flux calibrator
AIPS 1: GETJY Task to determine source flux densities.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC825' Input UV file name (name)
AIPS 1: INCLASS 'CH 0' Input UV file name (class)
AIPS 1: INSEQ 1 Input UV file name (seq. #)
AIPS 1: INDISK 1 Input UV file disk unit #
AIPS 1: SOURCES '1033+395' Source list to find fluxes
AIPS 1: *rest ' '
AIPS 1: SOUCODE ' ' Source "Cal codes"
AIPS 1: CALSOUR '1331+305' Cal sources for calibration
AIPS 1: *rest ' '
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: BIF 0 Lowest IF number 0=1
AIPS 1: EIF 0 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 2 Freq. ID to select.
AIPS 1: SNVER 2 Input SN table, 0=>all.
You will get some output that looks like this:
localh> GETJY1: Task GETJY (release of 31DEC05) begins
localh> GETJY1: Source:Qual CALCODE IF Flux (Jy)
localh> GETJY1: 1033+395 : 0 A 1 .40437 +/- .00091
localh> GETJY1: 2 .39109 +/- .00074
localh> GETJY1: Appears to have ended successfully
localh> GETJY1: localhost 31DEC05 TST: Cpu= .0 Real= 0
At this point, what you want to worry about is the errors in the fluxes determined for your phase cal. If they are big, something has gone awry. What you do NOT need to worry about is if the fluxes are significantly different from those in the VLA calibrator manual. Remember that these calibrators are AGN-- they vary in flux!! Flux calibrators have been chosen because their fluxes are hopefully quite steady, but phase calibrators have only been chosen to be pointy. Their fluxes may vary. That's why you are comparing them with the flux calibrator, to get the best flux determination for them at the time of your observations!
A fun exercise is to look up your phase calibrator using this Java applet. It will show you how the flux of your calibrator has changed over time (their are only data points here when someone has actually used your phase calibrator for their VLA observations).
Finally, do final runs of VLACLCAL.
Do one run with
SOURCES = your phase cal, your target sources
CALSOUR = your phase cal
Do one more run with
SOURCES = your flux cal
CALSOUR = your flux cal
The defaults on VLACLCAL are smart enough to always output to CL table #2 (even if it already exists).
A good way to do a final check of your calibration (although it should be quite good if you have done it the iterative way I suggest!) is to run LISTR in 'MATX' mode.
OPTYPE = 'MATX'
SOURCES = your phase cal
DOCAL = 2
GAINUSE = 2
DPARM(1) = 5
DOCRT = -1
OUTPRINT = a file name
AIPS 1: LISTR: Task to print UV data and calibration tables.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: USERID 0 User number.
AIPS 1: INNAME 'AC825' UV data (name).
AIPS 1: INCLASS 'CH 0' UV data (class).
AIPS 1: INSEQ 1 UV data (seq. #). 0 => high
AIPS 1: INDISK 1 Disk unit #. 0 => any
AIPS 1: OPTYPE 'MATX' List type:
AIPS 1: 'MATX','LIST','GAIN','SCAN'
AIPS 1: INEXT 'CL' CL, SN or TY table for 'GAIN'
AIPS 1: INVER 0 CL, Sn or TY table version
AIPS 1: SOURCES '1033+395' Source list
AIPS 1: *rest ' '
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: TIMERANG *all 0 Time range to list
AIPS 1: STOKES ' ' Stokes type to list.
AIPS 1: SELBAND -1 Bandwidth to select (kHz)
AIPS 1: SELFREQ -1 Frequency to select (MHz)
AIPS 1: FREQID 0 Freq. ID to select.
AIPS 1: None selected => 1.
AIPS 1: BIF 1 Lowest IF number 0=1
AIPS 1: EIF 1 Highest IF number
AIPS 1: BCHAN 1 Low channel number 0=>1
AIPS 1: ECHAN 0 High channel number
AIPS 1: ANTENNAS *all 0 Antennas to list
AIPS 1: BASELINE *all 0 Baselines with ANTENNAS
AIPS 1: UVRANGE 0 0 UV range in kilolambda
AIPS 1: SUBARRAY 0 Subarray, 0=>1
AIPS 1: Cal. info for input:
AIPS 1: DOCALIB 2 If >0 calibrate data
AIPS 1: = 2 calibrate weights
AIPS 1: GAINUSE 2 CAL (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: DPARM 5 1 Control info:
AIPS 1: *rest 0 (1) 0=amp, 1=phase, 2=rms
AIPS 1: 3=amp+rms, 4=phase+rms
AIPS 1: 5=amp+phase, 6=delay,
AIPS 1: 7=rate, 8=SNR, 9=par. ang
AIPS 1: 10 = Tsys, 11=elev,
AIPS 1: 12 = multiband delay
AIPS 1: 13 = Tant 14 = weights
AIPS 1: N.B. Options 3 and 4 only
AIPS 1: valid for OPTYPE = 'MATX'
AIPS 1: (2) 0=vec avg, 1=scalar
AIPS 1: (3) No. col (4-10) def=4.
AIPS 1: (4) avg. time min (MATX,LIST)
AIPS 1: *** significant
AIPS 1: (5) Type of gain listings:
AIPS 1: 0 => all with same scale
AIPS 1: like DEC-10 listings;
AIPS 1: 1 => scan/source info at
AIPS 1: source/scan boundaries.
AIPS 1: (6) Matrix scaling control:
AIPS 1: 0 => plot amp & rms
AIPS 1: matrices with same scale;
AIPS 1: 1 => self-scale each
AIPS 1: separately.
AIPS 1: (7) > 0 self-scale phase
AIPS 1: displays, else degrees.
AIPS 1: DOACOR -1 > 0 include autocorrelations
AIPS 1: FACTOR 0 When DPARM(5)=0 Multiply
AIPS 1: gain listings by FACTOR,
AIPS 1: 0=> use scale factor from
AIPS 1: first record printed.
AIPS 1: DOCRT -1 > 0 -> use the terminal,
AIPS 1: else use the line printer
AIPS 1: > 72 => terminal width
AIPS 1: OUTPRINT 'MATX_CAL1'
AIPS 1: Printer disk file to save
AIPS 1: BADDISK *all 0 Disk to avoid for scratch.
When you look at this list of numbers, amplitudes should be near constant between baselines and in time. Phases should be around zero. Lots of 0's and 1's are good! Teens and 20's are bad! If you have nice phases that are mostly small numbers, then...
Congratulations! You have calibrated your data!!!
Posted by
Laura
at
11:57 PM
0
comments
Labels: calibration, Wisconsin Banana Recipes
WBR Step 5L: Flag Your Calibrators
Ok, 'L' stands for Line data. Most of the steps for reducing line data can also be found in Appendix B of the AIPS cookbook. What we have to do first is flag the Channel 0 data for our calibrators.
First, you should know that flagging is really a matter of personal taste. This is the way I like to do it, but you might find something that you like a whole lot more.
Secondly, don't be surprised when flagging is by far the most time consuming aspect of interferometric data reduction. Especially if you're screwing around with data from the VLA as it is transitioning to the EVLA.
Thirdly, at least at this stage, only flag on amplitude. After some calibration, you might consider flagging on phase, but not yet.
A good place to start flagging is QUACK. QUACK flags the beginning of each scan of data, because often times the first little bit of time on an object is bad. QUACK from the 31Dec05 release of AIPS was really quite transparent, with parameters looking like this:
AIPS 1: QUACK Flags specified portion of scans of UV data
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC825_FQ1' Input UV file name (name)
AIPS 1: INCLASS 'CH 0' Input UV file name (class)
AIPS 1: INSEQ 1 Input UV file name (seq. #)
AIPS 1: INDISK 1 Input UV file disk unit #
AIPS 1: SOURCES *all ' ' Sources selected/deselected
AIPS 1: SUBARRAY 0 Subarray number 0=>all.
AIPS 1: SELBAND -1 Bandwidth to flag (kHz)
AIPS 1: SELFREQ -1 Frequency to flag (MHz)
AIPS 1: FREQID 1 Freq. ID to flag. -1=>all.
AIPS 1: 0=> first Freq. ID.
AIPS 1: TIMERANG *all 0 Time: start day,hr,min,sec
AIPS 1: stop day,hr,min,sec.
AIPS 1: ANTENNAS *all 0 Antennas to flag
AIPS 1: FLAGVER 0 Flag table version number
AIPS 1: OPCODE 'ENDB' 'END ', 'BEG ', 'ENDB'
AIPS 1: 'TAIL'; ' ' => 'BEG '
AIPS 1: REASON *all ' ' Reason (24 char.)
AIPS 1: APARM 0 .33 (1) => Cutting time (min)
AIPS 1: *rest 0 from end (ENDG) 0 => 2
AIPS 1: (2) => Cutting time (min)
AIPS 1: from beg/end (BEGB/ENDB)
AIPS 1: 0 => 0.1
AIPS 1: (3) Back start of flagging
AIPS 1: <0 => no padding (0 seconds)
AIPS 1: 0 => 5 seconds [default]
AIPS 1: >0 => APARM(3) seconds
In this case, I'm flagging the last third of a minute in each scan. If you wanted to flag the first part of a scan, you would set
OPCODE = 'BEG'. The Dec07 version of QUACK is really different and I don't understand it yet. Maybe someone can write in with pointers about it?
Good. Next, I like to look at my data in TVFLG and give it a quick flag. Here are some important parameters to consider before your run TVFLG.
SOURCES-- only look at one calibrator at a time in TVFLG. Otherwise your scale will be all messed up and you'll be confused.
TIMERANG-- You really really want all of your data to be able to fit with a smooth time of 10 seconds. What will happen is that if there is too much time spent on your source, AIPS will force you to average your data for multiples of 10s, and this is bad. Because you will flag your data, and think you got rid of the really bright points, but then you will look at all the visibilities in UVPLT and still see lots of bright points. You will be in for far fewer nasty surprises if you make sure smooth time is 10s (In the TVFLG window, it should say AVG 1). Therefore, if you're getting AVG > 1, you should probably break your data up and view it several times in TVFLG with different timeranges. You probably won't know if you need to set a timerange until you load up TVFLG once, and see how much data there is.
DOCAL = 2-- apply weights to your data before you view them in TVFLG.
AIPS 1: TVFLG: Task to edit UV data using the TV display and cursor
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: USERID 0 User number.
AIPS 1: INNAME 'AC825_FQ1' UV data (name).
AIPS 1: INCLASS 'CH 0' UV data (class).
AIPS 1: INSEQ 1 UV data (seq. #). 0 => high
AIPS 1: INDISK 1 Disk unit #. 0 => any
AIPS 1: DOCAT 0 Catalog work file ?
AIPS 1: IN2SEQ 1 Sequence number of work file
AIPS 1: IN2DISK 1 Disk number of work file
AIPS 1: DOHIST -1 Record flags in history file
AIPS 1: SOURCES '1331+305' Source list
AIPS 1: *rest ' '
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: TIMERANG *all 0 Time range to include
AIPS 1: STOKES ' ' Stokes type to display
AIPS 1: SELBAND -1 Bandwidth to select (kHz)
AIPS 1: SELFREQ -1 Frequency to select (MHz)
AIPS 1: FREQID 0 Freq. ID to select.
AIPS 1: BIF 0 Lowest IF number 0=1
AIPS 1: EIF 0 Highest IF number
AIPS 1: BCHAN 0 Lowest channel number 0=>1
AIPS 1: ECHAN 0 Highest channel number
AIPS 1: ANTENNAS *all 0 Antennas to include
AIPS 1: BASELINE *all 0 Baselines with ANTENNAS
AIPS 1: UVRANGE 0 0 UV range in kilolambda
AIPS 1: SUBARRAY 0 Subarray, 0 => all, but the
AIPS 1: task is more efficient doing
AIPS 1: one at a time
AIPS 1: Cal. info for input:
AIPS 1: DOCALIB 2 If >0 calibrate data
AIPS 1: = 2 calibrate weights
AIPS 1: GAINUSE 1 CAL (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 1 Flag table version 0 => high
AIPS 1: < 0 no flagging on input
AIPS 1: Used w single-source too
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 0 Bandpass table version
AIPS 1: SMOOTH *all 0 Smoothing function. See
AIPS 1: HELP SMOOTH for details.
AIPS 1: DPARM 0 0 Control info:
AIPS 1: 0 0 (1) 0=amp, 1=phase, 2=rms,
AIPS 1: 10 10 3=rms/mean for initial
AIPS 1: *rest 0 display, can choose any
AIPS 1: interactively later
AIPS 1: (2) > 0 include autocorr data
AIPS 1: (3) >0 = baseline as ant pair
AIPS 1: for B as x-axis only
AIPS 1: (4) >0 => divide by source
AIPS 1: IPOL flux
AIPS 1: (5) Expand time ranges by
AIPS 1: DPARM(5) in sec
AIPS 1: (6) y-axis interval: give the
AIPS 1: sample time in seconds.
AIPS 1: default = 10 seconds.
AIPS 1: (7) initial IF displayed, 0
AIPS 1: => BIF, can choose BIF -
AIPS 1: EIF interactively
AIPS 1: (8) initial channel displayed
AIPS 1: 0 => BCHAN, can choose
AIPS 1: BCHAN - ECHAN later
AIPS 1: interactively
AIPS 1: (9,10) pixrange for initial
AIPS 1: TV load - can reset later
AIPS 1: interactively
AIPS 1: BADDISK *all 0 Disks to avoid for scratch
AIPS 1: and for master grid file.
Make sure that you look at all your channels, polarizations, and IFs. I like the 'clip interactively' command a lot for getting rid of high or low points.
I recently (finally!) figured out how to invert the scale in TVFLG, so that low points appear bright. Use the 'tvtransf' option, type an 'a' to get an option to change the contrast/brightness of the image. A little square will pop up. Type 'c' now to invert the image, and then move your mouse around with the button held down to get an image stretch you like. Tah Dah!
One useful note: You have to set the Stokes Flag in terms of 0's and 1's, and this is what the binary code means:
1000-- flag only right polarization
0100--flag only left polarization
1111--flag both polarizations
NOTE: TVFLG can take a long time to load if you have lots of channels or data. It's usually pretty fast for the calibrators, because you don't usually spend much time on them. But while TVFLG is loading up your target data (no, we're not there yet), you might want to go eat lunch. Depending on the data set.
Finally, double check everything in UVPLT. Beware, UVPLT likes to plot data in terms of Stokes I, which is quite confusing. Choose to plot STOKES = 'RR' or 'LL' for more clarity. BPARM is the important set of parameters which mostly determine what you're plotting. BPARM = 0 is a good place to start, as this plots amplitude against the length of your baselines.
Posted by
Laura
at
3:20 PM
2
comments
Labels: flagging, Wisconsin Banana Recipes
Sunday, May 27, 2007
WBR Step 5C. Flag Your Calibrators
Ok, 'C' stands for continuum. There are slightly different calibration steps for deep continuum data; I'm going to follow the tips for L-Band data reduction given at this VLA website. That means we won't be using the CH 0 data, we'll be making our own Channel 0 after we bandpass-calibrate the line data. But I'm getting ahead of myself. What we have to do first is flag our calibrators. I like to only flag the calibrators very lightly, then calibrate them, and then flag more heavily on the calibrated data.
First, you should know that flagging is really a matter of personal taste. This is the way I like to do it, but you might find something that you like a whole lot more.
Secondly, don't be surprised when flagging is by far the most time consuming aspect of interferometric data reduction. Especially if you're screwing around with data from the VLA as it is transitioning to the EVLA.
Thirdly, at least at this stage, only flag on amplitude. After some calibration, you might consider flagging on phase, but not yet.
Fourthly, before you calibrate, I recommend you only flag on dramatically bad looking amplitudes. Don't get too selective yet.
So, as I mentioned above, let's run all of the below commands on the line data. This is more work for you, as you have to look at each channel, but it seems to be the more meticulous way of doing it. If you prefer, I guess you could flag on your CH 0 data, then just copy over the flag (FG) table (using TACOP) to the LINE data set. That might be faster. But you still should probable do a brief run through each channel to make sure there's nothing really glaring that you missed, when you averaged all the channels together.
A good place to start flagging is QUACK. QUACK flags the beginning of each scan of data, because often times the first little bit of time on an object is bad. QUACK from the 31Dec05 release of AIPS was really quite transparent, with parameters looking like this:
AIPS 1: QUACK Flags specified portion of scans of UV data
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME 'AC825_FQ1' Input UV file name (name)
AIPS 1: INCLASS 'LINE' Input UV file name (class)
AIPS 1: INSEQ 1 Input UV file name (seq. #)
AIPS 1: INDISK 1 Input UV file disk unit #
AIPS 1: SOURCES *all ' ' Sources selected/deselected
AIPS 1: SUBARRAY 0 Subarray number 0=>all.
AIPS 1: SELBAND -1 Bandwidth to flag (kHz)
AIPS 1: SELFREQ -1 Frequency to flag (MHz)
AIPS 1: FREQID 1 Freq. ID to flag. -1=>all.
AIPS 1: 0=> first Freq. ID.
AIPS 1: TIMERANG *all 0 Time: start day,hr,min,sec
AIPS 1: stop day,hr,min,sec.
AIPS 1: ANTENNAS *all 0 Antennas to flag
AIPS 1: FLAGVER 0 Flag table version number
AIPS 1: OPCODE 'ENDB' 'END ', 'BEG ', 'ENDB'
AIPS 1: 'TAIL'; ' ' => 'BEG '
AIPS 1: REASON *all ' ' Reason (24 char.)
AIPS 1: APARM 0 .33 (1) => Cutting time (min)
AIPS 1: *rest 0 from end (ENDG) 0 => 2
AIPS 1: (2) => Cutting time (min)
AIPS 1: from beg/end (BEGB/ENDB)
AIPS 1: 0 => 0.1
AIPS 1: (3) Back start of flagging
AIPS 1: <0 => no padding (0 seconds)
AIPS 1: 0 => 5 seconds [default]
AIPS 1: >0 => APARM(3) seconds
In this case, I'm flagging the last third of a minute in each scan. If you wanted to flag the first part of a scan, you would set
OPCODE = 'BEG'. The Dec07 version of QUACK is really different and I don't understand it yet. Maybe someone can write in with pointers about it?
Good. Next, I like to look at my data in TVFLG and give it a quick flag. Here are some important parameters to consider before your run TVFLG.
SOURCES-- only look at one calibrator at a time in TVFLG. Otherwise your scale will be all messed up and you'll be confused.
TIMERANG-- You really really want all of your data to be able to fit with a smooth time of 10 seconds. What will happen is that if there is too much time spent on your source, AIPS will force you to average your data for multiples of 10s, and this is bad. Because you will flag your data, and think you got rid of the really bright points, but then you will look at all the visibilities in UVPLT and still see lots of bright points. You will be in for far fewer nasty surprises if you make sure smooth time is 10s (In the TVFLG window, it should say AVG 1). Therefore, if you're getting AVG > 1, you should probably break your data up and view it several times in TVFLG with different timeranges. You probably won't know if you need to set a timerange until you load up TVFLG once, and see how much data there is.
DOCAL = 2-- apply weights to your data before you view them in TVFLG.
AIPS 1: TVFLG: Task to edit UV data using the TV display and cursor
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: USERID 0 User number.
AIPS 1: INNAME 'AC825_FQ1' UV data (name).
AIPS 1: INCLASS 'CH 0' UV data (class).
AIPS 1: INSEQ 1 UV data (seq. #). 0 => high
AIPS 1: INDISK 1 Disk unit #. 0 => any
AIPS 1: DOCAT 0 Catalog work file ?
AIPS 1: IN2SEQ 1 Sequence number of work file
AIPS 1: IN2DISK 1 Disk number of work file
AIPS 1: DOHIST -1 Record flags in history file
AIPS 1: SOURCES '1331+305' Source list
AIPS 1: *rest ' '
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: TIMERANG *all 0 Time range to include
AIPS 1: STOKES ' ' Stokes type to display
AIPS 1: SELBAND -1 Bandwidth to select (kHz)
AIPS 1: SELFREQ -1 Frequency to select (MHz)
AIPS 1: FREQID 0 Freq. ID to select.
AIPS 1: BIF 0 Lowest IF number 0=1
AIPS 1: EIF 0 Highest IF number
AIPS 1: BCHAN 0 Lowest channel number 0=>1
AIPS 1: ECHAN 0 Highest channel number
AIPS 1: ANTENNAS *all 0 Antennas to include
AIPS 1: BASELINE *all 0 Baselines with ANTENNAS
AIPS 1: UVRANGE 0 0 UV range in kilolambda
AIPS 1: SUBARRAY 0 Subarray, 0 => all, but the
AIPS 1: task is more efficient doing
AIPS 1: one at a time
AIPS 1: Cal. info for input:
AIPS 1: DOCALIB 2 If >0 calibrate data
AIPS 1: = 2 calibrate weights
AIPS 1: GAINUSE 1 CAL (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 1 Flag table version 0 => high
AIPS 1: < 0 no flagging on input
AIPS 1: Used w single-source too
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 0 Bandpass table version
AIPS 1: SMOOTH *all 0 Smoothing function. See
AIPS 1: HELP SMOOTH for details.
AIPS 1: DPARM 0 0 Control info:
AIPS 1: 0 0 (1) 0=amp, 1=phase, 2=rms,
AIPS 1: 10 10 3=rms/mean for initial
AIPS 1: *rest 0 display, can choose any
AIPS 1: interactively later
AIPS 1: (2) > 0 include autocorr data
AIPS 1: (3) >0 = baseline as ant pair
AIPS 1: for B as x-axis only
AIPS 1: (4) >0 => divide by source
AIPS 1: IPOL flux
AIPS 1: (5) Expand time ranges by
AIPS 1: DPARM(5) in sec
AIPS 1: (6) y-axis interval: give the
AIPS 1: sample time in seconds.
AIPS 1: default = 10 seconds.
AIPS 1: (7) initial IF displayed, 0
AIPS 1: => BIF, can choose BIF -
AIPS 1: EIF interactively
AIPS 1: (8) initial channel displayed
AIPS 1: 0 => BCHAN, can choose
AIPS 1: BCHAN - ECHAN later
AIPS 1: interactively
AIPS 1: (9,10) pixrange for initial
AIPS 1: TV load - can reset later
AIPS 1: interactively
AIPS 1: BADDISK *all 0 Disks to avoid for scratch
AIPS 1: and for master grid file.
Make sure that you look at all your channels, polarizations, and IFs. I like the 'clip interactively' command a lot for getting rid of high or low points.
I recently (finally!) figured out how to invert the scale in TVFLG, so that low points appear bright. Use the 'tvtransf' option, type an 'a' to get an option to change the contrast/brightness of the image. A little square will pop up. Type 'c' now to invert the image, and then move your mouse around with the button held down to get an image stretch you like. Tah Dah!
One useful note: You have to set the Stokes Flag in terms of 0's and 1's, and this is what the binary code means:
1000-- flag only right polarization
0100--flag only left polarization
1111--flag both polarizations
NOTE: TVFLG can take a long time to load if you have lots of channels or data. It's usually pretty fast for the calibrators, because you don't usually spend much time on them. But while TVFLG is loading up your target data (no, we're not there yet), you might want to go eat lunch. Depending on the data set.
Finally, double check everything in UVPLT. Beware, UVPLT likes to plot data in terms of Stokes I, which is quite confusing. Choose to plot STOKES = 'RR' or 'LL' for more clarity. BPARM is the important set of parameters which mostly determine what you're plotting. BPARM = 0 is a good place to start, as this plots amplitude against the length of your baselines.
Posted by
Laura
at
5:31 AM
2
comments
Labels: flagging, Wisconsin Banana Recipes
WBR Step 4. One File per Each Day of Observations
Sometimes, your data is taken over multiple days. You want to calibrate each day separately. You can do this by setting 'timerang' in calib, but that scares me a little bit and has lots of room for mistakes. What I prefer to do is SPLIT off each day of observing, so that you'll have a UV file for each day of data. After you've calibrated each file individually, you can combine all the data back together using DBCON.
So how do you split your data according to observation day?
Using SPLIT!
Well, first of all, check in that scan list you got from LISTR to see what days you observed on.
Then run split with 'timerang' set to only include one of those days. For example, only include data taken on day 1:
timerang = 1 0 0 0 1 23 0 0
will include all data take on day 1 between 0 hr and 23 hr.
Everything else in SPLIT you will probably want to leave as default. Except for maybe 'outclass', which you could change to something like, say, 'line_1' (so that you remenber this is the line data from day 1).
SPLIT will generate a new UV file. You need to run INDXR on it to generate a new NX table. The defaults of INDXR are just fine for these purposes.
Unfortunately, you are going to have to do each of the following flagging/calibration steps for each file individually. Sorry, dudes.
Posted by
Laura
at
5:00 AM
1 comments
Labels: calibration, Wisconsin Banana Recipes
Thursday, May 17, 2007
WBR Step 3: Choosing a Reference Antenna
At several steps in your data calibration, AIPS is gonna ask you for a REFANT, a reference antenna. So we might as well choose one now!
First of all, run PRTAN to view your antenna setup. Really the only thing you need to do here is tell PRTAN to write to file (DOCRT = -1) and give it a file name (in OUTPRINT)
>tget prtan
>inp
AIPS 1: PRTAN: Task to print the Antenna (AN) extension of a uv file.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: USERID 0 Image owner ID number
AIPS 1: INNAME 'MULTI4.8' Image name (name)
AIPS 1: INCLASS 'CH0' Image name (class)
AIPS 1: INSEQ 1 Image name (seq. #)
AIPS 1: INDISK 1 Disk drive #
AIPS 1: INVERS 0 AN file ver. #
AIPS 1: NPRINT 0 No. records to print 0 => all
AIPS 1: DOCRT -1 > 0 => use terminal instead
AIPS 1: > 72 => terminal width
AIPS 1: OUTPRINT 'ANT.TXT'
AIPS 1: Printer disk file to save
In the outputted file, you'll get a cute little map of your antenna locations that looks like this:
Location Of VLA Antennas
N18 ( 1)
N16 (26)
N14 (24)
N12 ( 5)
N8 ( 9)
N4 ( 7)
N2 (27)
N1 (25)
(20) W2 E2 ( 3)
( 8) W4 E4 (15)
(23) W6 E6 (12)
( 6) W8 E8 (10)
( ) E10 ( 2)
(21) W12 E12 (17)
( 4) W14 ( )
(11) W16 E16 (19)
(22) W18 E18 (28)
VLA:OUT (13)
VLA:OUT (14)
VLA:OUT (16)
VLA:OUT (18)
VPT:OUT (29)
(Yeah, this is data during the EVLA upgrade so there are quite a few dishes missing). For your reference antenna, you are going to want to pick a dish near the center of the array, but not exactly at the center (the centermost ones suffer most from RFI). You are also going to want to choose a dish that never crashed during the course of your observations. A good way to see what dishes went down during your observations is to download the observing logs. See if there are any notes from the telescope operator about the dish you are considering using as your REFANT.
Finally, you can take a quick look at the amplitudes of the data using the 'MATX' mode of LISTR. This will spit out amplitudes of your data (on each baseline) averaged over a given time increment. Sometimes you will see really anomalous amplitudes for a given antenna over some timerange (like, an order of magnitude off). If you see something really fishy for the dish you are considering for your REFANT, don't use it. Find a different REFANT that does not have crazy amplitudes.
So, to create such a file of amplitudes, run LISTR setting these parameters:
OPTYPE = 'MATX'
DOCAL = 2 (apply weights)
DPARM(1) = 0 (list amplitudes)
DPARM(4) = 0 (will list amplitudes averaged over the entire scan. You can change this if you want.)
DOCRT = -1 (write to file)
OUTPRINT = 'CHK_ANT.TXT'
you could also specify a source, say your Phase Calibrator, if you want.
If an antenna passes all of these tests, than it's probably a decent REFANT!
Posted by
Laura
at
3:26 PM
1 comments
Labels: calibration, Wisconsin Banana Recipes
WBR Step 2. Looking at the Contents of Your Data
So you've loaded in your data and you have a nice CH 0 file and a LINE file. Now what? You probably want to know what frequency your data was taken at, how many channels it has, what sources were observed, etc. See below for how to extract this information from the AIPS maze.
First, let's look at the header of one of these data files. If you type "uc", you will have a list of all the uv files. The first column lists the catalog number of each data file. Like this:
>uc
AIPS 1: Catalog on disk 1
AIPS 1: Cat Usid Mapname Class Seq Pt Last access Stat
AIPS 1: 1 53 MULTI4.8 .CH0 . 1 UV 15-JUN-2006 14:16:14
AIPS 1: 2 53 MULTI4.8 .LINE . 1 UV 23-MAR-2007 00:32:51
If I want to access and screw around with the CH0 data set, I would type 'getn 1', because '1' is the CAT number for this data set. Then, to view the header, just type 'imh'.
#getn 1
AIPS 1: Got(1) disk= 1 user= 53 type=UV MULTI4.8.CH0.1
>imh
AIPS 1: Image=MULTI (UV) Filename=MULTI4.8 .CH0 . 1
AIPS 1: Telescope=VLA Receiver=VLA
AIPS 1: Observer=AW649 User #= 53
AIPS 1: Observ. date=15-MAY-2005 Map date=02-DEC-2005
AIPS 1: # visibilities 1009820 Sort order TB
AIPS 1: Rand axes: UU-L-SIN VV-L-SIN WW-L-SIN BASELINE TIME1
AIPS 1: SOURCE FREQSEL WEIGHT SCALE
AIPS 1: ----------------------------------------------------------------
AIPS 1: Type Pixels Coord value at Pixel Coord incr Rotat
AIPS 1: COMPLEX 1 1.0000000E+00 1.00 1.0000000E+00 .00
AIPS 1: FREQ 1 4.8851000E+09 1.00 1.5625000E+07 .00
AIPS 1: STOKES 2 -1.0000000E+00 1.00 -1.0000000E+00 .00
AIPS 1: IF 2 1.0000000E+00 1.00 1.0000000E+00 .00
AIPS 1: RA 1 00 00 0 .000 1.00 3600.000 .00
AIPS 1: DEC 1 00 00 0 .000 1.00 3600.000 .00
AIPS 1: ----------------------------------------------------------------
AIPS 1: Coordinate equinox 2000.00
AIPS 1: Maximum version number of extension files of type HI is 1
AIPS 1: Maximum version number of extension files of type AN is 1
AIPS 1: Maximum version number of extension files of type NX is 1
AIPS 1: Maximum version number of extension files of type SU is 1
AIPS 1: Maximum version number of extension files of type FQ is 1
AIPS 1: Maximum version number of extension files of type CL is 1
AIPS 1: Maximum version number of extension files of type TY is 1
AIPS 1: Maximum version number of extension files of type WX is 1
AIPS 1: Maximum version number of extension files of type OF is 1
AIPS 1: Keyword = 'OBSCHANS' value = 8
AIPS 1: Keyword = 'CORRMODE' value = '4 '
AIPS 1: Keyword = 'SELCHANS' value = 7
AIPS 1: Keyword = 'VLAIFS ' value = 'ABCD '
This header tells me all sorts of useful things, like that my data was taken at 4.8 GHz, and that there are 2 polarizations ('STOKES') and 2 IFs (What is an IF? Basically, if you observe at 2 IFs, it's like observing at 2 slightly different frequencies. So, for example, if I was observing the OH molecular lines at 1665 and 1667 MHz, I could put one IF down on each line. In continuum, you get twice the bandwidth if you have 2 IFs!). It also tells me that there is only 1 channel in this file (FREQ 1), which there should be because it's CH0! However, it does tell me further down that the observation was set up to have 7 channels ('SELCHANS' value = 7), so I can expect that in the LINE data.
Next up, you can see what sources were observed and when if you run LISTR. The important parameter to set here is:
OPTYPE = 'scan'
Also, you probably want LISTR to write out to a file, so set
DOCRT = -1
OUTPRINT = 'filename'
Most everything else can be left as default for now.
AIPS 1: LISTR: Task to print UV data and calibration tables.
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: USERID 0 User number.
AIPS 1: INNAME 'MULTI4.8' UV data (name).
AIPS 1: INCLASS 'CH0' UV data (class).
AIPS 1: INSEQ 1 UV data (seq. #). 0 => high
AIPS 1: INDISK 1 Disk unit #. 0 => any
AIPS 1: OPTYPE 'SCAN' List type:
AIPS 1: 'MATX','LIST','GAIN','SCAN'
AIPS 1: INEXT 'CL' CL, SN or TY table for 'GAIN'
AIPS 1: INVER 0 CL, Sn or TY table version
AIPS 1: SOURCES *all ' ' Source list
AIPS 1: CALCODE ' ' Calibrator code ' '=>all
AIPS 1: TIMERANG *all 0 Time range to list
AIPS 1: STOKES 'HALF' Stokes type to list.
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: None selected => 1.
AIPS 1: BIF 1 Lowest IF number 0=1
AIPS 1: EIF 2 Highest IF number
AIPS 1: BCHAN 1 Low channel number 0=>1
AIPS 1: ECHAN 0 High channel number
AIPS 1: ANTENNAS *all 0 Antennas to list
AIPS 1: BASELINE *all 0 Baselines with ANTENNAS
AIPS 1: UVRANGE 0 0 UV range in kilolambda
AIPS 1: SUBARRAY 0 Subarray, 0=>1
AIPS 1: Cal. info for input:
AIPS 1: DOCALIB -1 If >0 calibrate data
AIPS 1: = 2 calibrate weights
AIPS 1: GAINUSE 0 CAL (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: DPARM 5 1 Control info:
AIPS 1: *rest 0 (1) 0=amp, 1=phase, 2=rms
AIPS 1: 3=amp+rms, 4=phase+rms
AIPS 1: 5=amp+phase, 6=delay,
AIPS 1: 7=rate, 8=SNR, 9=par. ang
AIPS 1: 10 = Tsys, 11=elev,
AIPS 1: 12 = multiband delay
AIPS 1: 13 = Tant 14 = weights
AIPS 1: N.B. Options 3 and 4 only
AIPS 1: valid for OPTYPE = 'MATX'
AIPS 1: (2) 0=vec avg, 1=scalar
AIPS 1: (3) No. col (4-10) def=4.
AIPS 1: (4) avg. time min (MATX,LIST)
AIPS 1: *** significant
AIPS 1: (5) Type of gain listings:
AIPS 1: 0 => all with same scale
AIPS 1: like DEC-10 listings;
AIPS 1: 1 => scan/source info at
AIPS 1: source/scan boundaries.
AIPS 1: (6) Matrix scaling control:
AIPS 1: 0 => plot amp & rms
AIPS 1: matrices with same scale;
AIPS 1: 1 => self-scale each
AIPS 1: separately.
AIPS 1: (7) > 0 self-scale phase
AIPS 1: displays, else degrees.
AIPS 1: DOACOR -1 > 0 include autocorrelations
AIPS 1: FACTOR 0 When DPARM(5)=0 Multiply
AIPS 1: gain listings by FACTOR,
AIPS 1: 0=> use scale factor from
AIPS 1: first record printed.
AIPS 1: DOCRT -1 > 0 -> use the terminal,
AIPS 1: else use the line printer
AIPS 1: > 72 => terminal width
AIPS 1: OUTPRINT 'SCANS'
AIPS 1: Printer disk file to save
AIPS 1: BADDISK *all 0 Disk to avoid for scratch.
Now, if you look at the file 'SCANS', you should see a list of at least 3 sources. One source will be your flux calibrator; it is usually only observed once or twice per night. Another source will be your phase calibrator; it will be observed approximately every 30 minutes. And finally, there will be your target source(s)!
Look up your calibrators in the VLA Calibrator Manual . Copy to some convenient file or piece of paper the flux of your calibrators at your observing frequency, and the uvmin and uvmax.
Posted by
Laura
at
2:58 PM
1 comments
Labels: Wisconsin Banana Recipes
WBR Step 1. Loading in Your Data
Ok, I'm going to start writing an introduction and overview of how to reduce data in AIPS for our REU students this summer. I think the AIPS cookbook overview is vague and opaque, so maybe this will help fill in some gaps. Starting with...FILLM!
From the archive, you'll probably have several files with the observing code, an underscore, and a number. For example: AS755_1.
Move all of the files for your relevant observing program into a convenient directory. Start aips from there.
Now it is time to load these data into AIPS, using the task FILLM. The most important parameters to input here are:
INFILE: pwd will tell it to look for the files in the directory you just started aips from. give it the observing code and an underscore as a prefix.
VLAOBS: give it your observing code
OUTNAME: you can give your data some cute name when it is loaded into aips
DOWEIGHT = 1: you want to load in the data weights!! important!
most of the other parameters here i still don't really understand. I bet some of the time-averaging parameters under CPARM are quite useful, but I'm not sure which are most important to think about. The defaults are probably fine if you're just beginning.
AIPS 1: FILLM Task to read a VLA archive tape
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INTAPE 1 Tape drive number
AIPS 1: INFILE 'PWD:AS755_' Non-blank: disk file name
AIPS 1: NFILES 0 Number of files to advance
AIPS 1: Also applies to ON-LINE!
AIPS 1: BAND ' ' Freq. band (4,P,L,C,X,U,K,Q)
AIPS 1: QUAL -1 Source qualifier -1=>all
AIPS 1: CALCODE ' ' Calibrator code
AIPS 1: VLAOBS 'AS755' VLA obs. pgm. name ('AZ99')
AIPS 1: VLAMODE ' ' VLA obs. mode (' '=any)
AIPS 1: REFDATE ' ' Reference date. 'yyyymmdd'
AIPS 1: TIMERANG *all 0 Timerange selected
AIPS 1: BCHAN 1 First spectral channel
AIPS 1: ECHAN 0 Highest spectral channel
AIPS 1: OUTNAME ' ' Output UV file name (name)
AIPS 1: OUTSEQ 0 Output UV file name (seq. #)
AIPS 1: OUTDISK 1 Output UV file disk unit #.
AIPS 1: DOUVCOMP 1 1 (T) => compressed data
AIPS 1: DOALL -1 1 (T) => write all data.
AIPS 1: DOCONCAT -1 1 (T) => append data to old
AIPS 1: files
AIPS 1: NCOUNT 0 Number of files to read
AIPS 1: DOWEIGHT 1 Use nominal sensitivity to
AIPS 1: scale weights?
AIPS 1: = 10, use Memo 108 weights
AIPS 1: DOACOR -1 Load autocorrelation data?
AIPS 1: CPARM 0 0 User options.
AIPS 1: 0 0 1 => Avg. time (seconds)
AIPS 1: 0 0 2 => bitmap (see help)
AIPS 1: 0 1 = 16 for planets & Sun
AIPS 1: 1 0 3 => Max. OK IF status
AIPS 1: <=3 => 3
AIPS 1: 4 => Control dropping of
AIPS 1: shadowed data
AIPS 1: < 0 => no shadow check
AIPS 1: 0 => 25 m limit
AIPS 1: > 0 => Shadow limit is
AIPS 1: CPARM(4) in meters
AIPS 1: 5 = channel code (see HELP)
AIPS 1: 6 => Subarray number-see HELP
AIPS 1: 7 => FQ entry tolerance (kHz)
AIPS 1: (see HELP)
AIPS 1: 8 => CL table time incr. min
AIPS 1: 9 => TY table time incr. min
AIPS 1: 10=> Calibrator avg. time
AIPS 1: DPARM *all 0 Selection by Frequency
AIPS 1: 1+2 => A Frequency (Hz)
AIPS 1: 3+4 => B Frequency (Hz)
AIPS 1: 5+6 => C Frequency (Hz)
AIPS 1: 7+8 => D Frequency (Hz)
AIPS 1: 9 => tolerance for A&C
AIPS 1: 10 => tolerance for B&D
AIPS 1: BPARM *all 0 Opacity and Gain curve
AIPS 1: control (see help)
AIPS 1: IN2FILE *all ' ' Antenna gains file
Watch the output and make sure AIPS read in the data from all of your files. After FILLM successfully runs, if you type "uc", you should see two files: one CH 0 and one LINE. The CH 0 data is basically the line data with the channels averaged together (well, the central 75% of channels). CH 0 data may be useful for calibration.
Posted by
Laura
at
2:31 PM
3
comments
Labels: importing data, Wisconsin Banana Recipes