next up previous contents index
Next: Mosaiced Mapping and Deconvolution Up: Flux Calibration Previous: Flux Calibration

Bootstrap Flux Calibration

In this example we will calculate the flux of a phase calibrator using a known flux calibrator. The flux is assumed from another source (it could be bootstrapped from a planet, or from an external list such as the SMA list of the CARMA flux table). We will assume we have both calibrators in a triple 500 MHz correlator mode for maximum sensitivity, and that all data have been flagged appropriately. We will also assume the phase calibrator is relatively bright to believe the time variance of the gains.

First a few handy definitions so we can shorten the examples:

set fluxcal = 3C84                   # flux calibrator  (also the miriad dataset name)
set viscal  = 0238+166               # phase calibrator (also the miriad dataset name)

set flux    = 6.6                    # flux of flux calibrator (SMA or Woojin)
set refant  = 9                      # referance antenna

set calint  = 0.2                    # passband calibration interval (minutes)
set vcalint = 25                     # visibility calibrator scan interval
set fcalint = 1                      # flux calibrator interval
set superwidewin  = "1,2,4,5"        # windows to use for superwide
set superwidechan = "1,1,60"         # channels for superwide
set lsbfluxchan   = "1,1,30,30"      # channels for calc lsb flux
set usbfluxchan   = "1,31,30,30"     # channels for calc usb flux

A note on setting the flux here. In the example below we do not use options=apriori in selfcal but instead set the flux value explicitly. Either way should work, but flux calibration tables are sometimes updated and can give slightly different (supposedly better of course) results.

First we will passband calibrate the flux calibrator. We will use a relatively short interval, to ensure phase wrapping in time does not wipe out the passband:

  mfcal vis=$fluxcal interval=$calint refant=$refant

It is always good to inspect the calibration tables, both in frequency and time:

  gpplt vis=$fluxcal options=bandpass yaxis=phase nxy=4,4 yrange=-360,360 device=/xs
  gpplt vis=$fluxcal yaxis=phase yrange=-360,360 nxy=4,4 device=/xs

Notice that the first LSB and last USB window (spectral window 3 and 6) are not as well behaved as the others, and will be left out in the definition of the superwide channel (combining all wide band windows) .

The passband calibration table is now copied to the visibility calibrator, and a copy is made of this now passband corrected dataset:

  gpcopy vis=$fluxcal out=$viscal options=nocal,nopol
  uvcat vis=$viscal out=$viscal.wide options=nocal

Next, the antenna gains are determined from the flux calibrator. First we again make a passband corrected copy of all the good windows, after which we run an amplitude selfcal with the flux we think we know this source should have.

  uvcat vis=$fluxcal out=$fluxcal.gain options=nocal "select=win($superwidewin)"
  selfcal vis=$fluxcal.gain refant=$refant interval=$fcalint "select=source($fluxcal)" \
    options=noscale,amplitude flux=$flux
  gplist vis=$fluxcal.gain options=zeropha,amp > $fluxcal.gains

...
------------------------------------------------------------------------
Means:      1.39  0.98  1.04  1.14  0.00  1.10  1.08  1.29  1.17  1.38  1.44  1.09  1.33  1.35  1.26
Medians:    1.36  0.98  1.04  1.13  0.00  1.09  1.09  1.29  1.17  1.38  1.44  1.08  1.32  1.33  1.26
Rms:        0.09  0.03  0.03  0.07  0.00  0.02  0.03  0.02  0.05  0.04  0.04  0.03  0.04  0.05  0.03
------------------------------------------------------------------------

Since we will need these gain factors later on, a little Unix pipe will grab the medians into a file:

  grep Medians $fluxcal.gains | tr -d Medians: > $fluxcal.medians
  cat $fluxcal.medians
  1.36  0.98  1.04  1.13  0.00  1.09  1.09  1.29  1.17  1.38  1.44  1.08  1.32  1.33  1.26

Next the phase of the phase calibrator should be straightened out, and we use a phase-only selfcal with a fairly long integration time for this

  uvcat vis=$viscal.wide out=$viscal.sw "select=win($superwidewin)" 
  selfcal vis=$viscal.sw line=channel,$superwidechan interval=$vcalint options=phase refant=$refant

Now the amplitude gains derived from the flux calibrator, can be applied to the phase calibrator, by replacing the amplitudes, and keeping the phases from the just determined selfcal solution:

  gplist vis=$viscal.sw options=replace jyperk=@$fluxcal.medians

