> cd my_data_directory C R | to change to the data directory containing the top-level directory of your data set. |
> export MYAREA=‘pwd‘ C R | for bash shells, or |
> setenv MYAREA ‘pwd‘ C R | for tcsh and c shells. |
Note the back ticks around pwd which cause the output of pwd to appear in the typed line.
> aips tv=local pr=3 C R | to use Unix sockets for the TV and printer 3 |
and enter your user number when prompted.
> default bdflist C R | initialize all adverbs |
> dowait 1; docrt 1 C R | to get output on terminal as well as log file. |
> asdmfile(1) = ’MYAREA: C R | two parts are concatenated. |
> asdmfile(2) = ’TSUB0001.sb23643640.eb23666175.56454.14034020834 C R |
|
> bdflist C R | to examine file contents. |
Pay particular attention to the configuration numbers and number of spectral channels. These refer to each unique correlator and antenna setup, not just the size of the current VLA. Each configuration and number of channels that you want will need to be loaded individually.
> outn ’my-name’ C R | to select a meaningful file name. |
> config c C R | to select configuration c. |
> outdi d C R | to select the disk. |
> bdf2aips C R | to translate the data into . |
> nchan N C R | to limit to data with N spectral channels; some spectral-line configurations can contain more than one number of channels but AIPS can only load one number at a time. |
Do this as often as needed to load all desired configurations. Spectral-line set-ups can have spectral windows with different numbers of channels within the same configuration. can only handle one at a time, so specify nchan N C R to load the data with N channels and repeat as needed.
> indi d; getn 1 C R | to select disk and catalog number, assuming you had no files on disk d previously. |
> imh C R | to see the details of the uv-data set header. |
> default prtan C R |
|
> indi d; getn 1 C R |
|
> docrt = -1 C R | to make a printer listing to keep at your terminal. |
> go prtan C R |
|
> default listr C R |
|
> indi d; getn 1 C R |
|
> opty ’scan’ C R | to list scans and sources. |
> docrt = -1 C R | to make a printer listing to keep at your terminal. |
> go C R |
|
At this stage, Minnie’s summary recommends separating P-band from 4-band data. At present, only P-band is recorded so that step is not needed. Then, Minnie recommends using POSSM to find dead antennas plus those with crossed polarization. Then she recommends UVFLG to flag the dead ones and FIXRL to uncross the mis-wired ones. These problems have been essentially eliminated. In addition, P-band data are now delivered by default in a number of relatively narrow spectral windows (called IFs in ) which helps minimize data lost to RFI and eliminates the NOIFS and MORIF steps from Minnie’s guide.
> default tyapl C R | to select the needed task |
> indi d; getn 1 C R | to select the input file. |
> optype ’PGN’ C R | to select requantizer gain correction. |
> inext ’SY’ ; in2ver = 1 C R | to apply the SysPower table, the version number is not defaulted. |
> outdis d ; go C R | to stay on one disk. |
> default splat C R | to select the needed task |
> indi d; getn 2 C R | to select the (new) input file. |
> flagver 1 C R | to apply the on-line flags. |
> smooth = 1, 0 C R | to do Hanning smoothing once and for all. |
> bif = 4; eif = 15 C R | to select the more sensitive IFs. |
> outdis d ; go C R | to put the output on the same disk. |
> default uvflg C R |
|
> indi d; getn 3 C R |
|
> bif 6 ; eif 6; bchan 65; echan 128; C R |
|
> go C R |
|
> bif 7 ; eif 7; bchan 1; echan 97; C R |
|
> go C R |
|
For any setup, you may make a text file containing the line
BFREQ = 360 EFREQ = 380 /
and then use it with UVFLG as
> default uvflg C R |
|
> indi d; getn 3 C R |
|
> intext = ’MYWORK:pband.flg C R | to give file name |
> go C R |
|
> default edita C R |
|
> indi d; getn 3 C R |
|
> inext ’SY’ C R |
|
> go C R |
|
> default ftflg C R |
|
> indi d; getn 3 C R |
|
> calcode ’*’ C R | to examine calibrators only |
> dparm(6) = x C R | to specify the basic integration time in the data in seconds. |
> go C R |
|
If you use SPFLG, you should limit the times, sources, and/or baselines examined. The flagging then is best done with UVFLG from notes made while you study the data with SPFLG.
> default uvflg C R |
|
> indi d; getn 3 C R |
|
> bif = bi ; eif = ei C R | to set range of spectral windows. |
> bchan = bc ; echan = ec C R | to set range of spectral channels. |
> antennas = a1,a2,a3 C R | to select antennas to flag. |
> baseline = b1,b2,b3,b4 C R | to limit flags to the baselines from the pairs a1 through a3 with b1 through b4. |
> reason ’bad channels’ C R | to set a reason in the flag table. |
> go C R | and repeat as needed with different IFs, channels, antennas, etc. |
> default fring C R |
|
> indi d; getn 3 C R |
|
> calso ’3C286’ ’ C R | to select the primary calibration source. |
> timerang 0 3 40 0 0 3 40 55 C R | to select < 1 minute of good data from the calibration source. |
> solint 1 C R | to average over all included times. |
> aparm(5) 1 ; aparm(6) 1 C R | to fit a single delay over all IFs and to print some extra detail in the fitting. |
> dparm(9) 1 C R | to avoid any fitting for rates — important. |
> refant 22 C R | to set a reference antenna, if one is known to be better than others. |
> go C R |
|
This print level will display the delays found, which should all be a few nano-seconds although larger (correct) delays sometimes arise.
> default clcal C R |
|
> indi d; getn 3 C R |
|
> calso ’3C286’,” C R |
|
> snver 1 C R | to specify the SN table version written by FRING. |
> go C R | to copy CL table 1 to version 2 adding the delay correction, taken to be constant in time. |
> default rflag C R |
|
> indi d; getn 3 C R |
|
> sources(1) ’3C286’ C R |
|
> docal 1 C R | to correct delays and a-priori gains. |
> avgchan 11 C R | to set the width of the median-window filter run across the spectral channels in each IF |
> fparm = 3, x, -1, -1 C R | to do a small rolling time buffer, set the sample interval, and to have NOISE and SCUTOFF set IF-dependent cutoff levels. |
> fparm(13) = 1000 C R | to clip amplitudes at 1000 Jy. |
> doplot 12 ; dotv 1 C R | to do the 2 most useful plots on the TV. |
> go C R |
|
RFLAG will return cutoff levels to the appropriate adverbs. Therefore, to apply the flags using the flagging levels found above, do not do a tget rflag which will reset the levels to zero. Instead, simply do
> doplot = -12 C R | to apply the cutoff levels and determine new ones, plotting on the TV. |
> go C R |
|
RFLAG will make a new flag table each time it determines flags (when DOPLOT≤ 0). RFLAG has numerous FPARM options you may choose. FPARM(9) and FPARM(10) scale the rms for NOISE and SCUTOFF that RFLAG computes. If the fraction of a channel that is flagged exceed FPARM(7), the entire channel is flagged. FPARM(6) is especially useful at P-band as it allows channels adjacent to an RFI peak to be flagged. Similarly, FPARM(8) allows channels between strong RFI peaks to be flagged. Read the help file for detailed information. Flagging calibrator scans aggressively is recommended especially for spectral-line observations.
Check the results with
> default spflg C R |
|
> indi d; getn 3 C R |
|
> sources(1) ’3C286’ C R | to examine only the bandpass calibrator. |
> dparm(6) = x C R | to set sampling time in seconds |
> docal 1 C R | to correct delays and a-priori gains. |
> go C R |
|
It is at this point that experienced users differ significantly in their approach. If you have only one bandpass-calibration scan and the ionosphere was reasonably behaved (phases nearly constant through that scan), then you should run BPASS on the calibration source in place. However, when one has multiple bandpass scans and/or a badly behaved ionosphere, it may be best to split the calibration scans out and self-calibrate them on a short time interval. The addition of multiple scans where the source has been phased up, but the remaining RFI has not, will reduce the effect of that RFI substantially. This scheme is described next.
> default split C R |
|
> indi d; getn 3 C R |
|
> outdi indi ; source ’3C286’ ’ C R | to select calibrator and stay on the same disk. |
> outcl ’bpspl’ C R | to indicate the use for this file. |
> docalib 1 C R | to apply delay and a-priori calibration. |
> go C R | To make a single-source file. |
> default calib C R |
|
> indi d; getn 4 C R |
|
> refant 22 C R | to stay with the chosen reference antenna. |
> solint y C R | to average n records in each solution interval, set y = nx. |
> solty ’L1R’ ; solmode ’P’ C R | to do phase-only solutions. |
> aparm(6) 1 C R | to get some diagnostic messages. |
> go C R | to write a new SN table. |
Eyeball this new table with SNPLT — should be flat, not all over the place. But EDITA lets you look at more things at once.
> default edita C R |
|
> indi d; getn 4 C R |
|
> inext ’sn’ ; dotwo 1 C R | to plot the phases in the new table. |
> crowded 1 ; do3col 1 C R | to combine all IFs in each colorful plot. |
> go C R |
|
If these plots are too crowded, you can interactively select individual IFs and polarizations. This task will let you flag data if desired. If you do, then you should re-run CALIB.
> default bpass C R |
|
> indi d; getn 4 C R |
|
> docalib 1 C R | to apply the new SN table phases. |
> refant 22 C R |
|
> solty ’l1r’ ; solint = -1 C R | to average the entire time range. |
> bpassprm(5) = 1; bpassprm(10) = 3 C R | to normalize the solutions at the end rather than the data record-by-record. |
> go C R | To generate a new BP table containing one record per antenna. |
> tget possm C R |
|
> indi d; getn 4 C R |
|
> solint = -1 C R |
|
> aparm(8) 2 ; aparm(9) 1 C R | to plot all IFs together for each bandpass. |
> nplots 2 C R | 2 per page is enough here. |
> go C R |
|
Alternatively, BPEDT lets you use the bandpass table to guide additional flagging of the bandpass calibrator(s). It is similar to EDITA in that it lets you look at multiple antennas at the same time for comparison.
> default bpedt C R |
|
> indi d; getn 4 C R |
|
> inext ’bp’ ; GO C R |
|
> default tacop C R |
|
> indi d; getn 4 C R |
|
> inext ’bp’ C R |
|
> outdi indi ; geton 3 C R | to select output name parameters |
> go C R |
|
> default uvcop C R |
|
> indi d; getn 3 C R |
|
> outdi indi ; outn inna C R | to stay on d. |
> outcl ’fixcp’ C R | with a meaningful class name |
> flagver n C R | to apply the highest flag table (n); use IMHEAD if unsure. Version 0 means no flagging here. |
> go C R |
|
> default setjy C R |
|
> indi d; getn 5 C R |
|
> source ’3C286’ ’ C R | specify all “known” calibrator sources. |
> opty ’calc’ C R | to calculate and display fluxes from the frequencies plus tables of known sources. |
> go C R |
|
> tget possm C R |
|
> source ’calsrci’ ’ C R | to examine the ith calibration source. |
> indi d; getn 5 C R |
|
> docal 1 ; doband 1 C R | apply our hard-won calibration. |
> solint 0 C R | to look at the average over all time. |
> aparm(9) 1 C R | to plot all IFs together. |
> nplots 2 C R | 2 per page is enough here. |
> go C R |
|
If RFI is present (it almost certainly will be), two rounds or more of RFLAG may be needed.
> default rflag C R |
|
> indi d; getn 5 C R |
|
> source ’calsrci’ ’ C R | to examine the ith calibration source. |
> docal 1 ; doband 1 C R | apply the calibration. |
> avgchan 11 C R | to set the width of the median-window filter run across the spectral channels in each IF |
> fparm = 3, x, -1, -1 C R | to do a small rolling time buffer, set the sample interval, and to have NOISE and SCUTOFF set IF-dependent cutoff levels. |
> fparm(13) = 1000 C R | to clip amplitudes at 1000 Jy. There are many more FPARM options you may choose also. |
> doplot 12 ; dotv 1 C R | to do the 2 most useful plots on the TV. |
> go C R |
|
RFLAG will return cutoff levels to the appropriate adverbs. Therefore, to apply the flags using the flagging levels found above, do not do a tget rflag which will reset the levels to zero. Instead, simply do
> doplot = -12 C R | to apply the cutoff levels and determine new ones, plotting on the TV. |
> go C R |
|
RFLAG will make a new flag table each time it determines flags (when DOPLOT≤ 0). It may be good to check what RFLAG has done with POSSM. If more edits are needed, use SPFLG
> default spflg C R |
|
> indi d; getn 5 C R |
|
> source ’calsrci’ ’ C R | to examine the ith calibration source. |
> dparm(6) x C R |
|
> docal 1 ; doband 1 C R | apply the calibration. |
> go C R |
|
> default uvcop C R |
|
> indi d; getn 5 C R |
|
> outdi indi ; outn inna C R | to stay on d. |
> outcl ’flaged’ C R | with a meaningful class name |
> flagver n C R | to apply the highest flag table (n); use IMHEAD if unsure. Version 0 means no flagging here. |
> go C R |
|
> default extdest C R |
|
> indi d; getn 6 C R |
|
> inext ’fg’ ; invers = -1 C R | to delete all remaining versions of flag table. |
> extdest C R |
|
> default calib C R |
|
> indi d; getn 6 C R |
|
> calcode ’*’ C R | to select all calibration sources |
> docalib 1 ; doband 1 C R | to apply all existing calibration. |
> refant 22 C R | to keep our reference antenna. |
> solint 0 C R | One solution per calibrator scan is okay with good short-term phase stability. Otherwise, set to the longest time in minutes over which phase is stable. |
> solty ’L1R’ ; solmode ’a&p’ C R | to solve for amplitude and phase with an L1 method iterated robustly. |
> aparm(6) 1 C R | to print closure error statistics. |
> go C R |
|
Pay attention to the fraction of failed solutions. If the fraction is large, try adjusting parameters such as SOLINT, etc.
> default getjy C R |
|
> indi d; getn 6 C R |
|
> source ’calsrc1’, ’calsrc2’, ’calsrc3’, … C R | to list the secondary calibrators. |
> calsour = ’3c286’ ’ C R | to list the known calibrator(s). |
> snver = n C R | to select only the SN table just written by CALIB. Use IMHEADER to find the maximum version number n. |
> go C R | to solve for the secondary fluxes as functions of IF. |
Check the values displayed carefully to make sure that they are sensible. SOUSP offers tools to examine and adjust the fluxes and SN table n.
> tvini C R |
|
> default snplt C R |
|
> indi d; getn 6 C R |
|
> inext ’sn’ ; opty ’amp’ C R | to plot amplitudes. |
> nplots 4 ; dotv 1 C R | to plot 4 panels on each TV page. |
> opco ’alif’ ; do3col 1 C R | to plot all IFs in each panel using color to distinguish them. |
> go C R |
|
One can also plot IFs in separate panels or one at a time if these plots are too crowded. Then
> opty ’phas’; go C R | To check the phases. |
To use EDITA to look at both amplitude and phase at the same time for multiple antennas
> default edita C R |
|
> indi d; getn 6 C R |
|
> inext ’sn’ ; dotwo 1 C R | to plot the phases in the new table. |
> crowded 1 ; do3col 1 C R | to combine all IFs in each colorful plot. |
> go C R |
|
If these plots are too crowded, you can interactively select individual IFs and polarizations. This task will let you flag data if desired. If you do, you should then re-run CALIB.
> default clcal C R |
|
> indi d; getn 6 C R |
|
> calcode ’*’ C R | to select all calibration sources |
> sampty ’box’ ; bparm 0.3, 0.3 C R | To smooth the SN table if you used SOLINT less than full scans. Leave this out if you used scan averages. |
> refant 22 C R |
|
> go C R |
|
> tget snplt C R |
|
> inext ’cl’ C R |
|
> go C R |
|
> default imagr C R |
|
> indi d; getn 6 ; outdi indi C R |
|
> docal 1 ; doband 1 C R | to apply the calibration. |
> source = ’3c286’ ’ C R | to select only the primary calibrator. |
> bchan 5; echan = n - 4 C R | to omit edge channels in each IF, where n is the number of channels in an IF, now usually 128. |
> nchav = echan-bchan+1; chinc nchav C R | to average all spectral channels into the image. |
> cellsize 1. C R | to set the image cell spacing — depends on configuration. |
> imsi 1024 C R | to make a largish image to see sources around 3C286. |
> outn ’3C286_quick’ C R |
|
> niter 100 ; dotv 1 C R | to do some Cleaning and guide the progress with the TV |
> go C R |
|
> defsult split C R |
|
> indi d; getn 6 C R |
|
> outdi indi C R |
|
> docal 1 ; doband 1 C R |
|
> dopol 1 C R | if you calibrated polarization |
> sources = ’target1’, ’target2’, … C R | to select only target sources. |
> go C R |
|
To create a number of separate, single-source uv data sets each with separate target source.
> default rflag C R |
|
> indi d; getn 9 C R |
|
> avgchan 11 C R | Median window width on spectra. |
> fparm = 3, x, -1, -1 C R | to do a small rolling time buffer, set the sample interval, and to have NOISE and SCUTOFF set IF-dependent cutoff levels. |
> doplot 12 ; dotv 1 C R | To examine the two important plots on the TV. |
> go C R |
|
and then apply the flags levels and determine new ones
> doplot -12 ; go C R |
|
and perhaps repeat this line for more flagging. NOTE: for flagging spectral-line target sources, you should set FPARM(4)=0 since you should not flag in the spectral domain. Check what RFLAG has done with SPFLG, which can be tedious.
> default spflg C R |
|
> indi d; getn 9 C R | to select the first of the split target data sets. |
> dparm(6) x C R | to set integration time. |
> go C R |
|
> default reway C R |
|
> indi d; getn 9 C R |
|
> outdi indi C R |
|
> aparm 31,0,500 C R | to find rmses from rolling buffers 31 time intervals long on a baseline basis and then smooth them over 500 seconds. |
> go C R |
|
Note that this applies the final SPFLG+RFLAG flag table. Delete the other flag table versions with
> default extdest C R |
|
> indi d; getn 10 C R |
|
> inext ’fg’ ; invers = -1 C R | to delete all remaining versions of flag table. |
> extdest C R |
|