VLA ANGST AIPS Reduction Recipe ================================ Based on LITTLE THINGS AIPS Reduction of DDO47 recipe, B config. There are a lot of calibration checks at the end which are either optional or impossible for people with slow network connections. Running IMAGR on the calibrators is not necessary. Running UVPLT on the LINCOP galaxy data takes a really long time. Beware! 1) FILLM - Reads the data into AIPS. DEFAULT FILLM INTAPE 1; NFILES 0; BAND ' '; QUAL -1; CALCODE ' '; VLAOBS ' '; VLAMODE ' '; REFDATE ' '; TIMERANG 0; BCHAN 1; ECHAN 0; OUTNAME ' '; DOUVCOMP -1; DOCONCAT -1; NCOUNT 0; DOACOR -1; CPARM 0; DPARM 0; BPARM -1, -1; IN2FILE ' '; OUTDISK 5; DOALL -1 $ restricts FILLM to the galaxy+calibrators of $ interest NFILES 0; NCOUNT 0 $ read all raw_ files DOUVCOMP= -1 $ allow channel/IF-dependent weights DOWEIGHT 10 $ use memo 108 weights (i.e., put weights in 1/Jy^2) BPARM= -1,-1 $ avoid opacity & gain corrections CPARM 0 CPARM(7)= 0.1 $ assigns new FREQID if frequency changes by more than $ 0.1 kHz. Doppler shift between sources 180 degrees $ apart. Setting this to -1 forces all data to have $ same FREQID. CPARM(4)=25.1 $ for shadowing to work properly DOCONCAT=-1 $ Change this to DOCONCAT=1 to add data to an $ existing file infile 'red:/raw_ ***N.B. FILLM's channel 0 will ONLY be used for initial flagging. 2a) LISTR/SCAN *** *** Figure out if you need to UVCOP a FREQID. *** DEFAULT LISTR INDISK 5; INEXT ''; INVER 0; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOCALIB -1; GAINUSE 0; DOPOL -1; BLVER -1; FLAGVER 0; DOBAND -1; BPVER -1; SMOOTH 0; DPARM 0; DOACOR -1; FACTOR 0; BADDISK 0; OPTYPE 'scan' DOCRT 132 $ if you want a file: docrt -1 OUTPR '' $ and: $ outpr ':.listr getn () $ *.CH 0 2b) UVCOP -> CH 0 *** Copy out correct FREQID on the channel 0 data. DEFAULT UVCOP INDISK 5; OUTNAME ''; OUTSEQ 0; SELBAND -1; SELFREQ -1; FREQID -1; BCHAN 1; ECHAN 0; BIF 0; EIF 0; SOURCES ' '; QUAL -1; UVRANGE 0, 0; TIMERANG 0; ANTENNAS 0; BASELINE 0; SUBARRAY 0; FLAGVER 0; UVCOPPRM 0; NCOUNT 0; OUTCLASS 'ch 0' $ same outclass as before OUTDISK 5 $ more space in disk 5 outna '' $ ie outname 'sexa-b-j1' freqid $ choose whatever freqid you need. getn () $ *.CH 0 2c) UVCOP -> LINE *** Copy out correct FREQID on the line data. DEFAULT UVCOP INDISK 5; OUTNAME ''; OUTSEQ 0; SELBAND -1; SELFREQ -1; FREQID -1; BCHAN 1; ECHAN 0; BIF 0; EIF 0; SOURCES ' '; QUAL -1; UVRANGE 0, 0; TIMERANG 0; ANTENNAS 0; BASELINE 0; SUBARRAY 0; FLAGVER 0; UVCOPPRM 0; NCOUNT 0; OUTCLASS 'line' $ same as before. OUTDISK 5 $ more space in disk 5. outna '' $ ie outname 'sexa-b-j1' freqid $ choose whatever freqid you need. getn (+1) $ *.LINE 2d) ZAP old files. GETN (); ZAP $ original *.CH 0 GETN (+1); ZAP $ original *.LINE RECAT 3) LISTR/SCAN *** *** Copy the output of LISTR here. *** DEFAULT LISTR INDISK 5; INEXT ''; INVER 0; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOCALIB -1; GAINUSE 0; DOPOL -1; BLVER -1; FLAGVER 0; DOBAND -1; BPVER -1; SMOOTH 0; DPARM 0; DOACOR -1; FACTOR 0; BADDISK 0; OPTYPE 'scan' DOCRT 132 $ if you want a file: docrt -1 OUTPR '' $ and: $ outpr ':.listr getn () $ *.CH 0 *** Make sure you copy your calibrator info from the online manual: ===> CALIBRATORS: Primary: 1331+305 = 3C286 0137+331 = 3C48 0542+498 = 3C147 Secondary: 4) UVCOP -> LINCOP.1 *** *** Discards the first and last channels *** If 127 channels total: bchan 5, echan 127-5 *** If 255 channels total: bchan 10, echan 255-10 *** *** We discard these EVIL CHANNELS because (1) they're pretty much *** useless; (2) they seem to confuse BPASS (which takes the *** solution from channel N as the initial guess for channel N+1) *** as some EVLA antennas have high spikes in the first few *** channels; (3) their noise characteristics are quite different *** from the rest of the channels, which can be confusing e.g. in *** clipping and imaging. *** DEFAULT UVCOP INDISK 5; OUTSEQ 0; OUTDISK 5; SELBAND -1; SELFREQ -1; FREQID -1; BIF 0; EIF 0; SOURCES ' '; QUAL -1; UVRANGE 0, 0; TIMERANG 0; ANTENNAS 0; BASELINE 0; SUBARRAY 0; FLAGVER 1; NCOUNT 0; OUTCLA 'LINCOP' $ new outclass to keep separate from other line data OUTDISK 5 $ more space on disk 5 UVCOPPRM 0 UVCOPPRM(4) 1 $ report progress bchan 10; $ bchan = 5 if 127 channels total echan 255-10; $ echan = 127-5 if 127 channels total getn (+1) $ *.LINE 5a) VLANT -> LINE: AN/1, CL/2 *** *** Note that VLANT can be run only for data observed from 1992 onwards. *** This is okay for VLA-ANGST because we're not using anything from before *** 1997 or something. *** As of 10oct08, VLANT only works on one FREQID at a time. This is okay *** for the non galactic-hi observations. *** DEFAULT VLANT INDISK 5; SELBAND -1; SELFREQ -1; SUBARRAY 0; GAINVER 0; freqid 1 $ choose your own freqid adventure. getn (+2) $ *.LINCOP 5b) If VLANT does not create a new CL table: *** *** If VLANT does not create a new CL table, then copy the CL table *** in slot 1 to slot 2, so we can keep the recipe uniform. *** DEFAULT TACOP INEXT 'CL'; INVER 1; NCOUNT 1; OUTVER 2; getn (+2) $ *.LINCOP geto (+2) $ *.LINCOP 6) PRTAN *** *** Print out the placement of antennas for choosing a refant. Copy *** the list to the reduction file for future reference. *** *** Choose a refant using the following algorithm: *** *** 1. must be present throughout the entire run. *** 2. should be on an "inner" pad, but NOT N1/E1/W1 (avoid *** shadowing) *** 3. NOT on the master pad (they're always weird) *** 4. NOT an EVLA antenna (can't trust 'em) *** 5. avoid the north arm in smaller configurations (shadowing) *** 6. NOT listed in any interesting way in the log file *** 7. preferably consistent with other recent runs *** 8. should be a fairly stable antenna (can't tell until *** TVFLG/CALIB of course...) *** *** REFANT => DEFAULT PRTAN DOCRT 132 getn (+2) $ *.LINCOP 7) SETJY -> SU/1 *** *** aparm(2) should correspond to the date of observation: *** if 1992 < date < 1998 aparm(2) = 2 *** if date > 1998 aparm(2) = 0 *** should be 0 for VLA-ANGST. *** *** We need to enter a flux density for each primary calibrator. *** DEFAULT SETJY INDISK 5; QUAL -1; BIF 0; EIF 0; ZEROSP; CALCODE ''; SYSVEL 0; RESTFREQ 0, 0; VELTYP ''; VELDEF ''; FREQID 1; OPTYPE 'CALC' aparm 0,0 $ data taken after 1998 sources '' getn (+2) $ *.LINCOP 8) CALRD *** *** If you haven't loaded in calibrator models, might as well do it *** now. We will load these into disk 1 so it doesn't mess up getn *** numbers. *** *** These models are in J2000 coordinates. If your data are in *** B1950, change the model images to B1950 with EPOSWITCH. *** *** *** 1331+305 = 3C286 *** 0137+331 = 3C48 *** 0542+498 = 3C147 DEFAULT CALRD OUTDISK 1; object '3c286' band 'l' DEFAULT CALRD OUTDISK 1 object '3c48' band 'l' DEFAULT CALRD OUTDISK 1 object '3c147' band 'l' 9) PRTUV *** *** Use to find integration times on calibrators and source. *** DEFAULT PRTUV INDISK 5; SOURCES ''; CHANNEL 0; BIF 0; BPRINT 1; NPRINT 0; XINC 1; UVRANGE 0, 0; CPARM 0; DPARM 0; DOCRT 132; OUTPRINT ''; DOEBAR -1; cparm(9) = 103 $ Pick a baseline.. this is baseline 1(*100) + 3 getn (+2); $ *.LINCOP 10) TVFLG -> FG/1 *** *** We are no longer QUACKing because the NX table made by FILLM is *** incorrect. Plus, it doesn't flag the on-source antennas when *** not all antennas are on-source. We will have to chop off the *** raggedy edges this creates by hand using TVFLG. *** *** We will run TVFLG once on each calibrator, individually. *** *** Within TVFLG: *** *** - Set useful defaults: *** - SMOOTH = 1 to avoid averaging date before displays *** - SCAN = 20 to use a long time for AMP/PHS DIFF *** - FLAG ALL CHANNELS *** - FLAG STOKES FULL *** - SWITCH SOURCE FLAG to ONE-SOURCE to avoid accidentally *** flagging your galaxy. Sometimes you will WANT to flag *** your galaxy, however. *** *** - Be sure to inspect both polarizations *** *** We (ie Michael Rupen!) suggest the following steps: *** *** 1) Set the above defaults *** *** 2) Flag the first integration in every scan (manual QUACK) - *** this should be the first integration AFTER most antennas are *** on source, which is why we can't use the usual QUACK. *** *** 3) Inspect the following: *** - AMPLITUDE to check for missing records or antennas *** - AMP DIFF to check for variable gains *** - PHS DIFF to check for variable atmosphere/gains *** DEFAULT TVFLG INDISK 5;DOCAT -1; IN2SEQ 0; IN2DISK 0; DOHIST -1; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; NCHAV 1; CHINC 1; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOCALIB -1; GAINUSE 2; DOPOL -1; BLVER -1; FLAGVER 1; OUTFGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; dparm(3) = 1 $ Show baselines twice, treat all antennas the $ same. this shows baseline 27-1 as well as $ 1-27 dparm(6) = 10 $ set to calibrator's integ. time in seconds $ (use prtuv to get this) source '' getn () $ *.CH 0 DEFAULT TVFLG INDISK 5;DOCAT -1; IN2SEQ 0; IN2DISK 0; DOHIST -1; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; NCHAV 1; CHINC 1; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOCALIB -1; GAINUSE 2; DOPOL -1; BLVER -1; FLAGVER 1; OUTFGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; dparm(3) = 1 $ Show baselines twice, treat all antennas the $ same. this shows baseline 27-1 as well as $ 1-27 dparm(6) = 10 $ set to calibrator's integ. time in seconds $ (use prtuv to get this) source '' getn () $ *.CH 0 10b) TVFLG *** *** Run TVFLG on the galaxy and phase calibrator to get rid of data *** where we have missing phase information. Do not flag anything *** else in the galaxy data. [ie, where a phase calibrator does not *** bracket the galaxy.] *** DEFAULT TVFLG INDISK 5;DOCAT -1; IN2SEQ 0; IN2DISK 0; DOHIST -1; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; NCHAV 1; CHINC 1; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOCALIB -1; GAINUSE 2; DOPOL -1; BLVER -1; FLAGVER 1; OUTFGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; dparm(3) = 1 $ Show baselines twice, treat all antennas the $ same. this shows baseline 27-1 as well as $ 1-27 dparm(6) = 10 $ set to calibrator's integ. time in seconds $ (use prtuv to get this) source '', '' getn () $ *.CH 0 11) UVFLG -> FG/1 *** *** Toss the EVLA-EVLA baselines, to avoid dealing with aliasing. *** *** IF you are using archival data with no EVLA antennas, DO NOT *** RUN THIS. Check that "print evla" != 0. *** DEFAULT UVFLG INDISK 5; INFILE ''; SOURCES ''; SUBARRAY 0; SELBAND -1; SELFREQ -1; FREQID 1; TIMERANG 0; BCHAN 1; ECHAN 0; BIF 0; EIF 0; ANTENNA=EVLA; BASELINE=EVLA; STOKES ''; OUTFGVER 1; APARM 0; OPCODE 'FLAG'; REASON 'EVLA'; DOHIST -1; getn () $ *.CH 0 12) TABED -> FG/1 *** *** Instead of TACOP, use TABED. This way we can guarantee that *** flags are applied to the correct freqid. This is more of an *** issue for the multi-freqid galactic HI data, but we will add it *** in here to be consistent. This will also copy the table to a *** new catalog number (ie, the lincop data). *** DEFAULT TABED INDISK 5 OUTDISK 5 OPTY 'REPL' $ replace entry INEXT 'FG' $ in flag table INVER 1 ; NCOUNT 1 ; OUTVER 1 APARM 0 APARM(1) 3 $ Changing column 3 = FREQID KEYVAL= -1,0 $ ...to FREQID= -1 getn () $ *.CH 0 getona (+2) $ *.LINCOP 13) BPASS *** *** This is a first-order BPASS leading to a new Channel 0. The *** goal here is to avoid closure errors in channel 0 calibration *** due to huge delays (phase slopes) on VLA-EVLA baselines. *** *** We divide each visibility by the vector average of the inner *** 3/4 of the band (ie, an on-the-fly channel 0). Thus we remove *** source structure (though we are getting the weights wrong) and *** take care of the amplitude scale. *** *** This is where the recipe becomes substantially different for *** observations with galactic HI. *** DEFAULT BPASS INDISK 5; QUAL -1; CALCODE '*'; UVRANG 0, 0; TIMERANG 0; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; SUBARRAY 0; ANTENNAS 0; IN2NAME ''; IN2CLASS ''; IN2SEQ 0; IN2DISK 0; INVERS 0; NCOMP 0; FLUX 0; NMAPS 0; CMETHOD ''; SMODEL 0; DOCALIB 1; GAINUSE 2; DOPOL -1; BLVER -1; FLAGVER 1; DOBAND -1; BPVER 1; REFANT 0; OUTVERS 0; SMOOTH 0; ANTWT 0; WEIGHTIT 0; MINAMPER 1; MINPHSER 1; BPASSPRM 0; ICHANSEL 0; SPECINDX 0; IN3NAME ''; IN3CLASS ''; IN3SEQ 0; IN3DISK 0; BADDISK 0; DOCAL 1; GAINUSE 2; $ Apply VLANT changes. Probably irrelevant. FLAGVER 1 $ Apply initial flags. SOLINT 0 $ One solution per scan MINAMPER 7; MINPHSER 7 $ Report closures > 7%/7d SMOOTH 0 $ no smoothing SOLTYPE ''; WEIGHTIT 0 $ L1, L1R, etc. seem LESS stable. weird. BPASSPRM 0 BPASSPRM(5) 0 $ derive channel 0 on a record-by-record $ basis - more biased than averaging $ first but avoids some subtle pitfalls $ (see EXPLAIN file) BPASSPRM(2) 1 $ some closure info is printed BPASSPRM(6) 2 $ print avg. closure errors > 2% BPASSPRM(7) 2 $ print avg. closure errors > 2d ICHANSEL 0 $ derive channel 0 from inner 3/4 of band calsour '','' $ Select bandpass calibrators refant $ first time you put this in. getn (+2) $ *.LINCOP 14a) POSSM *** *** Check bandpass solutions by plotting the BP table. *** DEFAULT POSSM INDISK 5; QUAL -1; CALCODE ''; SELBAND -1; SELFREQ -1; FREQID 1; UVRANG 0, 0; TIMERANG 0; STOKES ''; BIF 0; EIF 0; BCHAN 1;ECHAN 0; SUBARRAY 0; ANTENNAS 0; BASELINE 0; DOCALIB -1; GAINUSE 2; DOPOL -1; BLVER -1; DOBAND -1; BPVER 1; SMOOTH 0; SHIFT 0, 0; CODETYPE ''; POLPLOT ''; BPARM 0; OUTFILE ''; LTYPE 3; FACTOR 0; XYRATIO 0; BADDISK 0; GRCHAN 0; FLAGVER 1 APARM 0, 1, 0.7, 1.3, -180, 180, 0, 2, 0, 0 $ Plot BP, with amp/ph ranges SOURCE '0137+331','0542+498','1331+305','' $ POSSM doesn't work with $ source '' for some reason! SOLINT -1 $ Separate plots for each scan NPLOTS 9 $ 9 plots per page BPARM 0 DOTV 1 FREQID 1; BPVER 1; getn (+2) $ *.LINCOP tvinit 14b) POSSM *** *** Check bandpass solutions by applying BP table to the secondary *** calibrator and plot individual baselines. *** *** I'm not sure what we're looking for but we'll keep it in the recipe. DEFAULT POSSM INDISK 5; QUAL -1; CALCODE ''; SELBAND -1; SELFREQ -1; FREQID 1; UVRANG 0, 0; TIMERANG 0; STOKES ''; BIF 0; EIF 0; BCHAN 1;ECHAN 0; SUBARRAY 0; ANTENNAS 0; BASELINE 0; DOCALIB -1; GAINUSE 2; DOPOL -1; BLVER -1; DOBAND -1; BPVER 1; SMOOTH 0; SHIFT 0, 0; CODETYPE ''; POLPLOT ''; BPARM 0; OUTFILE ''; LTYPE 3; FACTOR 0; XYRATIO 0; BADDISK 0; GRCHAN 0; FLAGVER 1 APARM 0 $ Plot data SOLINT -1 $ Separate plots for each scan NPLOTS 9 $ 9 plots per page APARM 0 APARM(1) 1 $ vector average DOCAL 1 ; GAINUSE 2 ; DOBAND 1 $ average all BP entries DOTV 1 FREQID 1; BPVER 1; source='','' $ Secondary (phase) calibrator getn (+2) $ *.LINCOP 14c) POSSM *** *** Apply BP table to secondary calibrator and vector-average all *** data. *** *** Your secondary calibrator should be quite flat in both *** amplitude and phase as a function of frequency, with no slope. *** If some channels are off, note which ones those are and keep an *** eye out for interference or other bad data. *** If there are large errors consider running BPASS on the *** secondary calibrator and using that to correct the galaxy. Note *** that this will be somewhat painful since AIPS does not allow *** incremental BP tables -- unlike SN or CL tables. Sigh. *** DEFAULT POSSM INDISK 5; QUAL -1; CALCODE ''; SELBAND -1; SELFREQ -1; FREQID 1; UVRANG 0, 0; TIMERANG 0; STOKES ''; BIF 0; EIF 0; BCHAN 1;ECHAN 0; SUBARRAY 0; ANTENNAS 0; BASELINE 0; DOCALIB -1; GAINUSE 2; DOPOL -1; BLVER -1; DOBAND -1; BPVER 1; SMOOTH 0; SHIFT 0, 0; CODETYPE ''; POLPLOT ''; BPARM 0; OUTFILE ''; LTYPE 3; FACTOR 0; XYRATIO 0; BADDISK 0; GRCHAN 0; FLAGVER 1 APARM 0 $ Plot data SOLINT 0 $ average all time NPLOTS 0 $ average all baselines APARM 0 APARM(1) 1 $ vector average DOCAL 1 ; GAINUSE 2 ; DOBAND 1 $ average all BP entries DOTV 1 FREQID 1; BPVER 1 $ for single-FREQID data sets source='','' $ Secondary (phase) calibrator getn (+2) $ *.LINCOP tvinit 15) AVSPC -> NEWCH0 *** *** Make a new channel 0 with AVSPC because the one created by *** FILLM is incorrect. *** *** We will use the NEWCH0 files for (1) further flagging, and *** (2) time-dependent gain calibration. *** DEFAULT AVSPC INDISK 5; SOURCES ''; QUAL -1; CALCODE ''; STOKES ''; TIMERANG 0; SELBAND -1; SELFREQ -1; FREQID 1; SUBARRAY 0; BIF 0; EIF 0; DOPOL -1; BLVER -1; BPVER 1; SMOOTH 0; DOACOR -1; OUTNAME ''; OUTCLASS ''; OUTSEQ 0; OUTDISK 5; ICHANSEL 0; AVOPTION ''; CHANNEL 0; DOBAND 1; BPVER 1 $ do bandpass calibration with $ bp table 1 DOCALIB -1; GAINUSE 0; FLAGVER -1 $ do NOT apply flags. OUTNAME inna; outcl 'NEWCH0' getn (+2) $ *.LINCOP 16) TABED: LINCOP FG/1 -> NEWCH0 FG/1 *** *** We use TABED to set FREQID -1 (apply to all FREQIDs) in the FG *** table, since AVSPC will change all FREQIDs to 1 in the NEWCH0 *** data sets. Again this is important for the galactic HI case, *** but it will tag along with this recipe. *** DEFAULT TABED INDISK 5; OUTDISK 5 OPTY 'repl' $ Replace entries INEXT 'fg' $ in flag table INVER 1 ; OUTVER 1 APARM 0 APARM(1) 3 $ Changing column 3 = FREQID KEYVAL= -1,0 $ ...to FREQID= -1 getn (+2) $ *.LINCOP geto (+3) $ *.NEWCH0.1 17a) CALIB -> flux calibrator *** *** Remember that you may have to precess the data using EPOSWITCH *** if your data are in 1950 coordinates! *** *** Run CALIB once for each flux calibrator. We should have models *** for all of them. *** *** We are not using SOLTYPE 'L1R' because it messed up the data in *** BPASS. We use L1 with WEIGHTIT 1 to give a true L1 *** minimization, says Michael Rupen. Eric Greisen also does not *** recommend using anything with an 'R' in it. *** DEFAULT CALIB INDISK 5; QUAL -1; CALCODE ''; SELBAND -1; SELFREQ -1; FREQID -1; TIMERANG 0; BCHAN 1; ECHAN 0; ANTENNAS 0; DOFIT 0; ANTUSE 0; SUBARRAY 0; UVRANGE 0; WTUV 0;DOPOL -1; BLVER -1; FLAGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; IN2NAME''; IN2CLASS ''; IN2SEQ 0; IN2DISK 0; INVERS 0; NCOMP 0; FLUX 0; NMAPS 0; CMETHOD 'DFT'; CMODEL ''; SMODEL 0; OUTNAME ''; OUTCLASS ''; OUTSEQ 0; OUTDISK 0; SOLSUB 0; SOLMIN 0;DOFLAG 0; SOLCON 0; SNVER 1; ANTWT 0; GAINERR 0; BADDISK 0; NMAP 1 ; NCOMP 1e6,0 ; INVER 1 ; CMETHOD 'DFT' DOCAL 1 ; GAINUSE 2 SOLINT 0 APARM 4,0,0,0,0,2; $ min 4 antennas; print closures SOLTYPE 'L1'; SOLMODE 'A&P'; $ not L1R WEIGHTIT 1 $ true L1 minimization MINAMPER 10; MINPHSER 10 $ complain if >10%/10d off CPARM 0,0,10,10,1 $ complain if avg > 10%/10d off SNVER 1 calsour '','' $ flux density calibrator #1 get2n $ use your model from CALRD refant $ Change this to your refant getn (+3) $ *.NEWCH0 *** *** If you have two flux calibrators, run this twice! *** 17b) CALIB -> phase calibrator *** *** Check UV restrictions for secondary calibrators carefully. *** *** If they HAVE restrictions, you may have to change WTUV to 0.01 *** CALIB finds crazy solutions. (This considers data outside of *** the allowed UVRANGE with a weight of 1%.) *** DEFAULT CALIB INDISK 5; QUAL -1; CALCODE ''; SELBAND -1; SELFREQ -1; FREQID -1; TIMERANG 0; BCHAN 1; ECHAN 0; ANTENNAS 0; DOFIT 0; ANTUSE 0; SUBARRAY 0; UVRANGE 0; WTUV 0;DOPOL -1; BLVER -1; FLAGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; IN2NAME''; IN2CLASS ''; IN2SEQ 0; IN2DISK 0; INVERS 0; NCOMP 0; FLUX 0; NMAPS 0; CMETHOD 'DFT'; CMODEL ''; SMODEL 0; OUTNAME ''; OUTCLASS ''; OUTSEQ 0; OUTDISK 0; SOLSUB 0; SOLMIN 0;DOFLAG 0; SOLCON 0; SNVER 1; ANTWT 0; GAINERR 0; BADDISK 0; NMAP 1 ; NCOMP 1e6,0 ; INVER 1 ; CMETHOD 'DFT' DOCAL 1 ; GAINUSE 2 SOLINT 0 APARM 4,0,0,0,0,2; $ min 4 antennas; print closures SOLTYPE 'L1'; SOLMODE 'A&P'; $ not L1R WEIGHTIT 1 $ true L1 minimization MINAMPER 10; MINPHSER 10 $ complain if >10%/10d off CPARM 0,0,10,10,1 $ complain if avg > 10%/10d off SNVER 1 UVRANGE 0, 0 $ if this is not 0 and you get crazy $ solutions... WTUV 0.0 $ ...then set this to 0.01 and see. calsour '','' $ phase density calibrator #1 refant $ Change this to your refant getn (+3) $ *.NEWCH0 *** *** If you need to re-run CALIB (ie, you've flagged more data), then *** delete your SN tables with extdest: *** *** default extdest; inext 'sn'; invers -1; getn (+3); extdest *** If you happen to have run GETJY as well, you need to "REJY": *** default setjy; optype 'rejy'; getn ; go setjy *** 18a) SNPLT - phase *** *** Check the phases from CALIB with SNPLT. *** *** Look for phase jumps or spikes, and flag necessary data. *** - for a spike, flag the data surrounding the spike as well as *** that calibrator scan. *** - for a jump, ONLY flag the data in between the jump (no *** calibrators) *** *** *** Make sure you run SNPLT once with a free scaling and once with *** a fixed scaling. *** DEFAULT SNPLT; INDISK 5; INEXT 'SN'; INVERS 0; SOURCES ''; QUAL -1; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; SUBARRAY 0; BIF 0; EIF 0; ANTENNAS 0; PIXRANGE 0; NPLOTS 4; XINC 1; OPTYPE 'PHAS'; OPCODE 'ALSI'; DO3COL 1; BCOUNT 1; XAXIS 0; SYMBOL 5; FACTOR 2; CUTOFF 0; LTYPE 3; DOTV 1; GRCHAN 0; getn (+3); $ *.NEWCH0 pixrange -180, 180; 18b) SNPLT -> amplitude/gains *** *** Check the gains from CALIB with SNPLT. *** *** Look for jumps or spikes, and flag necessary data. *** - for a spike, flag the data surrounding the spike as well as *** that calibrator scan. *** - for a jump, ONLY flag the data in between the jump (no *** calibrators) *** *** We have seen a couple cases where the first phase cal scan has *** a significantly diffrent amplitude gain for the EVLA *** antennas. The reason is not clear but the raw data do show this *** effect, so CALIB is doing the right thing. This area warrants *** further tests, to learn whether we should simply flag the EVLA *** antennas on the first phase calibrator scan. *** *** Make sure you run SNPLT once with a free scaling and once with *** a fixed scaling. DEFAULT SNPLT; INDISK 5; INEXT 'SN'; INVERS 0; SOURCES ''; QUAL -1; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; SUBARRAY 0; BIF 0; EIF 0; ANTENNAS 0; PIXRANGE 0; NPLOTS 4; XINC 1; OPTYPE 'AMP'; OPCODE 'ALSI'; DO3COL 1; BCOUNT 1; XAXIS 0; SYMBOL 5; FACTOR 2; CUTOFF 0; LTYPE 3; DOTV 1; GRCHAN 0; getn (+3); $ *.NEWCH0 pixrange 2 6; go snplt *** *** Now we have a loop. If calibration is not good, do some flagging. *** *** a) tvflg as before *** b) uvplt *** - amp vs. time (bparm 11, 1) - check for outliers *** - single antenna or baseline? *** - for loops through antennas: *** for i=1:28; antenna i; go uvplt; wait; end *** - real vs. imaginary (bparm 9,10) *** - check for arcs. *** - uv distance vs. weight (bparm 0, 13) *** - this will be done in ANBPL anyway. *** *** *** A gain range of 1/2 - 2 times the average is okay. EVLA gains can *** have a larger range. *** *** If you have to flag, delete your old SN tables and rerun *** CALIB. When you are satisfied, move on. *** 19a) SNPLT -> phase, plot file DEFAULT SNPLT; INDISK 5; INEXT 'SN'; INVERS 0; SOURCES ''; QUAL -1; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; SUBARRAY 0; BIF 0; EIF 0; ANTENNAS 0; PIXRANGE 0; NPLOTS 4; XINC 1; OPTYPE 'PHAS'; OPCODE 'ALSI'; DO3COL 1; BCOUNT 1; XAXIS 0; SYMBOL 5; FACTOR 2; CUTOFF 0; LTYPE 3; DOTV -1; GRCHAN 0; getn (+3); $ *.NEWCH0 19b) SNPLT -> amp, plot file DEFAULT SNPLT; INDISK 5; INEXT 'SN'; INVERS 0; SOURCES ''; QUAL -1; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; SUBARRAY 0; BIF 0; EIF 0; ANTENNAS 0; PIXRANGE 0; NPLOTS 4; XINC 1; OPTYPE 'AMP'; OPCODE 'ALSI'; DO3COL 1; BCOUNT 1; XAXIS 0; SYMBOL 5; FACTOR 2; CUTOFF 0; LTYPE 3; DOTV 1; GRCHAN 0; getn (+3); $ *.NEWCH0 19c) LISTR -> check amp/phases in non-plot form *** *** I've never found anything here that I don't see in the SNPLT *** but it may be your personal preference to run this.. *** DEFAULT LISTR; INDISK 5; OPTYPE 'GAIN'; INEXT 'SN'; INVER 1; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOCALIB -1; GAINUSE 1; DOPOL -1; BLVER -1; FLAGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; DPARM 5, 0; DOACOR -1; FACTOR 0; DOCRT 132; OUTPRINT ''; BADDISK 0; getn (+3); $ *.NEWCH0 20a) LWPLA -> save SNPLT phase plots. DEFAULT LWPLA; INDISK 5; ASPMM 0; LPEN 3; RGBGAMMA 0; FUNCTYPE ''; DPARM 0; COPIES 1; DODARK 1; OFMFILE ''; DOCOLOR 0; PLCOLORS 0; plver 1 $ this should always be one but. invers 7 $ this might change. make sure you get the right $ plots. outfile 'snplt-phase-.ps'; getn (+3); $ *.NEWCH0 20b) LWPLA -> save SNPLT amp plots. DEFAULT LWPLA; INDISK 5; ASPMM 0; LPEN 3; RGBGAMMA 0; FUNCTYPE ''; DPARM 0; COPIES 1; DODARK 1; OFMFILE ''; DOCOLOR 0; PLCOLORS 0; plver 8 $ this might change to be 7 invers 14 $ this might change to 12 outfile 'snplt-amp-.ps'; getn (+3); $ *.NEWCH0 *** *** These will be output to the /tmp directory, so: *** mv /tmp/SNPLT*.PS ***/scr3/jottangst/reduction_vla-angst/red/ *** 21) GETJY *** *** Find flux density of secondary calibrator, and set SN table *** amplitude gains to reflect a common flux density scale. *** *** For calibrators we will use " *** *** This is before SNPLT checks in order to stay consistent with *** the galactic HI case. *** DEFAULT GETJY INDISK 5; SOUCODE ''; QUAL -1; CALCODE ''; BIF 0; EIF 0; TIMERANG 0; ANTENNAS 0; SUBARRAY 0; SELBAND -1; SELFREQ -1; FREQID -1; SNVER 0; $ Use all SN tables sources '','' calsour '','' getn (+3) $ *.NEWCH0 *** *** Copy the output to the reduction script. Make sure it roughly *** matches what's given in the calibrator manual. (Some tend to *** fluctuate in amplitude, however.) *** 22a) CLCAL -> flux calibrator *** *** The primary calibrator will use SELF while the phase calibrator *** and galaxy will use SIMP. *** *** I believe that SELF allows you to use the phases throughout the *** scan (instead of an average) to figure out the correction.. *** DEFAULT CLCAL INDISK 5; GETN 4; SOUCODE '';QUAL -1; CALCODE ''; TIMERANG 0; SUBARRAY 0; ANTENNAS 0; SELBAND -1; SELFREQ -1; FREQID 1; OPCODE 'CALI'; CUTOFF 0; SAMPTYPE ''; BPARM 0; ICUT 0.1; DOBLANK 0; SMOTYPE ''; INVERS 0; BADDISK 0; INTERPOL 'SELF' GAINVER 2 ; GAINUSE 3 DOBTWEEN-1 $ Don't interpolate entries for different sources SNVER 1 sources '','' $ your flux calibrator calsour = sour refant $ Change this to your refant getn (+3) $ *.NEWCH0 22b) CLCAL -> phase calibrator *** *** *** The phase calibrator and galaxy will be CLCAL'd using SIMP *** interpolation. *** *** If your data use +/- frequency switching for the phase *** calibrator (none of ours, but some archival sets), you should *** use BPARM with SAMPTYPE='BOX' to select a smoothing time which *** covers both frequency settings. LISTR/SCAN on LINCOP will help *** you choose this; normally something like 12 minutes should be *** okay. *** DEFAULT CLCAL INDISK 5; GETN 4; SOUCODE '';QUAL -1; CALCODE ''; TIMERANG 0; SUBARRAY 0; ANTENNAS 0; SELBAND -1; SELFREQ -1; FREQID 1; OPCODE 'CALI'; SAMPTYPE ''; BPARM 0; ICUT 0.1; DOBLANK 0; SMOTYPE ''; SNVER 1; INVERS 0; BADDISK 0; INTERPOL 'SIMP' SAMPTYPE '' $ Change to 'BOX' if +/- freq switching BPARM 0 $ change to 12 (?) if +/- freq switching GAINVER 2 ; GAINUSE 3 DOBTWEEN -1 $ Don't interpolate entries for different $ sources CUTOFF 120 $ Don't extrapolate/interpolate beyond 120 $ minutes SNVER 1 sources '',''; calsour '',''; refant ; getn (+3); $ *.NEWCH0 23) ANBPL *** *** Checks data weights. Data with very high weights (factor fo *** 5-10 more than normal) should be flagged with UVFLG. *** *** Occasionally, Adrienne has seen slopes in the weights and isn't *** sure what to do about them. She thinks they may be caused by *** slopes in antenna gains over time. *** DEFAULT ANBPL INDISK 5; QUAL -1; SELBAND -1; SELFREQ -1; FREQID -1; BCHAN 1; ECHAN 0; BIF 0; EIF 0; AVGIF 0; XINC 1; UVRANGE 0 0; TIMERANG 0; STOKES ''; ANTENNAS 0; BASELINE 0; DOPOL -1; BPVER -1; DOBAND -1; BPVER -1; SMOOTH 0; SUBARRAY 0; SOLINT 0; SYMBOL 0; LTYPE 3; DOTV 1; GRCHAN 0; OUTPRINT ''; NDIG 0; DOCALIB 1;GAINUSE 3 FLAGVER 1 BPARM 2,17,0 $ Plot antenna-based weight vs. time NPLOTS 9; DOTV 1 DOCRT 132 $ Print as well as plotting weights -- useful for $ finding exact times of bad weights $ Note you can also use outprint to send to a file. OPCODE 'alsi' $ Plot all IFs together DO3COL 1 $ ...using different colors getn (+3) $ *.NEWCH0 *** *** If very high weights are found, check the screen printout to *** find the exact time, and use UVFLG to flag them. *** ==================================================================== ============== Calibration/Flagging Checks ========================= ==================================================================== 24) TVFLG *** *** TVFLG on calibrators to make sure calibration worked okay. They *** should have constant amplitude and zero phase, apart from *** source structure for the primary (flux) calibrator, and any *** uvrange for the secondary (phase) calibrators. if we see huge *** problems on the calibrators we may have to re-run CALIB, etc. *** *** Individual calibrators should be checked separately so as to *** see amplitude variations better. *** *** Within TVFLG: *** *** - Set useful defaults: *** - SMOOTH = 1 to avoid averaging date before displays *** - SCAN = 20 to use a long time for AMP/PHS DIFF *** - FLAG ALL CHANNELS *** - FLAG STOKES FULL *** - SWITCH SOURCE FLAG to ONE-SOURCE to avoid accidentally *** flagging your galaxy. Sometimes you will WANT to flag *** your galaxy, however. *** *** - Be sure to inspect both polarizations *** *** We (ie Michael Rupen!) suggest the following steps: *** *** 1) Set the above defaults *** *** 2) Inspect the following: *** - AMPLITUDE to check for missing records or antennas *** - AMP DIFF to check for variable gains *** - PHS DIFF to check for variable atmosphere/gains *** DEFAULT TVFLG INDISK 5; DOCAT -1; IN2SEQ 0; IN2DISK 0; DOHIST -1; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; NCHAV 1; CHINC 1; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOPOL -1; BLVER -1; FLAGVER 1; OUTFGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; DOCALIB 1; GAINUSE 3 $ Apply calibrations DPARM(3) = 1 $ Show baselines twice, treat all antennas the $ same. this shows baseline 27-1 as well as $ 1-27 DPARM(6) = 10 $ set to calibrator's integ. time in seconds $ (use prtuv to get this) source '','' getn (+3) $ *.NEWCH0 *** *** Make sure you run this individually for all calibrators. *** DEFAULT TVFLG INDISK 5; DOCAT -1; IN2SEQ 0; IN2DISK 0; DOHIST -1; SOURCES ''; CALCODE ''; TIMERANG 0; STOKES ''; SELBAND -1; SELFREQ -1; FREQID 1; BIF 0; EIF 0; BCHAN 1; ECHAN 0; NCHAV 1; CHINC 1; ANTENNAS 0; BASELINE 0; UVRANGE 0, 0; SUBARRAY 0; DOPOL -1; BLVER -1; FLAGVER 1; OUTFGVER 1; DOBAND -1; BPVER -1; SMOOTH 0; DOCALIB 1; GAINUSE 3 $ Apply calibrations DPARM(3) = 1 $ Show baselines twice, treat all antennas the $ same. this shows baseline 27-1 as well as $ 1-27 DPARM(6) = 10 $ set to calibrator's integ. time in seconds $ (use prtuv to get this) source '','' getn (+3) $ *.NEWCH0 25) UVPLT *** *** Check the amplitude/phase vs. uv-distance for all calibrators. *** Amplitude should match the results of SETJY/GETJY. If there are *** obvious outliers which are not expected due to source *** structure, go back and flag those (and possibly re-run CALIB, *** etc.) *** DEFAULT UVPLT DOCAL 1 ; GAINUSE 3 $ Apply calibration FLAGVER 1 $ set this to the latest FG version DOTV 1 DO3COL 1 BPARM 0 $ amp vs. uv-distance CALCODE '*' $ all calibrators getn (+3) $ *.NEWCH0.1 $ do this for each NEWCH0 file *** *** Also run this for all calibrators: *** DEFAULT UVPLT DOCAL 1 ; GAINUSE 3 $ Apply calibration FLAGVER 1 $ set this to the latest FG version DOTV 1 DO3COL 1 BPARM 0,2 $ phase vs. uv-distance CALCODE '*' getn (+3) $ *.NEWCH0.1 $ do this for each NEWCH0 file 26) IMAGR (optional) *** *** If you want to see something other than UV points, you can *** image your calibrators now!! It's kind of fun. *** *** This is an optional step to check for striping or other *** calibration errors. *** *** In addition, the CLEANed flux density should roughly match *** SETJY/GETJY. *** DEFAULT IMAGR DOCALIB 1; GAINUSE 3 $ apply latest calibration FLAGVER 1 $ apply latest flags -- set this to the $ highest-numbered FG table OUTNAME 'junk' $ some obviously cruddy name IMSIZE 1024 NITER 1000 NBOX 1 ; CLBOX -1,5,512,513 $ calibrator should be in the center MINPA 121 UVWTFN ''; ROBUST 0.5 DOTV 1 sources '','' $ calibrator to image cellsize 0 $ 1 for B configuration $ 4 for C configuration $ 16 for D configuration getn (+3) $ *.NEWCH0 27) UVPLT *** *** Check the amp vs. uv-distance for the galaxy. *** *** If there are obvious outliers which are not expected due to *** source structure or RFI (e.g., mostly on short spacings), go *** back and flag those. Note any obvious short-spacing horrors, *** which may be due to solar or terrestrial RFI. *** *** You can use TVFLG to get rid of this. *** DEFAULT UVPLT DOCAL 1 ; GAINUSE 3 $ Apply calibration FLAGVER 1 $ set this to the latest FG version DOTV 1 DO3COL 1 BPARM 0 $ amp vs. uv-distance sources '','' getn (+3) $ *.NEWCH0 28) IMAGR *** *** Image the CH 0 data with the galaxy!! *** *** Again, you shouldn't see obvious calibration errors or *** striping. Note that this "channel 0" includes HI emission, *** so you may see some odd effects (e.g. very woofly noise). DEFAULT IMAGR DOCALIB 1; GAINUSE 3 $ apply latest calibration FLAGVER 1 $ apply latest flags -- set this to the $ highest-numbered FG table OUTNAME 'junk' $ some obviously cruddy name IMSIZE 1024 NITER 1000 MINPA 121 UVWTFN ''; ROBUST 0.5 DOTV 1 sources '','' $ calibrator to image cellsize 0 $ 1 for B configuration $ 4 for C configuration $ 16 for D configuration getn (+3) $ *.NEWCH0 28) TASAV *** *** Save the tables because we should be done calibrating. you *** don't want to lose that work. Put it on a different disk. I *** arbitrarily chose 2 for saved files. *** DEFAULT TASAV OUTCLASS 'ch0sav' OUTDISK 2 outname '-1MidTa' getn (+3) $ *.NEWCH0 29a) TABED - FG table *** *** TABED the FG table to LINCOP to ensure that FREQID -1 *** (again, more important for multifrequency galactic HI *** observations. *** DEFAULT TABED OPTY 'repl' INEXT 'fg' APARM 0 APARM(1) 3 $ Changing column 3 = FREQID KEYVAL= -1,0 $ ...which we change to FREQID= -1 INVER 1 $ if single FREQID OUTVER 2 getn (+3) $ *.NEWCH0 getona (+2) $ *.LINCOP 29b) TABED - SN table *** *** TABED the SN table to LINCOP to ensure that FREQID -1 *** (again, more important for multifrequency galactic HI *** observations. *** DEFAULT TABED OPTY 'repl' INEXT 'sn' APARM 0 APARM(1) 6 $ Changing column 6 = FREQID KEYVAL= -1,0 $ ...which we change to FREQID= -1 INVER 1 $ if single FREQID OUTVER 0 getn (+3) $ *.NEWCH0 getona (+2) $ *.LINCOP 30a) CLCAL on LINCOP *** *** We run CLCAL on LINCOP again to avoid confusion with the *** multiple freqid case. *** *** We should already have dealt with phase jumps. *** *** The primary calibrator will use SELF while the phase calibrator *** and galaxy will use SIMP. *** *** I believe that SELF allows you to use the phases throughout the *** scan (instead of an average) to figure out the correction.. *** DEFAULT CLCAL INDISK 5; GETN 4; SOUCODE '';QUAL -1; CALCODE ''; TIMERANG 0; SUBARRAY 0; ANTENNAS 0; SELBAND -1; SELFREQ -1; FREQID 1; OPCODE 'CALI'; CUTOFF 0; SAMPTYPE ''; BPARM 0; ICUT 0.1; DOBLANK 0; SMOTYPE ''; INVERS 0; BADDISK 0; INTERPOL 'SELF' GAINVER 2 ; GAINUSE 3 DOBTWEEN-1 $ Don't interpolate entries for different sources SNVER 1 sources '','' $ your flux calibrator calsour = sour refant $ Change this to your refant getn (+2) $ *.LINCOP 30b) CLCAL -> phase calibrator *** *** *** The phase calibrator and galaxy will be CLCAL'd using SIMP *** interpolation. *** *** If your data use +/- frequency switching for the phase *** calibrator (none of ours, but some archival sets), you should *** use BPARM with SAMPTYPE='BOX' to select a smoothing time which *** covers both frequency settings. LISTR/SCAN on LINCOP will help *** you choose this; normally something like 12 minutes should be *** okay. *** *** CLCAL will complain that it's appending solutions to CL table *** 3, but I think this is okay. DEFAULT CLCAL INDISK 5; GETN 4; SOUCODE '';QUAL -1; CALCODE ''; TIMERANG 0; SUBARRAY 0; ANTENNAS 0; SELBAND -1; SELFREQ -1; FREQID 1; OPCODE 'CALI'; SAMPTYPE ''; BPARM 0; ICUT 0.1; DOBLANK 0; SMOTYPE ''; SNVER 1; INVERS 0; BADDISK 0; INTERPOL 'SIMP' SAMPTYPE '' $ Change to 'BOX' if +/- freq switching BPARM 0 $ change to 12 (?) if +/- freq switching GAINVER 2 ; GAINUSE 3 DOBTWEEN -1 $ Don't interpolate entries for different $ sources CUTOFF 120 $ Don't extrapolate/interpolate beyond 120 $ minutes SNVER 1 sources '',''; calsour '',''; refant ; getn (+2); $ *.LINCOP 31) UVPLT on LINCOP *** *** Check the amplitude and phase for all calibrators. Amplitude *** should match the results of SETJY/GETJY, and phase should be *** zero, apart from known source structure. *** If there are obvious, unexpected outliers, go back and flag *** those and possibly re-run various tasks. *** DEFAULT UVPLT DOCAL 1; GAINVER 3 $ apply calibration DOBAND 1; BPVER 1 $ apply bandpass FREQID 1 FLAGVER 2 $ use just TABEDed flag table SMOOTH 7, 117 $ boxcar average over all channels DOTV 1 DO3COL 1 BPARM 0 $ amp vs. uv-distance CALCODE '*' $ all calibrators smooth 7, 235 $ boxcar average over all channels $ use smooth 7,117 if you started with 127 $ channels. getn (+2) $ *.LINCOP *** *** Also plot phase. *** DEFAULT UVPLT DOCAL 1; GAINVER 3 $ apply calibration DOBAND 1; BPVER 1 $ apply bandpass FREQID 1 FLAGVER 2 $ use just TABEDed flag table SMOOTH 7, 117 $ boxcar average over all channels DOTV 1 DO3COL 1 BPARM 0 ,2 $ phase vs. uv-distance CALCODE '*' $ all calibrators smooth 7, 235 $ boxcar average over all channels $ use smooth 7,117 if you started with 127 $ channels. getn (+2) $ *.LINCOP 32) POSSM *** *** Check vector average of all data for each calibrator. *** *** Amplitude should match the results of SETJY/GETJY; phase should *** be flat and consistent with zero (corresponding to a point *** source at the origin), apart from known source structure and *** possibly HI absorption (from our galaxy?) *** DEFAULT POSSM DOCAL 1 ; GAINUSE 3 $ apply calibration DOBAND 1; BPVER 1 $ apply bandpass FREQID 1 FLAGVER 2 $ should be the latest FG table APARM 0 $ Plot data SOLINT 0 $ average all time NPLOTS 0 $ average all baselines APARM 0 APARM(1) 1 $ vector average DOTV 1 source='','' $ Secondary (phase) calibrator uvrange= 0,0 $ should be set to eliminate known source structure, $ as in CALIB getn (+2) $ *.LINCOP tvinit 33) IMAGR on LINCOP [optional] *** *** You shouldn't see obvious calibratione errors or *** striping. CLEANed flux density should roughly match *** SETJY/GETJY. If you DO have evil stuff, UVLSF (continuum *** subtration) will likely take care of it, so don't get too *** worked up. *** DEFAULT IMAGR DOCAL 1 ; GAINUSE 3 $ apply latest calibration DOBAND 1; BPVER 1 $ for single-FREQID data sets FLAGVER 2 $ should be the latest FG table OUTNAME 'junk' $ some obviously cruddy name IMSIZE 1024 NITER 200 $ reasonable for a point source NBOX 1 ; CLBOX -1,5,512,513 $ calibrator should be in the center MINPA 121 $ ??? UVWTFN ''; ROBUST 0.5 DOTV -1 $ so you can go eat lunch cellsize 0 $ 1 for B configuration $ 3.5 for C configuration $ 14 for D configuration source '','' $ run for each calibrator. getn (+2) $ *.LINCOP ============================================================= =============== Calibration Checks on Sources =============== ============================================================= 34) UVPLT on LINCOP *** *** Check the amp vs. uv-distance for the galaxy. If there are *** obvious outliers which are not expected due to source structure *** or RFI (ie, not mostly on short spacings), go back and flag *** those. Note any obvious short-spacing horrors, which may be due *** to solar or terrestrial RFI. *** DEFAULT UVPLT DOCAL 1 ; GAINUSE 3 DOBAND 1; BPVER 1 $ for single-FREQID data sets FLAGVER 2 $ should be the latest FG table DOTV 1 DO3COL 1 BPARM 0 $ amp vs. uv-distance smooth 7, 235 $ boxcar average over all channels -- use $ smooth 7, 117 if you started with 127 channels source '','' getn (+2) $ *.LINCOP *** *** Also run this, even though I'm not sure what the phases are *** supposed to be.. not zero or else your galaxy is a single point. *** DEFAULT UVPLT DOCAL 1 ; GAINUSE 3 DOBAND 1; BPVER 1 $ for single-FREQID data sets FLAGVER 2 $ should be the latest FG table DOTV 1 DO3COL 1 BPARM 0,2 $ phase vs. uv-distance smooth 7, 235 $ boxcar average over all channels -- use $ smooth 7, 117 if you started with 127 $ channels source '','' getn (+2) $ *.LINCOP 35) POSSM *** *** Check vector average of all data for the galaxy. You SHOULD see *** your HI line. *** DEFAULT POSSM DOCAL 1 ; GAINUSE 3 DOBAND 1; BPVER 1 $ for single-FREQID data sets FLAGVER 2 $ should be the latest FG table APARM 0 $ Plot data SOLINT 0 $ average all time NPLOTS 0 $ average all baselines APARM 0 APARM(1) 1 $ vector average DOTV 1 source='','' getn (+2) $ *.LINCOP 36) IMAGR *** *** You shouldn't see any calibration errors or striping. you *** should, however, see of order 100 mJy of continuum sources in ** the field, as well as some indication of your galaxy. The latter *** may be quite confusing for B configuration, which resolves out *** most of the structure. Don't fret until you've combined all the *** array configurations. *** DEFAULT IMAGR DOCAL 1 ; GAINUSE 3 DOBAND 1; BPVER 1 $ for single-FREQID data sets FLAGVER 2 $ should be the latest FG table OUTNAME 'junk' $ some obviously cruddy name IMSIZE 1024 NITER 1000 $ a light clean, just to see what we've $ got. niter 0 would be ok too, esp. if $ you IMLIN afterwards NBOX 0 ; CLBOX 0 MINPA 121 UVWTFN ''; ROBUST 0.5 DOTV -1 $ so you can go eat lunch cellsize 0 $ 1 for B configuration $ 3.5 for C configuration $ 14 for D configuration source '','' getn (+2) $ *.LINCOP 37) TASAV -> EndTaB.LINSAV *** *** Save your tables on a different disk in case of disk failure. *** DEFAULT TASAV OUTCLA 'linsav' OUTDI 2 $ Ideally set this to a different disk from indisk, $ in case of disk crashes outname '-EndTa getn (+2) $ *.LINCOP 38) FITTP *** *** create: ---uv-calib-newch0.fits *** ---uv-calib-lincop.fits *** ---beginTasav.fits *** ---midTasav.fits *** ---endTasav.fits 39) DRINK *** *** Celebrate your victory with an appropriate beverage! We *** recommend something with bananas. For example, a recipe for *** banana daiquiris can be found in the AIPS Cookbook. ***