gaincal
- gaincal(vis, caltable='', field='', spw='', intent='', selectdata=True, timerange='', uvrange='', antenna='', scan='', observation='', msselect='', solint='inf', combine='', preavg=-1.0, refant='', refantmode='flex', minblperant=4, minsnr=3.0, solnorm=False, normtype='mean', gaintype='G', smodel='', calmode='ap', solmode='', rmsthresh='', corrdepflags=False, append=False, splinetime=3600.0, npointaver=3, phasewrap=180.0, docallib=False, callib='', gaintable='', gainfield='', interp='', spwmap='', parang=False)[source]
Determine temporal gains from calibrator observations
[Description] [Examples] [Development] [Details]
- Parameters
vis (path) - Name of input visibility file
caltable (string=’’) - Name of output gain calibration table
field (string=’’) - Select field using field id(s) or field name(s)
spw (string=’’) - Select spectral window/channels
intent (string=’’) - Select observing intent
selectdata (bool=True) - Other data selection parameters
selectdata = True
timerange (string=’’) - Select data based on time range
uvrange (variant=’’) - Select data by baseline length.
antenna (string=’’) - Select data based on antenna/baseline
scan (string=’’) - Scan number range
observation ({string, int}=’’) - Select by observation ID(s)
msselect (string=’’) - Optional complex data selection (ignore for now)
solint (variant=’inf’) - Solution interval
combine (string=’’) - Data axes which to combine for solve (obs, scan, spw, and/or field)
preavg (double=-1.0) - Pre-averaging interval (sec) (rarely needed)
refant (string=’’) - Reference antenna name(s)
refantmode (string=’flex’) - Reference antenna mode
minblperant (int=4) - Minimum baselines _per antenna required for solve
minsnr (double=3.0) - Reject solutions below this SNR
solnorm (bool=False) - Normalize (squared) solution amplitudes (G, T only)
solnorm = True
normtype (string=’mean’) - Solution normalization calculation type: mean or median
gaintype (string=’G’) - Type of gain solution (G,T,GSPLINE,K,KCROSS)
gaintype = GSPLINE
splinetime (double=3600.0) - Spline timescale(sec); All spw's are first averaged.
npointaver (int=3) - The phase-unwrapping algorithm
phasewrap (double=180.0) - Wrap the phase for jumps greater than this value (degrees)
smodel (doubleVec=’’) - Point source Stokes parameters for source model.
calmode (string=’ap’) - Type of solution” ('ap', 'p', 'a')
solmode (string=’’) - Robust solving mode: ('', 'L1', 'R','L1R')
rmsthresh (doubleVec=’’) - RMS Threshold sequence (for solmode='R' or 'L1R'; see help)
corrdepflags (bool=False) - Respect correlation-dependent flags
append (bool=False) - Append solutions to the (existing) table
docallib (bool=False) - Use callib or traditional cal apply parameters
docallib = False
docallib = True
callib (string=’’) - Cal Library filename
parang (bool=False) - Apply parallactic angle correction
- Returns
out (dict) - statistics of the solutions found, grouped by SPW and antenna, including solutions expected, above minblperant, and above minsnr, as well as what antennas were used as reference. Also gives information on data selection and calibration tables used.
- Description
The complex time-dependent gains for each antenna/spwid are determined from the ratio of the data column (raw data), divided by the model column, for the specified data selection. The gains can be obtained for a specified solution interval for each spectral window, or by a spline fit to all spectral windows simultaneously. Any specified prior calibrations (e.g., bandpass) will be applied on the fly.
Introduction
The fundamental calibration to be done on your interferometer data is to calibrate the antenna-based gains as a function of time, using gaincal. Systematic time-dependent complex gain errors are almost always the dominant calibration effect, and a solution for them is almost always necessary before proceeding with any other calibration solve. Traditionally, this calibration type has been a catch-all for a variety of similar effects, including: the relative amplitude and phase gain for each antenna/polarization, phase and amplitude drifts in the electronics of each antenna, amplitude response as a function of elevation (gain curve), and tropospheric amplitude and phase effects. In CASA, it is possible to handle many of these specific effects separately, as available information, circumstances, and required accuracy warrant, but if accuracy is not paramount it is still possible to solve for the net effect using a quick-and-dirty gaincal. In fact, gaincal is often used for an initial exploration of a dataset, to find data problems, etc. Also, a provisional gaincal solution can be used as prior calibration to optimize bandpass calibration. Such gaincal solutions are typically discarded.
It is best to have determined a (constant or slowly-varying) bandpass from the frequency channels by solving for the bandpass, and to include any other ancillary calibration that may be available via gencal (e.g., gaincurve, antenna position corrections, opacity, etc.).
Common calibration solve parameters
See Solving for Calibration for more information on the task parameters gaincal shares with all solving tasks, including data selection, general solving properties and arranging prior calibration. Also see the rerefant task documentation for the behavior of reference antenna application. Below we describe parameters unique to gaincal, and those common parameters with unique properties.
Gain calibration types: gaintype
The gaintype parameter selects the type of gain solution to compute. For complex gain calibration, the choices are ‘T’, ‘G’, and ‘GSPLINE’. The gaincal task also supports rudimetary delay solutions using ‘K’ and ‘KCROSS’.
Polarization-dependent sampled gain (gaintype=’G’)
Generally speaking, gaintype=’G’ can represent any multiplicative polarization- and time-dependent complex gain effect downstream of the polarizers. (Polarization- and time-independent effects upstream of the polarizers may also be treated implicitly with G.) Multi-channel data (per spectral window) will be averaged in frequency before solving (use calibration type B to solve for frequency-dependent effects within each spectral window).
Polarization-independent sampled gain (gaintype=’T’)
At high radio frequencies (>10 GHz), it is often the case that the most rapid time-dependent gain errors are introduced by the troposphere, and are polarization-independent. It is therefore unnecessary to solve for separate time-dependent solutions for both polarizations, as is the case for gaintype=’G’. Thus gaintype=’T’ is available to calibrate such tropospheric effects, differing from G only in that a single common solution for both polarizations is determined. In cases where only one polarization is observed, gaintype=’T’ is adequate to describe the time-dependent complex multiplicative gain calibration entirely. For the dual-polarization case, it is necessary to ensure that the two polarizations are, in fact, coherent by using a prior G or (unnormalized) bandpass calibration.
Spline gains (gaintype=’GSPLINE’)
At high radio frequencies, where tropospheric phase fluctuates rapidly, it is often the case that there is insufficient signal-to-noise to obtain robust G or T solutions on timescales short enough to track the variation. In this case it is desirable to solve for a best-fit functional form for each antenna using the GSPLINE solver. This fits a time-series of cubic B-splines to the phase and/or amplitude of the calibrator visibilities.
The combine parameter can be used to combine data across spectral windows, scans, and fields. Note that if you want to use combine=’field’, then all fields used to obtain a GSPLINE amplitude solution must have models with accurate relative flux densities. Use of incorrect relative flux densities will introduce spurious variations in the GSPLINE amplitude solution.
The GSPLINE solver requires a number of unique additional parameters, compared to ordinary G and T solving. The sub-parameters are:
gaintype = 'GSPLINE' # Type of solution (G, T, or GSPLINE) splinetime = 3600.0 # Spline (smooth) timescale (sec), default=1 hours npointaver = 3 # Points to average for phase wrap phasewrap = 180 # Wrap phase when greater than this
The duration of each spline segment is controlled by splinetime. The splinetime will be adjusted automatically such that an integral number of equal-length spline segments will fit within the overall range of data.
Phase splines require that cycle ambiguities be resolved prior to the fit; this operation is controlled by npointaver and phasewrap. The npointaver parameter controls how many contiguous points in the time-series are used to predict the cycle ambiguity of the next point in the time-series, and phasewrap sets the threshold phase jump (in degrees) that would indicate a cycle slip. Large values of npointaver improve the SNR of the cycle estimate, but tend to frustrate ambiguity detection if the phase rates are large. The phasewrap parameter may be adjusted to influence when cycles are detected. Generally speaking, large values (>180 degrees) are useful when SNR is high and phase rates are low. Smaller values for phasewrap can force cycle slip detection when low SNR conspires to obscure the jump, but the algorithm becomes significantly less robust. More robust algorithms for phase-tracking are under development (including traditional fringe-fitting).
Warning
GSPLINE solutions cannot be used in fluxscale. You should do at least some long-timescale G amplitude solutions to establish the flux scale, then do GSPLINE in phase before or after to fix up the short timescale variations. Note also that the phase tracking algorithm in GSPLINE needs some improvement.
Single- and multi-band delay (gaintype=’K’)
With gaintype=’K’ gaincal solves for simple antenna-based delays via Fourier transforms of the spectra on baselines to (only) the reference antenna. This is not a global fringe fit but will be useful for deriving delays from data of reasonable SNR. If combine includes ‘spw’, multi-band delays solved jointly from all selected spectral windows will be determined, and will be identified with the first spectral window id in the output caltable. When applying a multi-band delay table, a non-trivial spwmap is required to distribute the solutions to all spectral windows (fan-out is not automatic). As of CASA 5.6, multi-band delays can be solved using heterogeneous spws (e.g., with differing bandwidths, channelizations, etc.).
After solving for delays, a subsequent bandpass is recommended to describe higher-order channel-dependent variation in the phase and amplitude.
Cross-hand delays (gaintype=’KCROSS’)
With gaintype=’KCROSS’, gaincal solves for a global cross-hand delay. This is used only when doing polarimetry. Use parang=T to apply prior gain and bandpass solutions. This mode assumes that all cross-hand data (per spw) share the same cross-hand delay residual, which should be the case for a proper gain/bandpass calibration. See sections on polarimetry for more information on use of this mode. Multi-band cross-hand delays are only supported for homogeneous spws (same bandwidths, channelizations, etc.).
Solution normalization: solnorm, normtype
Nominally, gain solution amplitudes are implicitly scaled in amplitude to satisfy the the effective amplitude ratio between the visiibility data and model (as pre-corrected or pre-corrupted, respectively, by specified prior calibrations). If solnorm=True, the solution amplitudes will be normalized so as to achieve an effective time- and antenna-relative gain calibration that will minimally adjust the global amplitude scale of the visibility amplitudes when applied. This is desirable when the model against which the calibration is solved is in some way incomplete w.r.t. the net amplitude scale, but a antenna- and time-relative calibration is desired, e.g., amplitude-sensitive self-calibration when not all of the total flux density has been recovered in the visibility model. The normalization factor is calculated from the power gains (squared solution amplitudes) for all antennas and times (per spw) according to the the setting of normtype. If normtype=’mean’, (the default), the square root of the mean power gain is used to normalize the amplitude gains. If normtype=’median’, the median is used instead, which can be useful to avoid biasing of the normalization by outlier amplitudes. The default for solnorm is solnorm=False, which means no normalization.
Robust solving: solmode, rmsthresh
Warning
Robust solving modes in gaincal are considered experimental in CASA 5.5. With more experience and testing in the coming development cycles, we will provide more refined advice for use of these options.
Nominally (solmode=’’), gaincal performs an iterative, steepest-descent chi-squared minimization for its antenna-based gain solution, i.e., minimizaiton of the L2 norm. Visibility outliers (i.e., data not strictly consistent with the assumption of antenna-based gains and the supplied visibility model within the available SNR) can significantly distort the chi-squared gradient calculation, and thereby bias the resulting solution. For an outlier on a single baseline, the solutions for the antennas in that baseline will tend to be biased in the direction of the outlier, and all other antenna solutions in the other direction (by a lesser amount consistent with the fraction of normal, non-outlying baselines to them). It is thus desirable to dampen the influence of such outliers, and solmode/rmshresh provide a mechanism for achieving this. These options apply only to gaintype=’G’ and ‘T’, and will be ignored for other options.
Use of solmode=’L1’ invokes an approximate form of minimization of the aggregate absolute deviation of visibilities with respect to the model, i.e., the L1 norm. This is achieved by accumulating the nominal chi-squared and its gradient using weights divided by (at each iteration of the steepest descent process) the current per-baseline absolute residual (i.e., the square-root of each baseline’s chi-square contribution). (NB: It is not possible to analytically accumulate the gradient of L1 since the absolute value is not differentiable.) To avoid an over-reliance on baselines with atypically small residuals at each interation, the weight adjustments are clamped to a minimum (divided) value, and the steepest descent convergence is repeated three times with increasingly modest clamping. The net effect is to gently but effectively render the weight of relative outliers to appropriately damped influence in the solution.
Using solmode=’R’ invokes the normal L2 solution, but attempts to identify outliers (relative to apparent aggregate rms) upon steepest descent convergence, flag them, and repeat the steepest descent. Since outliers will tend to bias the rms calculation initially (and thus possibly render spuriously large rms residuals for otherwise good data), outlier detection and re-covergence is repeated with increasingly aggressive rms thresholds, a sequence specifiable in rmsthresh. By default (rmsthresh=[]) invokes a sequence of 10 thresholds borrowed from a traditional implementation found in AIPS: [7.0,5.0,4.0,3.5,3.0,2.8,2.6,2.4,2.2,2.5]. Note that the lower threshold values are likely to cull visibilites not formally outliers, but merely with modestly large residuals still consistent with gaussian statistitics, and thereby unnecessarily decrease net effective sensitivity in the gain solution (cf normal L2), especially for larger arrays where the number of baselines likely implies a larger number of visibility residuals falling in the modest wings of the distribution. Thus, it may be desirable to set rmsthresh manually to a more modest sequence of thresholds. Optimization of rmsthresh for modern arrays and conditions is an area of ongoing study.
Use of solmode=’L1R’ combines both the L1 and R modes described above, with the iterative clamped L1 loop occuring inside the R outliner excision threshold sequence loop.
- Examples
To solve for G on, say, fields 1 & 2, on a 90s timescale, and do so relative to gaincurve and bandpass corrections:
gaincal('data.ms', caltable='cal.G90s', # Write solutions to disk file 'cal.G' field='0,1', # Restrict field selection solint='90s', # Solve for phase and amp on a 90s timescale gaintable=['cal.B','cal.gc'], # prior bandpass and gaincurve tables refant='3') # reference antenna
To solve for more rapid tropopheric gains (3s timescale) using the above G solution, use gaintype=’T’:
gaincal(vis='data.ms', caltable='cal.T', # Output table name gaintype='T', # Solve for T (polarization-independent) field='0,1', # Restrict data selection to calibrators solint='3s', # Obtain solutions on a 3s timescale gaintable=['cal.B','cal.gc','cal.G90s'], # all prior cal refant='3') # reference antenna
To solve for GSPLINE phase and amplitudes, with splines of duration 600 seconds:
gaincal('data.ms', caltable='cal.spline.ap', gaintype='GSPLINE' # Solve for GSPLINE calmode='ap' # Solve for amp & phase field='0,1', # Restrict data selection to calibrators splinetime=600.) # Set spline timescale to 10min
- Development
No additional development details
- Parameter Details
Detailed descriptions of each function parameter
vis (path)
- Name of input visibility fileDefault: noneExample: vis=’ngc5921.ms’caltable (string='')
- Name of output gain calibration tableDefault: noneExample: caltable=’ngc5921.gcal’field (string='')
- Select field using field id(s) or field name(s)Default: ‘’ (all fields)Use ‘go listobs’ to obtain the list id’s ornames. If field string is a non-negative integer,it is assumed a field index, otherwise, it isassumed a field name.Examples:field=’0~2’; field ids 0,1,2field=’0,4,5~7’; field ids 0,4,5,6,7field=’3C286,3C295’; field named 3C286 and3C295field = ‘3,4C*’; field id 3, all namesstarting with 4Cspw (string='')
- Select spectral window/channelsDefault: ‘’ (all spectral windows and channels)Examples:spw=’0~2,4’; spectral windows 0,1,2,4 (allchannels)spw=’<2’; spectral windows less than 2(i.e. 0,1)spw=’0:5~61’; spw 0, channels 5 to 61,INCLUSIVEspw=’*:5~61’; all spw with channels 5 to 61spw=’0,10,3:3~45’; spw 0,10 all channels, spw3, channels 3 to 45.spw=’0~2:2~6’; spw 0,1,2 with channels 2through 6 in each.spw=’0:0~10;15~60’; spectral window 0 withchannels 0-10,15-60. (NOTE ‘;’ to separatechannel selections)spw=’0:0~10^2,1:20~30^5’; spw 0, channels0,2,4,6,8,10, spw 1, channels 20,25,30intent (string='')
- Select observing intentDefault: ‘’ (no selection by intent)Example: intent=’BANDPASS’ (selects datalabelled with BANDPASS intent)selectdata (bool=True)
- Other data selection parametersDefault: TrueOptions: True|Falsetimerange (string='')
- Select data based on time rangeSubparameter of selectdata=TrueDefault = ‘’ (all)Examples:timerange =‘YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss’(Note: if YYYY/MM/DD is missing date defaultsto first day in data set.)timerange=’09:14:0~09:54:0’ picks 40 min onfirst daytimerange= ‘25:00:00~27:30:00’ picks 1 hr to 3hr 30min on NEXT daytimerange=’09:44:00’ pick data within oneintegration of timetimerange=’>10:24:00’ data after this timeuvrange (variant='')
- Select data by baseline length.Default = ‘’ (all)Examples:uvrange=’0~1000klambda’; uvrange from 0-1000 kilo-lambdauvrange=’>4klambda’;uvranges greater than 4 kilo-lambdauvrange=’0~1000km’; uvrange in kilometersantenna (string='')
- Select data based on antenna/baselineSubparameter of selectdata=TrueDefault: ‘’ (all)If antenna string is a non-negative integer, itis assumed an antenna index, otherwise, it isassumed as an antenna nameExamples:antenna=’5&6’; baseline between antennaindex 5 and index 6.antenna=’VA05&VA06’; baseline between VLAantenna 5 and 6.antenna=’5&6;7&8’; baselines withindices 5-6 and 7-8antenna=’5’; all baselines with antenna index5antenna=’05’; all baselines with antennanumber 05 (VLA old name)antenna=’5,6,10’; all baselines with antennas5,6,10 index numbersscan (string='')
- Scan number rangeSubparameter of selectdata=TrueDefault: ‘’ = allCheck ‘go listobs’ to insure the scan numbers arein order.observation ({string, int}='')
- Select by observation ID(s)Subparameter of selectdata=TrueDefault: ‘’ = allExample: observation=’0~2,4’msselect (string='')
- Optional complex data selection (ignore for now)solint (variant='inf')
- Solution intervalDefault: ‘inf’ (infinite, up to boundariescontrolled by combine);Options: ‘inf’ (~infinite), ‘int’ (perintegration), any float or integer value with orwithout unitsExamples:solint=’1min’; solint=’60s’, solint=60 (i.e.,1 minute); solint=’0s’; solint=0; solint=’int’(i.e., per integration); solint-‘-1s’;solint=’inf’ (i.e., ~infinite, up toboundaries enforced by combine)combine (string='')
- Data axes which to combine for solveDefault: ‘scan’ (solutions will break at obs,field, and spw boundaries)Options: ‘’,’obs’,’scan’,’spw’,field’, or anycomma-separated combination in a single stringExample: combine=’scan,spw’ - Extend solutionsover scan boundaries (up to the solint), andcombine spws for solvingpreavg (double=-1.0)
- Pre-averaging interval (sec)Default: -1.0 (none)Rarely needed. Will average data over periodsshorter than the solution interval first.refant (string='')
- Reference antenna name(s); a prioritized list may bespecifiedDefault: ‘’ (No refant applied)Examples:refant=’4’ (antenna with index 4)refant=’VA04’ (VLA antenna #4)refant=’EA02,EA23,EA13’ (EVLA antenna EA02,use EA23 and EA13 as alternates if/when EA02drops out)Use taskname=listobs for antenna listingrefantmode (string='flex')
- Reference antenna modeminblperant (int=4)
- Minimum number of baselines required per antenna for eachsolveDefault: 4Antennas with fewer baselines are excluded fromsolutions.Example: minblperant=10 –> Antennasparticipating on 10 or more baselines areincluded in the solveminblperant = 1 will solve for all baselinepairs, even if only one is present in the dataset. Unless closure errors are expected, usetaskname=gaincal rather than taskname=blcal toobtain more options in data analysis.minsnr (double=3.0)
- Reject solutions below this SNRDefault: 3.0solnorm (bool=False)
- Normalize (squared) solution amplitudes (G, T only)Default: False (no normalization)normtype (string='mean')
- Solution normalization calculation type: mean or medianDefault: ‘mean’gaintype (string='G')
- Type of gain solution (G,T,GSPLINE,K,KCROSS)Default: ‘G’Example: gaintype=’GSPLINE’- ‘G’ means determine gains for each polarization and sp_wid- ‘T’ obtains one solution for both polarizations;Hence. their phase offset must be first removedusing a prior G.- ‘GSPLINE’ makes a spline fit to the calibratordata. It is useful for noisy data and fits asmooth curve through the calibrated amplitude andphase. However, at present GSPLINE is somewhatexperimental. Use with caution and checksolutions.- ‘K’ solves for simple antenna-based delays viaFFTs of the spectra on baselines to the referenceantenna. (This is not global fringe-fitting.)If combine includes ‘spw’, multi-band delays aredetermined; otherwise, per-spw single-band delayswill be determined.- ‘KCROSS’ solves for a global cross-hand delay.Use parang=T and apply prior gain and bandpasssolutions. Multi-band delay solves(combine=’spw’) not yet supported for KCROSS.smodel (doubleVec='')
- Point source Stokes parameters for source model(experimental).Default: [] (use MODEL_DATA column)Example: [1,0,0,0] (I=1, unpolarized)calmode (string='ap')
- Type of solution” (‘ap’, ‘p’, ‘a’)Default: ‘ap’ (amp and phase)Options: ‘p’ (phase) ,’a’ (amplitude), ‘ap’(amplitude and phase)Example: calmode=’p’solmode (string='')
- Robust solving mode:Options: ‘’, ‘L1’, ‘R’, ‘L1R’rmsthresh (doubleVec='')
- RMS Threshold sequenceSubparameter of solmode=’R’ or ‘L1R’See CASA Docs for more informationcorrdepflags (bool=False)
- If False (default), if any correlation is flagged, treat all correlations inthe visibility vector as flagged when solving (per channel, per baseline).If True, use unflagged correlations in a visibility vector, even if one or moreother correlations are flagged.Default: False (treat correlation vectors with one or more correlations flagged as entirely flagged)Traditionally, CASA has observed a strict interpretation ofcorrelation-dependent flags: if one or more correlations(for any baseline and channel) is flagged, then all availablecorrelations for the same baseline and channel aretreated as flagged. However, it is desirable in somecircumstances to relax this stricture, e.g., to preserve useof data from antennas with only one good polarization (e.g., one polarizationis bad or entirely absent). Solutions for the bad or missing polarizationwill be rendered as flagged.append (bool=False)
- Append solutions to the (existing) tableDefault: False (overwrite existing table or makenew table)Appended solutions must be derived from the sameMS as the existing caltable, and solution spwsmust have the same meta-info (according to spwselection and solint) or be non-overlapping.splinetime (double=3600.0)
- Spline timescale(sec); All spw's are first averaged.Subparameter of gaintype=’GSPLINE’Default: 3600 (1 hour)Example: splinetime=1000Typical splinetime should cover about 3 to 5calibrator scans.npointaver (int=3)
- Tune phase-unwrapping algorithmSubparameter of gaintype=’GSPLINE’Default: 3; Keep at this valuephasewrap (double=180.0)
- Wrap the phase for jumps greater than this value(degrees)Subparameter of gaintype=’GSPLINE’Default: 180; Keep at this valuedocallib (bool=False)
- Control means of specifying the caltablesDefault: False (Use gaintable, gainfield, interp,spwmap, calwt)Options: False|TrueIf True, specify a file containing cal library incallibcallib (string='')
- Specify a file containing cal library directivesSubparameter of docallib=Truegaintable (stringVec='')
- Gain calibration table(s) to apply on the flyDefault: ‘’ (none)Subparameter of docallib=FalseExamples:gaintable=’ngc5921.gcal’gaintable=[‘ngc5921.ampcal’,’ngc5921.phcal’]gainfield (stringVec='')
- Select a subset of calibrators from gaintable(s)Default: ‘’ (all sources on the sky)‘nearest’ ==> nearest (on sky) available field intable otherwise, same syntax as fieldExamples:gainfield=’0~2,5’ means use fields 0,1,2,5from gaintablegainfield=[‘0~3’,’4~6’] means use field 0through 3interp (stringVec='')
- Interpolation parmameters (in time[,freq]) for each gaintable, as a list of strings.Default: ‘’ –> ‘linear,linear’ for all gaintable(s)Options: Time: ‘nearest’, ‘linear’Freq: ‘nearest’, ‘linear’, ‘cubic’,‘spline’Specify a list of strings, aligned with the list of caltable specifiedin gaintable, that contain the required interpolation parametersfor each caltable.- When frequency interpolation is relevant (B, Df,Xf), separate time-dependent and freq-dependentinterp types with a comma (freq after thecomma).- Specifications for frequency are ignored when thecalibration table has no channel-dependence.- Time-dependent interp options ending in ‘PD’enable a “phase delay” correction per spw fornon-channel-dependent calibration types.- For multi-obsId datasets, ‘perobs’ can beappended to the time-dependent interpolationspecification to enforce obsId boundaries wheninterpolating in time.- For multi-scan datasets, ‘perscan’ can beappended to the time-dependent interpolationspecification to enforce scan boundaries wheninterpolating in time.- Freq-dependent interp options can have ‘flag’ appendedto enforce channel-dependent flagging, and/or ‘rel’appended to invoke relative frequency interpolationExamples:interp=’nearest’ (in time, freq-dep will belinear, if relevant)interp=’linear,cubic’ (linear in time, cubicin freq)interp=’linearperobs,splineflag’ (linear intime per obsId, spline in freq withchannelized flagging)interp=’nearest,linearflagrel’ (nearest intime, linear in freq with with channelizedflagging and relative-frequency interpolation)interp=’,spline’ (spline in freq; linear intime by default)interp=[‘nearest,spline’,’linear’] (formultiple gaintables)spwmap (any='')
- Spectral window mappings to form for gaintable(s)Only used if callib=Falsedefault: [] (apply solutions from each calibration spw tothe same MS spw only)Any available calibration spw can be mechanically mapped to anyMS spw.Examples:spwmap=[0,0,1,1] means apply calibrationfrom cal spw = 0 to MS spw 0,1 and cal spw 1 to MS spws 2,3.spwmap=[[0,0,1,1],[0,1,0,1]] (use a list of lists for multiplegaintables)parang (bool=False)
- Apply parallactic angle correctionDefault: FalseIf True, apply the parallactic angle correction(required for polarization calibration)