Description
This function is used to bootstrap the amplitude scale the
calibration solutions according to specified reference calibrator(s)
of known flux density. This is necessary when the flux densities
of some of your calibrators were unknown (and thus were assumed
to be 1 Jy) during G solving.
The bootstrapping is achieved by comparing the mean gain norm of the
calibration solutions derived for the calibrators specified in reference (one or more sources with known flux densities at the time
of G solving) with that of the calibrators specified in transfer, and enforcing the assumption that the antenna gains are
constant, on average. The gain solutions for the transfer sources are
then re-scaled accordingly.
If no transfer fields are specified, then the solutions for
all non-reference fields in tablein will be re-scaled.
If no tableout is specified the input table will be overwritten
with the scaled solutions. Note that the resulting table will only
contain solutions for those fields implicit in the reference and
transfer specifications. Use append=T to append the scaled
solutions to an existing table.
Use the refspwmap parameter to indicate how data for
different spectral windows should be matched in calculating the flux
density scale factor for transfer fields. The default
behavior for refspwmap is to insist on precisely matching
spectral windows for reference and transfer fields. When
specified, the refspwmap parameter takes a vector of integers
indicating which spectral window solutions to use as the reference for
others, such that refspwmap[j]=i causes solutions (from reference
fields) observed in the i-th spectral window to be used to reference
solutions (from transfer fields) observed in the j-th spectral window.
For example, for the case of a total of 4 spectral windows: if the
reference fields were observed only in spw=2 & 4, and the transfer fields were observed variously in all 4 spws, specify refspwmap=[2,2,4,4]. This will ensure that transfer fields
observed in spws 1,2,3,4 will be referenced to reference field
data from spws 2,2,4,4, respectively. Note that if the transfer
fields were observed only in spws 1 & 3, the same specification would
work, but refspwmap=[2,2,4] would suffice. In this case,
nothing need be specified for the 4th spw (there are no transfer
fields there), and specifying 2 for the 2nd spw is actually
inconsequential (though required so that the specification of 4 for spw 3
is properly interpretted).
The derived flux densities for the transfer fields will be reported in
the logger, and returned to the glish variable specified in fluxd. This will be an 2D array of shape [number-of-spectral-windows
X number-of-fields].
Note that elevation-dependent gain effects may render the basic
assumption used here invalid, and so should be corrected for prior to
solving for G, using types 'TOPAC' or 'GAINCURVE' in setapply.
Note that the visibility data itself is not used directly by this
function.
Pending improvements:
- Allow antenna and uv-distance selection to improve results for
resolved calibrators
- Set the visibility model according to the flux density results
- An option to use the data to derive the relative flux densities