Description
This function is used to specify the calibration components which should be
applied during subsequent execution of the solve and
correct functions. This function will be executed as many
times as necessary to specify all desired calibration components.
Each calibration component represents a separate calibration matrix
correction included in the measurement equation. The different types
correspond to different instrumental and atmospheric effects.
Calibration components are available as calibration tables generated
by previous solve executions (types
'B','BPOLY','G','GSPLINE','D','T','M','MF','K'), or are calculated
analytically on the fly (types 'P', 'TOPAC', 'GAINCURVE'). See
the setsolve section for more information about the
solvable types.
Use the interp parameter to specify the desired type of
time-dependent interpolation. Use interp='nearest' to
calibrate each datum with the calibration value nearest in time. Use
interp='linear' to calibrate each datum with calibration
phases and amplitudes linearly interpolated from neighboring (in time)
values. In the case of phase, this mode will assume that phase jumps
greater than 180 degrees between neighboring points indicate a cycle
slip, and the interpolated value will follow this change in cycle
accordingly. Use interp='aipslin' to emulate the basic
interpolation mode used in classic AIPS, i.e., linearly interpolated
amplitudes, with phases derived from interpolation of the complex
calibration values. While this method avoids having to track cycle
slips (which is unstable for solutions with very low SNR), it will
yield a phase interpolation which becomes increasingly non-linear as
the spanned phase difference increases. The non-linearity mimics the
behavior of interp='nearest' as the spanned phase difference
approaches 180 degrees (the phase of the interpolated complex
calibration value initially changes very slowly, then rapidly jumps to
the second value at the midpoint of the interval). If the uncalibrated
phase is changing this rapidly, a 'nearest' interpolation is not
desirable. Usually, interp='linear' is the best choice.
The interp parameter is applicable to any calibration type,
as long as there are sufficient solutions available to perform the
interpolation. Note that calibration solutions which have been
determined for only one timestamp will default to 'nearest'. More
interpolation options (e.g., 'cubic') will be added in the near
future.
Currently, the interpolation interval is forced to t=0 for
solved-for components, which means that the interpolation (or
extrapolation) will extend indefinitely, as circumstances dictate. A
future version of calibrater will use this parameter to limit the
range in time over which interpolation/extrapolation will be
permitted.
The interpolation type and timescale are, by definition, irrelevant
for analytically calculated calibration types (e.g., the parallactic
angle, P).
For solved-for components, the filename specified in table
parameter must contain a calibration table of the type specified in
type.
Use the select parameter to specify selection of a subset of
calibration measurements from the table to be applied to the
visibility data. Arbitrary cross-calibration is possible by combining
this function with the setdata function. The string
specified must be a valid
TaQL
expression.
The spwmap parameter is used to indicate how solutions
derived from different spectral windows should be applied to other
spectral windows. Nominally, data in each spectral window will be
corrected by solutions derived from the same spectral window. This is
the default behavior of spwmap, i.e., if spwmap is
not specified, calibrater will insist that data be corrected by
solutions from the same spw. Otherwise, spwmap takes a
vector of integers indicating which spectral window solutions to
apply to which spectral window data, such that spwmap[j]=i
causes solutions derived from the i-th spectral window to be used to
correct the j-th spectral window. For example, if (say) bandpass
solutions are available for spws 1 & 3, and it is desired that these
be applied to spws 2 & 4 (as well as 1 & 3), respectively, use
spwmap=[1,1,3,3]. Even if some spws do not require an
explicit spwmap setting, yet one or more does, it is safest
to specify it explicitly for all, e.g., spwmap=[1,2,4,4]
indicates that spw 3 will be corrected with solutions from spw 4, and
the others will behave nominally. Note that if no solutions exist
for any of the spws specified in spwmap, an error message
will result.
For type='TOPAC', an elevation-dependent opacity correction
will be applied according to the zenith opacity value supplied in the
opacity parameter. Currently, only one zenith opacity value
can be supplied, and it is used for all antennas.
For type='GAINCURVE', an elevation-dependent correction
will be applied using parameters read from the data repository.
Currently, this is only supported for the VLA.
Use the rawspw parameter to specify a spectral window from
which the phase will be copied for application (in a baseline-based
manner) to the data selected in setdata. The phases will be
scaled by the appropriate frequency ratio. Note that this option
currently only works when solving for or applying type='GSPLINE' solutions.
Currently, only single-polarization data will work with
type='BPOLY' or type='GSPLINE'.
Use the state function to review the list of calibration
components that have been set for application. To deselect a single
component, run setapply with unset=T and type
accordingly. Use the reset function to delect all components.
Pending improvements:
- Enable variety of interpolation modes and timescales
- Allow for antenna- and time-dependent opacities
- Generalize BPOLY and GSPLINE to dual polarization
- Provide more user-friendly selection