2.2.1 Arrange to apply calibration
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’), or are calculated analytically on the fly (types ’P’, ’TOPAC’, ’GAINCURVE’).
When specifying an existing calibration table, it is not necessary to explicitly specify the ; this will be discerned from the table. (Specifying the type as well as the table will force a check that the table contains solutions of the desired type.
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 state function to review the list of calibration components that have been set for application.
Pending improvements:
Arguments
| Inputs |
| ||
| type |
| Component type
| |
| allowed: | string |
|
| Default: | B BPOLY G GSPLINE D P T TOPAC GAINCURVE |
|
| t |
| Interpolation interval (seconds)
| |
| allowed: | double |
|
| Default: | 0.0 |
|
| table |
| Calibration table name
| |
| allowed: | string |
|
| Default: |
|
|
| interp |
| Interpolation type (in time)
| |
| allowed: | string |
|
| Default: | aipslin nearest linear |
|
| select |
| TAQL selection string. Default is no selection.
| |
| allowed: | string |
|
| Default: |
|
|
| calwt |
| Calibrate weights?
| |
| allowed: | bool |
|
| Default: | false |
|
| spwmap |
| Spectral windows to apply
| |
| allowed: | intArray |
|
| Default: | -1 |
|
| opacity |
| Array-wide zenith opacity (for type=’TOPAC’)
| |
| allowed: | double |
|
| Default: | 0.0 |
|
Example
c:=calibrater(’3C273XC1.MS’);
c.setdata(); c.setapply (type=’G’, table=’gcal2’, select=’FIELD_NAME==FIELD1’) c.setapply (type=’P’ t=10.0) c.correct(); c.close(); |
In this example, ’G’ solutions from FIELD1 in table gcal2, and ’P’ solutions calculated on a 10-second timescale are applied to the entire visibility dataset.
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2008 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.