MERLIN Archive Procedures 19 Oct 2001 Also see other information files linked to archive data pages. Data is processed in batches of the same configuration, over periods of anything from a day to a month. The parent UVNAME file is kept in multi-channel format with all calibration contained in extension tables but the maps are made from data summed to a single channel over all the time intervals present. This file typically contains pairs of TARGET and PHase-CALibration sources, along with several runs on PoinT sources (usually OQ208, 0552+398 or 2134+004) and on 3C286. 10 - 30 mins of good data on a PT is chosen and used to scale the correlator counts to Jy channel by channel for all data in the batch, and to derive a bandpass correction and the data are written to a FITS file. Processing in AIPS uses procedures, shown in [] in the text. Some examples are given below to show typical values used for AIPS inputs. They are for a single TARGET/PHCAL pair observed at L-band in 15x1 MHz channels in full polarisation. The reference antenna NREFANT is usually Da. The data are taken into AIPS and housekeeping tasks are performed including making a copy of the unaltered AN table [LOAD]. The Lo-Mk baseline is flagged if present (confusion) using UVFLG, and any periods when Lo or Wa have not nodded to the PHCAL are also flagged using IBLED. 3C286 can be used to scale the PT visibilities more accurately using selected good periods of data and the correction factor is applied to all sources [SETAMP]. You may be able to improve this by choosing (edited) scans on a PT and 3C286 nearer your TARGET in time. You can also insert an estimate of the PHCAL flux in the SU table, refine this using GETJY and the PT and use this flux as a model to derive amplitude corrections for the PHCAL to apply to the TARGET. The PHCAL visibility amplitudes are plotted against time [PLUVV1] and examined and IBLED is used to edit any significant bad data (applying the flags to the same perionds of PHCAL and TARGET data). If necessary a new REFANT is chosen for all futher data processing. The PHCAL visibility amplitudes are also plotted as a function of baseline length [PLUVU1]. Similar plots are made for any TARGETS observed without phase-referencing (TARX) and no further data processing is performed since in this case mapping and calibration usually requires interactive boxing. These plots are used to identify any significantly resolved or confused PHCALs. Usually the default model of an unresolved point is reasonably accurate. This is used to correct the visibility phases and amplitudes of each PHCAL ([PHASC1], [AMPCAL1]) and the solutions are applied to the relevant TARGETs. If a map model of the PHCAL is used this is noted. The solutions are plotted [PLOTCL1]. You might be able to improve the accuracy of the PHCAL solutions by a) Further editing b) Careful choice of SOLINT and smoothing intervals and by using the first cycle of calibration to produce a map of the PHCAL, c) Use its CC as a model if the PHCAL appears slightly resolved or confused A PHCAL with good SNR, good data and good HA coverage is chosen as the PHPOL to correct for polarisation leakage, and 3C286 is used to correct the polarisation angle [POLCAL]. You may be able to improve this by using your PHCAL source as the PHPOL and choosing (edited) scans on 3C286 nearer to your TARGET in time. The PHCALs and TARGETs are then split out [ALLSPLIT] and mapped in full polarisation and the images are plotted [PHCL0], [TARMAP]. You may be able to improve this by boxing sources in IMAGR, especially at low Declination or with poor HA coverage. Bright and/or highly polarised sources may require more iterations in making the Q and U maps. For the TARGET there are many more parameters in IMAGR to map faint extended emission or to improve resolution, and the multi-channel data should be used if the field of view requires it. The data can also be reweighted. The calibrated visibility amplitudes and the uv coverage are plotted for the PHCALs and TARGETs [PLUV]. Finally [SCALSEL] selects TARGETs bright enough to self-calibrate. This can almost certainly be done better by hand. $ Procedures proc LOAD inf 'WORK:UVNAME.FITS' douvco -1;outcl 'MULTTB';outn UVNAME;go FITLD $ task 'INDXR';inf '';cparm 0 0 0.5;getn 1;go INDXR $ getn 1;outcl '';go TASAV;outn '' $ inext 'NX';opty 'SCAN';dparm 0;stokes '';source '' doband -1;docal -1;dopol -1;bch 0;ech 0;docrt -1 outpr 'PRINT:'!!UVNAME!!'.LISTR';go LISTR docrt 1 $ fin $ proc SETAMP $ Set nominal flux of PT to estimated value PFLUX task 'SETJY' getn 1;source PT'';opty '';aparm 0;zerosp PFLUX 0 go SETJY $ $ Phase-only self-calibrate PT (using selected timerange) task 'CALIB' timer calso '3C286''';go CALIB task 'CLCAL' source '3C286''' ;snver 1;gainver 1;gainuse 2;interpol 'self' cutoff 0;timer 0;calso '3C286''' go CLCAL $ Set 3C286 flux density getn 1;source '3C286''';zerosp 0; optype 'CALC';aparm 0;go SETJY $ Find flux of PT wrt 3C286 using selected timeranges and shortest $ baselines $ tget CALIB keyword 'CRVAL3';keystrng '';GETH uvrang 0, (KEYVAL(1)+KEYVAL(2))*0.00000007 refant NREFANT;solint 10; timer calso PT'';go CALIB task 'GETJY';calso '3C286''';source PT'';snver 2 timer 0 go GETJY $ $ Apply flux scale to all sources tget CALIB;uvrang 0;aparm(1) 4;snver 3;go CALIB task 'SNCOR';opcod 'ZPHS';snver 3;anten 0;stokes '';go SNCOR tget CLCAL;snver 3;gainver 1;gainuse 3;source '';calso ''; timer 0;anten 0;interpol 'mwf';intparm 1000 0;go CLCAL $ $ Plot 3C286 and PT all visibilities task 'UVPL' bch 2;ech 14;flagver 1;anten 0;base 0;solint 0;factor 0 bparm 0;lpen 3;plver 0;dparm 0;source '';xinc 0 docal 1;gainuse 0;doband -1;dopol -1;stokes 'll';flagver 1 source '3C286''';go UVPL task 'LWPL';lpen 3;plver 0;inver 0;dparm 0 0 0 0 1 4 go LWPL tget UVPL; source(1)=PT;go UVPL tget LWPL; go LWPL $ $ Plot bandpass of PT inext 'AN';inver 1;keyw 'NUM ROW';GETTH task 'POSSM' anten NREFANT, 0;base 0; aparm 0;timer 0;bch 0;ech 0;nplots KEYVAL(1) flagver 1;stokes '';source(1)=PT;docal -1;solint 0;go POSS tget LWPL;go LWPL fin $ $ proc PLUVV1 inext 'AN';inver 1;keyw 'NUM ROW';GETTH source(1)= 'PHCAL'; task 'VPL';getn 1;bparm 12 1;nplot KEYVAL(1)-1;anten NREFANT 0;base 0 bch 2;ech 14;solint 3;docal 1;gainuse 3;stokes 'rr';xinc 0;factor 1 go VPL; tget lwpl;go LWPL tget VPL source(1)='TARX';go VPL; tget LWPL;go LWPL fin $ $ proc PLUVU1 getn 1;bch 2;ech 14;flagver 1;anten 0;base 0;solint 0 factor 0;bparm 0;lpen 3;plver 0;dparm 0;source '';xinc 0 docal 1;gainuse 3;doband -1;dopol -1;stokes 'll';flagver 1 source(1)= 'PHCAL'; go UVPL tget lwpl;go LWPL tget UVPL source(1)='TARX';go UVPL; tget LWPL;go LWPL fin $ $ proc PHASC1 task 'CALIB' getn 1;refant NREFANT;solint 2;clro;outd ind;bch 2;ech 14 flagver 1;clr2n;in2d ind;anten 0;timer 0;cparm 0;snver 4;docal 1 gainuse 3;uvrang 0;aparm 3 0 0 0 0 0 3;solty '';solmo 'p' calsour(1) 'PHCAL';go CALIB task 'CLCAL' interpol '2pt';source '';calso '';refant NREFANT;opcod '' snver 4;gainver 3;gainuse 4;cutoff 0;smoty '' go CLCAL fin $ $ proc AMPCAL1 tget CALIB docal 1;gainuse 4;aparm(1) 4;solty 'l1';solmo 'a&p';cparm 0 1 clr2n; in2d DNO; ncom 0;timer 0 snver 5;calsour(1)='PHCAL';go CALIB task 'SNSMO';refant NREFANT interpol 'mwf';bparm 0;bparm(1) 0.5;doblank -1;smotype 'ampl'; cparm 0;anten 0;cparm(1) 1;cparm(6) 0.2;inver 5;outver 5 source '';source(1) calsour(1) go SNSMO tget CLCAL snver 5;gainver 4;gainuse 5; calso '';intparm 0 source(1)='PHCAL';source(2)='TARGET';go CLCAL inext 'sn';inver 5;extd fin $ $ proc PLOTCL1 getn 1;inext 'AN';inver 1;keyw 'NUM ROW';GETTH task 'snpl';xinc 0; inext 'cl';inver 0;anten 0;nplot KEYVAL(1);opty '';stokes 'rr';opcod '' source '';source(1)= 'PHCAL';go SNPL tget LWPL;go LWPL tget SNPL;opty 'amp' source(1)='PHCAL';go SNPL tget LWPL;go LWPL fin $ $ proc POLCAL $ Split out and map PHPOL; task 'SPLIT' getn 1;docal 1;gainuse 0;doband -1;bch 2;ech 14;aparm 2 0 stokes '';clro;outd ind;flagver 1;dopol -1;douvco -1 source(1) 'PHPOL';go SPLIT task 'MULT' inn PHPOL;incl 'SPLIT';inse 0;aparm 0.5 0;clro;outd ind;source '' go MULT tget INDXR;inn PHPOL;incl 'MULTI';inse 0;source '';cparm 0 0 0.5;go INDXR $ task 'IMAGR' inn PHPOL;source PHPOL'' ;outn PHPOL ;inse 0;bch 0;ech 0 incl 'SPLIT';cellsiz mycell; niter 1000;minpatch 255;robust 8 clr2n;zerosp 0;outse 0;imsiz 256 256;docal -1;cparm 0;outver 0 factor 0;doband -1;dopol -1;stokes 'i';uvwtfn 'n';dotv -1 go IMAGR inn PHPOL;incl 'ICL001';inse 0;keyword 'DATAMAX ';keyval 0;keystr '' GETH tget SETJY;inn PHPOL;incl 'MULTI';aparm 0;opty '' source '';zerosp keyval,0 go SETJY $ $ Polarisation leakage corrections task 'PCAL';inn PHPOL;incl 'MULTI';inse 0 calso '';gainuse 0;bparm 0;cparm 0 docal -1;solint 3;solty 'appr';prtlev 1;bparm 0 clr2n;go PCAL $ $ Copy corrected AN table to main uvdata file getn 1;inext 'an';inver 0;extd task 'TACOP';keyval 0;keystr '';keyw '' inn PHPOL;incl 'MULTI';inse 0;geto 1 outse 0;inext 'an';inver 0;outver 0;ncount 1;go TACOP $ $ Correct polarisation angle tget SPLIT;source '3C286''';docal 1;gainuse 2;dopol 1 timer