A special program, uvflux, can now be used to gather some statistics on this phase calibrator. Since the calibrator is assumed to be a point source, all amplitudes should be the same (you could check this with e.g. uvplt axis=uvd,amp), and thus report the flux (6.18 Jy $\pm$ 2.59 for both LSB and USB in this example).

  uvflux vis=$viscal.sw options=nopol line=chan,$lsbfluxchan
  uvflux vis=$viscal.sw options=nopol line=chan,$usbfluxchan
  uvflux vis=$viscal.sw options=nopol > $viscal.flux

--------------------------------------------------------------------------------
Source     Pol Theoretic   Vector Average      RMS      Average  RMS Amp  Number
                  RMS        (real,imag)     Scatter      Amp    Scatter  Corrs
------     --- -------- -------------------- -------  --------- --------  ------
0238+166    RR 1.3E+00  5.157E+00 -3.838E-03 3.0E+00  6.180E+00 2.59E+00 1935180
--------------------------------------------------------------------------------

Finally, checking the time variance of the phase calibrator

  uvcat vis=$viscal.wide out=$viscal.wide.gain "select=win($superwidewin)"
  selfcal vis=$viscal.wide.gain refant=$refant interval=$vcalint "select=source($viscal)" \
          options=noscale,amplitude flux=$visflux
  gplist vis=$viscal.wide.gain options=zeropha,amp > $viscal.gains

  Time     Ant 1 Ant 2 Ant 3 Ant 4 Ant 5 Ant 6 Ant 7 Ant 8 Ant 9 Ant10 Ant11 Ant12 Ant13 Ant14 Ant15
19:11:10    1.33  0.99  1.01  1.07  0.00  1.07  1.10  1.34  1.19  1.39  1.48  1.06  1.28  1.37  1.24
19:13:34    1.34  0.98  1.05  1.06  0.00  1.06  1.09  1.36  1.21  1.40  1.48  1.06  1.28  1.35  1.28
19:40:47    1.41  1.01  1.01  1.12  0.00  1.07  1.10  1.45  1.23  1.40  1.53  1.08  1.32  1.45  1.31
20:09:41    1.36  0.98  1.05  1.12  0.00  1.12  1.19  1.58  1.28  1.44  1.68  1.09  1.38  1.47  1.39
20:42:34    1.44  0.98  1.05  1.19  0.00  1.12  1.11  1.66  1.31  1.53  1.75  1.14  1.44  1.51  1.42
20:53:42    1.50  0.95  1.03  1.14  0.00  1.09  1.07  1.63  1.29  1.56  1.78  1.15  1.42  1.54  1.41
21:22:06    1.38  1.01  1.05  1.15  0.00  1.07  1.16  1.67  1.32  1.63  1.75  1.16  1.37  1.54  1.40
21:51:16    1.41  0.99  1.05  1.10  0.00  1.06  1.11  1.67  1.39  1.60  1.74  1.14  1.37  1.50  1.43
22:21:57    1.45  1.04  1.09  1.15  0.00  1.09  1.14  1.71  1.51  1.64  1.76  1.16  1.40  1.57  1.50
22:34:31    1.54  1.05  1.07  1.14  0.00  1.07  1.10  1.70  1.48  1.56  1.65  1.15  1.39  1.55  1.47
23:02:50    1.47  1.04  1.06  1.08  0.00  1.05  1.14  1.85  1.61  1.64  1.74  0.00  1.46  1.57  1.55
23:31:26    1.56  1.10  1.07  1.17  0.00  1.09  1.22  2.21  1.72  1.70  1.90  1.25  1.52  1.65  1.64
00:00:10    1.50  1.09  1.03  1.13  0.00  1.06  1.41  4.50  1.86  1.72  1.91  1.28  1.55  1.61  1.60
------------------------------------------------------------------------
Means:      1.44  1.02  1.05  1.13  0.00  1.08  1.15  1.87  1.42  1.55  1.70  1.14  1.40  1.51  1.43
Medians:    1.41  0.99  1.05  1.12  0.00  1.07  1.11  1.66  1.31  1.56  1.74  1.14  1.38  1.51  1.41
Rms:        0.07  0.05  0.02  0.04  0.00  0.02  0.09  0.82  0.21  0.11  0.14  0.07  0.08  0.09  0.12
------------------------------------------------------------------------


next up previous contents index
Next: Mosaiced Mapping and Deconvolution Up: Flux Calibration Previous: Flux Calibration
Peter
2009-10-05