calibrater

class calibrater[source]

Synthesis calibration (self- and cross-)

The calibrater tool (cb) provides for synthesis calibration operations within CASA.

Methods Summary

accumulate

Accumulate incremental calibration solutions into a cumulative calibration table

activityrec

Returns a record containing properties of recent activity

calibrater

Construct a calibrater tool

close

Close the calibrater tool

correct

Apply calibration information

corrupt

Corrupt model with calibration tables

createcaltable

Create an empty calibration table

delmod

Delete model data representations in the MS.

done

Destroy the calibrater tool

fluxscale

Bootstrap the flux density scale from standard calibrators

initcalset

Re-initialize the calibration scratch columns.

initweights

Initialize MS weight info in various ways.

linpolcor

Correct the gain table for linear polarization of the calibrator

listcal

List the contents of a calibration table

modelfit

Model fitting

open

Attach MeasurementSet to the calibrater tool

parsecallibfile

Bootstrap the flux density scale from standard calibrators

plotcal

Plot a calibration table

posangcal

Apply position angle calibration to an existing cal table

rerefant

Apply a new reference antenna

reset

Reset the selected apply and/or solve components

selectvis

Set the data selection for subsequent processing

setapply

Arrange to apply calibration

setcallib

Arrange to apply calibration via a Cal Library

setcorrdepflags

Control use of correlation-dependent flags

setmodel

Set the sky model used to compute the model visibilities

setptmodel

Set the point source model Stokes parameters to be used to compute the model visibilities

setsolve

Arrange to solve for calibration

setsolvebandpoly

Specialization of setsolve for polynomial B (bandpass) solving

setsolvegainspline

Specialization of setsolve for cubic spline G (time-dependent gain) solving

setvi

TEMPORARY method to control use of new VI2 regime

smooth

Produce a smoothed calibration table

solve

Solve for the selected calibration components

specifycal

Externally specify calibration of various types

state

Request the apply/solve state of the calibrater tool.

updatecaltable

Caltable modernizer.

validatecallib

Validate a Cal Library record

accumulate(tablein='', incrtable='', tableout='', field='', calfield='', interp='linear', t=- 1.0, spwmap=[- 1])[source]

Accumulate incremental calibration solutions into a cumulative calibration table

This function enables cumulative calibration using { t calibrater}. It is the analog of the task ``CLCAL’’ in classic AIPS.

The { t accumulate} function is useful when:

egin{itemize} item a calibration solution of a particular type already exists, item an incremental calibration solution {em of the same type} is desired (an incremental solution in this context means derived independently from, or determined with respect to, the first) item the first calibration cannot be implicitly recovered in the course of obtaining the incremental solution end{itemize}

For example, a phase-only ``G’’ self-calibration on a target source may be desired to tweak the full amplitude and phase ``G’’ calibration already obtained from a calibrator. The initial calibration (from the calibrator) contains amplitude information, and so must be carried forward, yet the phase-only solution itself cannot (by definition) recover this information, as a full amplitude and phase self-calibration would. In this case, the initial solution must be applied while solving for the phase-only solution, then the two solutions combined to form a {em cumulative} calibration embodying the net effect of both. In terms of the Measaurement Equation, the net calibration is the {em product} of the initial and incremental solutions.

The analog of { t accumulate} in classic AIPS is the use of CLCAL to combine a series of (incremental) SN calibration tables to form successive (cumulative) CL calibration tables.

Cumulative calibration tables also provide a means of generating carefully interpolated calibration, on variable user-defined timescales, that can be examined prior to application to the data with { t setapply} and { t correct}. The solutions for different fields and/or spectral windows can be interpolated in different ways, with all solutions stored in the same table.

The only difference between incremental and cumulative calibration tables is that incremental tables are generated directly from the data via { t solve} or (in the near future) from other ancilliary data (e.g. weather information), and cumulative tables are generated from other cumulative and incremental tables via { t accumulate}. In all other respects (internal format, application to data via { t setapply} and { t correct}, plotting with { t plotcal}, etc.), they are the same, and therefore interchangable. Thus, { t accumulate} and cumulative calibration tables need only be used when circumstances require it.

The { t accumulate} function represents a generalization on the classic AIPS CLCAL model of cumulative calibration in that its application is not limited to accumulation of ``G’’ solutions (SN/CL tables classic AIPS are the analog of ``G’’ (and, implicitly, ``T’’) in { t aips++}). In principle, any basic calibration type can be accumulated (onto itself), as long as the result of the accumulation (matrix product) is of the same type. This is true of all the basic types, except ``D’’. Accumulation is currently supported for ``B’’, ``G’’, and ``T’’, and, in future, ``F’’ (ionospheric Faraday rotation), ``J’’ (generic full-polarization calibration), fringe-fitting, and perhaps others. Accumulation of certain specialized types (e.g., ``GSPLINE’’, ``TOPAC’’, etc.) onto the basic types will be supported in the near future. The treatment of various calibration from ancilliary data (e.g., system temperatures, weather data, WVR, etc.), as they become available, will also make use of { t accumulate} to achieve the net calibration.

Note that accumulation only makes sense if treatment of a uniquely incremental solution is required (as described above), or if a careful interpolation or sampling of a solution is desired. In all other cases, re-solving for the type in question will suffice to form the net calibration of that type. For example, the product of an existing ``G’’ solution and an amplitude and phase ``G’’ self-cal (solved with the existing solution applied), is equivalent to full amplitude and phase ``G’’ selfcal (with no prior solution applied), as long as the timescale of this solution is at least as short as that of the existing solution.

Use of { t accumulate} is straightforward:

The { t tablein} parameter is used to specify the existing cumulative calibration table to which an incremental table is to be applied. Initially, no such table exists, and { t accumulate} will generate one from scratch (on-the-fly), using the timescale (in seconds) specified by the parameter { t t}. These nominal solutions will be unit-amplitude, zero-phase (i.e., unit matrix) calibration, ready to be adjusted by accumulation. When { t t} is negative (the default), the table name specified in { t tablein} must exist and will be used.

The { t incrtable} parameter is used to specify the incremental table that should be applied to { t tablein}. The calibration type of { t incrtable} sets the type assumed in the operation, so { t tablein} must be of the same type. If it is not, { t accumulate} will exit with an error message. (Certain combinations of types and subtypes will be supported by accumulate in the future.)

The { t tableout} parameter is used to specify the name of the output table to write. If un-specified (or ``’’), then { t tablein} will be overwritten. Use this feature with care, since an error here will require building up the cumulative table from the most recent distinct version (if any).

The { t field} parameter specifies those field names (standard selection syntax) in { t tablein} to which the incremental solution should be applied. The solutions for other fields will be passed to { t tableout} unaltered. If the cumulative table was created from scratch in this run of { t accumulate}, then these solutions will be unit-amplitude, zero-phase, as described above.

The { t calfield} parameter is used to specify the fields (standard selection syntax) to select from { t incrtable} to use when applying to { t tablein}. Together, use of { t field} and { t calfield} permit completely flexible combinations of calibration accumulation with respect to fields. Multiple runs of { t accumulate} can be used to generate a single table with many combinations. In future, a ``self’’ mode will be enabled that will simplify the accumulation of field-specific solutions.

The { t interp} parameter is used to specify the interpolation type to use on the incremental solutions, as in { t setapply}. The currently available interpolation types are ``nearest’’, ``linear’’, and ``aipslin’’. See the { t setapply} URM documentation for more details.

The { t spwmap} parameter enables accumulating solutions from differing spectral windows. See { t setapply} for details on how spwmap works.

Pending improvements:

egin{itemize} item Implement a ``self’’ mode (independent of interpolation type), to simplify or eliminate use of the { t field} and { t calfield} parameters in some contexts (e.g., self-cal) item More interpolation modes, e.g., ``cubic’’, and interpolation timescale (timerange to permit interpolation) item Handle propogation (or not) of bad/flagged solutions item Support of specialized types (e.g., TOPAC) onto the basic types item Smoothing (probably a separate function) end{itemize}

Parameters

  • tablein (string='') - Input cumulative calibration table name

  • incrtable (string='') - Input incremental calibration table name

  • tableout (string='') - Output cumulative calibration table name. Default is input table name.

  • field (variant='') - List of fields (names) to update in input cumulative table. Default is all.

  • calfield (variant='') - List of fields (names) in incremental table to use. Default is use all.

  • interp (string='linear') - Interpolation mode to use on incremental solutions

  • t (double=-1.0) - Cumulative table timescale when creating from scratch

  • spwmap (intArray=[-1]) - Spectral windows to apply

activityrec()[source]

Returns a record containing properties of recent activity

This funtion enables returning generic information about recent activity.

Pending improvements:

egin{itemize} item ?? end{itemize}

calibrater()[source]

Construct a calibrater tool

Create a { t calibrater} tool. The casapy environment provides a standard calibrater tool for general use (cb), but additional calibrater tools may be created if needed. Calibrater tools created in this way are independent of the standard calibrater tool.

close()[source]

Close the calibrater tool

Close the { t calibrater} tool, which is hardly ever necessary.

correct(applymode='')[source]

Apply calibration information

This function applies the calibration components specified via one or more invocations of the {stff setapply} function to the observed visibility data and writes the result to the CORRECTED_DATA column of the Measurement Set.

Parameters

  • applymode (string='') - Correction cal/flag mode: ‘’=’calflag’,’cal’,’flag’,’trial’

corrupt()[source]

Corrupt model with calibration tables

This function applies the calibration components specified via one or more invocations of the {stff setapply} function to the model visibility data and (over-)writes the result to the MODEL_DATA column of the Measurement Set.

createcaltable(caltable='', partype='', caltype='', singlechan='')[source]

Create an empty calibration table

Creates an empty calibration table that can subsequently be filled with by using the table tool.

Parameters

  • caltable (string='') - Calibration table name

  • partype (string='') - Parameter type name

  • caltype (string='') - Calibration type name

  • singlechan (bool='') - Create a calibration table with frequency-independent parameters?

delmod(otf=False, field='', spw='', scr=False)[source]

Delete model data representations in the MS.

This method can be used to delete the model visibility data representations in the MS. The ‘otf’ representation is the new (as of v3.4) ‘scratch-less’ model data, stored as keywords in the MS header containing model data formation instructions. It is generated by the im tool (setjy, ft, and clean methods; usescratch=F in im.open), and if present, overrides the old-fashioned MODEL_DATA column (if present). If a user wishes to use the MODEL_DATA column _after_ having operated with the ‘otf’ representation, this method can be used to delete the ‘otf’ represenatation to make the MODEL_DATA column visible. (Create the MODEL_DATA column by using usescratch=T in the im tool, or by running the cb.open with addmodel=T.)

If otf=T, the user may selectively remove only a selection of fields model from the MS by specifying the field parameter. Similarly if the field parameter is specified, selected spws model for those fields may be deleted by specifying the spw.

For convenience, this method also provides a means for deleting the MODEL_DATA column by setting scr=T.

Parameters

  • otf (bool=False) - If T, delete the otf model data keywords

  • field (variant='') - Select on field

  • spw (variant='') - Select on spw only if field is defined

  • scr (bool=False) - If T, delete the MODEL_DATA column

done()[source]

Destroy the calibrater tool

This function is redundant with the {stfaf close} method.

fluxscale(tablein='', reference='', tableout='', transfer='', listfile='', append=False, refspwmap=[- 1], gainthreshold=- 1.0, antenna='', timerange='', scan='', incremental=False, fitorder=1, display=False)[source]

Bootstrap the flux density scale from standard calibrators

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 median gain norm of the calibration solutions derived for the calibrators specified in {stfaf reference} (one or more sources with known flux densities at the time of G solving) with that of the calibrators specified in {stfaf 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. The {stfaf reference} and {stfaf transfer} parameters may be specified using the general field selection syntax (as in {stfaf field} in {stfaf selectvis}).

If no { t transfer} fields are specified, then the solutions for all non-reference fields in { t tablein} will be re-scaled.

If no { t 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 { t reference} and { t transfer} specifications. Use { t append=T} to append the scaled solutions to an existing table.

Use the {stfaf refspwmap} parameter to indicate how data for different spectral windows should be matched in calculating the flux density scale factor for {stfaf transfer} fields. The default behavior for { t refspwmap} is to insist on precisely matching spectral windows for { t reference} and { t transfer} fields. When specified, the {stfaf refspwmap} parameter takes a vector of integers indicating which spectral window solutions to use as the reference for others, such that { t 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 { t reference} fields were observed only in spw=2 & 4, and the { t transfer} fields were observed variously in all 4 spws, specify { t refspwmap=[2,2,4,4]}. This will ensure that { t transfer} fields observed in spws 1,2,3,4 will be referenced to { t reference} field data from spws 2,2,4,4, respectively. Note that if the { t transfer} fields were observed only in spws 1 & 3, the same specification would work, but { t 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 gain values used in the flux scaling determination skewed by outliers. The parameters, { t gainthreshold} and { t antenna} can be used to limit the input gain solutions to be included in the flux scale determination. Use the { t gainthreshold} is a threshold in % from the median values of the gain solutions to be used. Use the { t antenna} to select or de-selesect (using the MSSelection syntax) antenna(s). Futher refinements on the selection based on timerange and scan are possible.

The derived flux densities for the transfer fields will be reported in the logger, and returned to the Python dictionary specified in { t fluxd}. This will be an 2D array of shape [number-of-spectral-windows X number-of-fields]. When mulitple spectral windows are involved the spectral index will also be reported by fitting the determined flux densities across the freuquencies. The order of a polynomcial to be fitted can be specified with { t fitorder}.

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 { t setapply}.

Note that the visibility data itself is not used directly by this function.

Pending improvements:

egin{itemize} item Allow antenna and uv-distance selection to improve results for resolved calibrators item Set the visibility model according to the flux density results item An option to use the data to derive the relative flux densities end{itemize}

Parameters

  • tablein (string='') - Input calibration table name

  • reference (variant='') - Reference calibrator field names (comma-separated)

  • tableout (string='') - Output calibration table name. Default is input calibration table name.

  • transfer (variant='') - Transfer source field names (comma-separated). Default is all other fields.

  • listfile (string='') - Name of listfile that contains the fit information. Default is ‘’ (no file).

  • append (bool=False) - Append to existing table?

  • refspwmap (intArray=[-1]) - List of alternate spw for referencing

  • gainthreshold (float=-1.0) - Threshold of gain amplitudes with respect to the median value to be used in

    flux scale calculation. Default: -1.0 (no threshold)

  • antenna (string='') - antenna selection/de-selection in

    flux scale calculation. Default: “”(include all antennas)

  • timerange (string='') - timerage sub-selection with antenna selection in

    flux scale calculation. Default: “”(include all)

  • scan (string='') - scan sub-selection with antenna selection in

    flux scale calculation. Default: “”(include all)

  • incremental (bool=False) - create a incremental caltable

  • fitorder (int=1) - order for spectral fitting for multiple spws

  • display (bool=False) - display statistics of the flux ratios

initcalset(calset=0)[source]

Re-initialize the calibration scratch columns.

This function re-initializes the calibration scratch columns: MODEL_DATA to unity (in total intensity, and unpolarized), and CORRECTED_DATA to (observed) DATA. Optionally if calset is set to 1 any model saved in the MS header to for calibration purposes is deleted

Parameters

  • calset (int=0) - if it set to 1 the model saved in the header is removed

initweights(wtmode='nyq', dowtsp=False, tsystable='', gainfield='', interp='', spwmap=[''])[source]

Initialize MS weight info in various ways.

This function initializes the MS weight info in various ways.

If wtmode=’ones’, SIGMA and WEIGHT will be initialized with 1.0, globally.

If wtmode=’nyq’ (the default), SIGMA and WEIGHT will be initialized according to bandwidth and integration time. This is the theoretically correct mode for raw normalized visibilities.

If wtmode=’sigma’, WEIGHT will be initialized according to the existing SIGMA column.

If mode=’weight’, WEIGHT_SPECTRUM will be initialized according to the existing WEIGHT column; dowtspec=T must be specified in this case.

For the above wtmodes, if dowtspec=T (or if the WEIGHT_SPECTRUM column already exists), the WEIGHT_SPECTRUM column will be initialized (uniformly in channel), in a manner consistent with the WEIGHT column. If the WEIGHT_SPECTRUM column does not exist, dowtsp=T will force its creation.

The follow modes should be used with extreme care: If wtmode=’delwtsp’, the WEIGHT_SPECTRUM column will be deleted (if it exists). If wtmode=’delsigsp’, the SIGMA_SPECTRUM column will be deleted (if it exists). Note that creation of SIGMA_SPECTRUM is not supported via this method.

Note that this method does not support any prior selection. Intialization of the weight information must currently be done globally or not at all. This is to maintain consistency.

Parameters

  • wtmode (string='nyq') - Initialization mode

  • dowtsp (bool=False) - Initialize WEIGHT_SPECTRUM column

  • tsystable (string='') - Tsys calibration table to apply on the fly

  • gainfield (string='') - Select a subset of calibrators from Tsys caltable

  • interp (string='') - Interp type in time[,freq]. default==linear,linear

  • spwmap (intArray=['']) - Spectral windows combinations to form for gaintables(s)

linpolcor(tablein='', tableout='', fields=[''])[source]

Correct the gain table for linear polarization of the calibrator

THIS METHOD IS CURRENTLY DISABLED.

This function can be used to correct the gains derived from secondary calibrators with unknown or variable polarization. It should only be used for arrays with linear (X/Y) feeds and an Alt-Az mount for which the observed polarization varies with feed position angle on the sky.

The function fits the gains with a sine and cosine term in feed position angle and extracts the Q and U components of the secondary calibrator. This is only possible if there is sufficient range in the position angle (i.e., minimum of about 6 scans spanning at least 90 degrees in position angle). Check the error of the fit to judge if the fit was succesfull, it should generally be smaller than 0.5%.

Use the {stfaf fields} argument to select calibrator fields to be fitted. The function takes a calibration table as input, and can write the adjusted gain solutions to the same table on output, or create a new table containing these results. The function also prints the derived polarization for each field for each spectral window.

Parameters

  • tablein (string='') - Input calibration table name

  • tableout (string='') - Output calibration table name

  • fields (stringArray=['']) - Calibrator field names

listcal(caltable='', field='', antenna='', spw='', listfile='', pagerows=50)[source]

List the contents of a calibration table

calibrater.listcal() lists antenna gain solutions in tabular form. The table is organized as follows. Solutions are output by egin{enumerate} item Spectral window, item Antenna, item Time, item Channel, item and Polarization. end{enumerate} The inner-most loop is over polarization. A ``Spw Header’’ row is printed each time the spectral window changes. In addition to listing the spectral window ID (SpwID), the Spw Header also lists the date of observation (Date), the calibration table name (CalTable), and the measurement set name (MS name). A lower-level ``antenna header’’ is printed each time the antenna names change or every `pagerows’ of output, whichever comes first. The antenna header column are described here:

egin{tabular}{ll} hline hline Column Name & Description hline Ant & Antenna name Time & Visibility timestamp corresponding to gain solution Field & Field name Chn & Channel number Amp & Complex solution amplitude Phs & Complex solution phase F & Flag hline hline end{tabular}

Elements of the ``F’’ column contain an `F’ when the datum is flagged, and ` ‘ (whitespace) when the datum is not flagged.

Presently, the polarization mode names (for example: R, L) are not given, but the ordering of the polrization modes (left-to-right) is equivalent to the order output by task listobs (see ``Feeds’’ in listobs output).

Parameters

  • caltable (string='') - Calibration table to list

  • field (variant='') - Field names or indices to list: ‘’==>all

  • antenna (variant='') - Antenna/Baseline to list: ‘’==>all

  • spw (variant='') - Spectral windows and channels: ‘’==>all, spw=’10:8~20’

  • listfile (string='') - Send output to file: ‘’==>send to terminal)

  • pagerows (int=50) - Rows per page

modelfit(vary='', niter=0, compshape='P', par=[1.0, 0.0, 0.0], file='')[source]

Model fitting

This method fits single-component models (points, elliptical Gaussians or elliptical Disks_ to the CORRECTED_DATA of the selected field. A first guess for the component parameters may be specified in the {stfaf par} parameter.

Parameters

  • vary (boolArray='') - If specified where T, let this parameter (in par) vary in fit

  • niter (int=0) - Number of non-linear fitting iterations

  • compshape (string='P') - Component shape, P=point G=gaussian

  • par (doubleArray=[1.0, 0.0, 0.0]) - Initial guess for fit parameters (default is for “P)”I flux, rel RA, rel Dec, 1,0, 0.0, 0.0 are defaults

  • file (string='') - If specified, output componentslist file name,

    if empty don’t write componentslist file

open(filename='', compress=False, addcorr=True, addmodel=True)[source]

Attach MeasurementSet to the calibrater tool

Attaches a MeasurementSet to the { t calibrater} tool for further processing with other methods.

Parameters

  • filename (string='') - MeasurementSet file name. No default

  • compress (bool=False) - Compress calibration columns?

  • addcorr (bool=True) - Add scratch columns?

  • addmodel (bool=True) - Add MODEL_DATA column along with CORRECTED_DATA ?

parsecallibfile(filein='')[source]

Bootstrap the flux density scale from standard calibrators

TBD

Parameters

  • filein (string='') - Input cal library file name

plotcal(antennas='', fields='', spwids='', plottype='1/AMP', tablename='', polarization=1, multiplot=False, nx=1, ny=1, psfile='')[source]

Plot a calibration table

This function plots a calibration table either to a plotter or to a file.

The argument {stfaf plottype} can take the following values for all types of solutions: egin{description} item[AMP] Gain Amplitude vs. Time item[1/AMP] Inverse Gain Amplitude vs. Time (useful for comparing with classic AIPS) item[PHASE] Gain Phase vs. Time item[RI] Gain Real vs. Imaginary item[RLPHASE] Right/Left Gain phase difference (if polarizations are R,L) item[XYPHASE] X/Y Gain phase difference (if polarizations are X,Y) end{description}

The argument {stfaf plottype} can take the following values for D tables

egin{description} item[DAMP] Cross-polarized Gain Amplitude vs. Time item[DPHASE] Cross-polarized Gain Phase vs. Time item[DRI] Cross-polarized Gain Real vs. Imaginary end{description}

The quality of the solutions can be examined with the following {stfaf plottype} choices: egin{description} item[FIT] Fit per spectral window item[FITWGT] Fit weight per spectral window item[TOTALFIT] Total fit end{description}

By default, all antennas (as specified in the antennas argument) will appear on the same plot. Separate plots (all with the same scale) for each antenna can be activated by setting multiplot=T. The multiplot argument only separates plots by antenna (not, e.g., by the field_id(s) specified in the fields argument). If multiplot=T, the nx and ny arguments can be used to specify the number of plots per page.

At the moment, only one polarization can be plotted per execution. This restriction will be relaxed in the near future.

For B solutions, the plotting will loop over timestamps (if more than one).

A hardcopy plot can be created by specifying the exttt{psfile} argument (which is especially useful for batch processing when a display screen is not available). This will cause the plot to be written to a PostScript file which can be subsequently sent to a printer.

Parameters

  • antennas (intArray='') - Antennas to plot. Default is none.

  • fields (intArray='') - Fields to plot. Default is none.

  • spwids (intArray='') - Spectral windows id.’s to plot. Default is none.

  • plottype (string='1/AMP') - Plot type

  • tablename (string='') - Calibration table name

  • polarization (int=1) - Polarization to plot

  • multiplot (bool=False) - Turn on separate antenna plots

  • nx (int=1) - If multiplot=T, number of plots on horizontal axis

  • ny (int=1) - If multiplot=T, number of plots on vertical axis

  • psfile (string='') - Name of output PostScript file to write plot

to. Default is to send plot to the screen.

posangcal(posangcor='', tablein='', tableout='')[source]

Apply position angle calibration to an existing cal table

This function is used to apply position angle calibration for observations made using circularly polarized feeds. According to the Measurement Equation formalism, this correction should be applied to a { t D} (instrumental polarization) calibration table.

If no { t D} calibration is performed (and thus no such table is available), the correction can be applied to a { t G} table, but it should NEVER be applied to both, and always applied to a { t D} table if one is available. An input table must be specified. If no output table is specified, then the input table will be modified in place.

Specify, as a vector of values, a position angle adjustment (in degrees) for each spectral window. If only one value is specified, it will be duplicated to all spectral windows; otherwise, the number of values specified must match the number of spectral windows. The sign convention for the position angle adjustment is such that the specified value is the that which, when added to the position angle implied by the data, will yield the correct position angle. For example, if { t G-}, { t D-}, and { t P-}calibrated data for 3c286 suggests a position angle of 45 degrees, the posangcor value should be -12 degrees as this will yield the correct position angle of 33 degrees when added. In general, posangcor equals correct position angle minus observed position angle.

A future version of this function will have an option to recognize standard position angle calibrators and determine the correction automatically.

(NB: It may be desirable to use solutions for ‘X’ to handle position angle calibration, rather than this method.)

Parameters

  • posangcor (doubleArray='') - Position angle corrections (degrees)

  • tablein (string='') - Input calibration table name

  • tableout (string='') - Output calibration table name. Default is input table name.

rerefant(tablein='', tableout='', refantmode='strict', refant='')[source]

Apply a new reference antenna

TBD

Pending improvements:

egin{itemize} item TBD end{itemize}

Parameters

  • tablein (string='') - Input calibration table

  • tableout (string='') - Output calibration table

  • refantmode (string='strict') - The refant application mode

  • refant (variant='') - Reference antenna. Default is none.

reset(apply=True, solve=True)[source]

Reset the selected apply and/or solve components

Resets the apply and/or solve components previously set by setapply and setsolve.

Parameters

  • apply (bool=True) - If true, unset all apply settings

  • solve (bool=True) - If true, unset all solve settings

selectvis(time='', spw='', scan='', field='', intent='', observation='', baseline='', uvrange='', chanmode='channel', nchan=1, start=0, step=1, mstart=0.0, mstep=0.0, msselect='')[source]

Set the data selection for subsequent processing

This function provids for selection of the visibility data from the MS which will be treated by subsequent execution of the {stfaf solve} and {stfaf correct} functions. Note that data selection is not cumulative, i.e., any selection made in a previous call to {stfaf selectvis} will be overridden by the the current call.

Most of the {stfaf selectvis} parameters use the standardized MS Selection syntax.

The parameters are described below. The selected data will satisfy the logical AND of all non-trivially specified parameters. Note that the old-fashioned strided channel selection parameters are deprecated (and will soon be removed); use spw instead. Running {stfaf selectvis} with no specified parameters restores selection of the entire MS.

egin{description} item[time] is used to specify time ranges in a stardard format

item[spw] is used to specify spectral window and channel selection. Currently, only a single channel range can be specified per spw.

item[scan] is used to specify scan numbers and ranges

item[observation] is used to specify observation ID(s).

item[field] is used to specify field names or indices

item[baseline] is used to specify antenna and baseline combinations

item[uvrange] is used to specify baseline length ranges

item[chanmode] is deprecated (use spw) item[nchan] is deprecated (use spw) item[start] is deprecated (use spw) item[step] is deprecated (use spw) item[mstart] is deprecated (use spw) item[mstep] is deprecated (use spw)

item[msselect] is used to specify a subselection of data according to Measurement Set columns in conditional combinations not possible with the standard parameters above. This parameter should be specified as a valid htmladdnormallink{TaQL}{../../notes/199/199.html} expression. If both msselect and the standard selection parameter are used together, they are combined with a logical AND, i.e., the data must jointly satisfy all {stfaf selectvis} parameters.

end{description}

Parameters

  • time (variant='') - Select on time

  • spw (variant='') - Select on spectral window

  • scan (variant='') - Select on scan

  • field (variant='') - Select on field

  • intent (variant='') - Select on intent or state

  • observation (variant='') - Select by observation ID(s)

  • baseline (variant='') - Select on antennas/baselines

  • uvrange (variant='') - Select by uvrange

  • chanmode (string='channel') - Type of data selection: channel or velocity

  • nchan (int=1) - Number of channels to select (mode=’channel’)

  • start (int=0) - Start channel (0-relative) (mode=’channel’)

  • step (int=1) - Step in channel number (mode=’channel’)

  • mstart (double=0.0) - Start velocity (e.g. ‘20Km/s’)

  • mstep (double=0.0) - Step in velocity (e.g. ‘100m/s’)

  • msselect (string='') - TAQL selection string. Default (empty) is no specific selection.

setapply(type='B', t=0.0, table='', field='', interp='aipslin', select='', calwt=False, spwmap=[- 1], opacity=[0.0])[source]

Arrange to apply calibration

This function is used to specify the calibration components which should be applied during subsequent execution of the {stfaf solve} and {stfaf correct} functions. This function should 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 {stfaf solve} executions (types ‘B’,’BPOLY’,’G’,’GSPLINE’, ‘D’,’DF’,’T’,’M’,’MF’,’X’), or are calculated analytically on the fly (types ‘P’, ‘TOPAC’, ‘GAINCURVE’). Upon execution of {stfaf solve} or {stfaf correct}, the group of specified calibration components will be applied in the order prescribed by the Measurement Equation formalism.

The parameters are as follows:

egin{description}

item[type] The calibration type being specified. This is only required for analytic types (‘P’,’TOPAC’,’GAINCURVE’). When specifying an existing pre-solved calibration table, it is not necessary to explicitly specify the {stfaf type}; this will be discerned from the table. (Specifying the {stfaf type} as well as the {stfaf table} will force a check that the table contains solutions of the specified type.

For {stfaf type=’GAINCURVE’}, an elevation-dependent correction will be applied using parameters read from the data repository. Currently, this is only supported for the VLA.

item[t] This parameter will be used in a future release to control the range of applicability of the specified calibration. Currently, it is ignored.

item[table] For pre-solved calibration, the file name of the table to apply.

item[field] The fields to select from the specified table, using MS Selection syntax (as in selectvis).

item[interp] The desired type of time-dependent interpolation. Use {stfaf interp=’nearest’} to calibrate each datum with the calibration value nearest in time. Use {stfaf 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 (i.e., the implied rate will always be less than 180 degrees per sample). Use {stfaf interp=’aipslin’} to emulate the basic interpolation mode used in classic AIPS, i.e., linearly interpolated amplitudes, with phases derived from linear 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 {stfaf 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, {stfaf interp=’linear’} is the best choice. The {stfaf 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 future.

item[select] Used to specify general 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 {stfaf setdata} function. The string specified must be a valid htmladdnormallink{TaQL}{../../notes/199/199.html} expression.

item[spwmap] This 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 {stfaf spwmap}, i.e., if {stfaf spwmap} is not specified, calibrater will insist that data be corrected by solutions from the same spw. Otherwise, {stfaf spwmap} takes a vector of integers indicating which spectral window {em solutions} to apply to which spectral window {em data}, such that { t 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 0 & 2, and it is desired that these be applied to spws 1 & 3 (as well as 0 & 2), respectively, use {stfaf spwmap=[0,0,2,2]}. Even if some spws do not require an explicit {stfaf spwmap} setting, yet one or more does, it is safest to specify it explicitly for all, e.g., {stfaf spwmap=[0,1,3,3]} indicates that spw 2 will be corrected with solutions from spw 3, and the others will behave nominally. Note that if no solutions exist for any of the spws specified in {stfaf spwmap}, an error message will result.

item[calwt] If set True, the data weights will be calibrated along with the data. This is usually desirable.

item[opacity] For {stfaf type=’TOPAC’}, an elevation-dependent opacity correction will be applied according to the zenith opacity value supplied in the {stfaf opacity} parameter. Currently, only one zenith opacity value can be supplied, and it is used for all antennas.

end{description}

Use the {stfaf state} function to review the list of calibration components that have been set for application.

Pending improvements:

egin{itemize} item Enable variety of interpolation modes and timescales item Allow for antenna- and time-dependent opacities end{itemize}

Parameters

  • type (string='B') - Component type

  • t (double=0.0) - Interpolation interval (seconds)

  • table (string='') - Calibration table name

  • field (variant='') - Select on field

  • interp (string='aipslin') - Interpolation type (in time)

  • select (string='') - TAQL selection string. Default is no selection.

  • calwt (bool=False) - Calibrate weights?

  • spwmap (intArray=[-1]) - Spectral windows to apply

  • opacity (doubleArray=[0.0]) - Array-wide zenith opacity per antenna (for type=’TOPAC’)

setcallib(callib='')[source]

Arrange to apply calibration via a Cal Library

TBD

Parameters

  • callib (record='') - A calibration library record

setcorrdepflags(corrdepflags='')[source]

Control use of correlation-dependent flags

TBD

Parameters

  • corrdepflags (bool='') - Turn correlation dependent flags on/off (true/false)

setmodel(modelimage='')[source]

Set the sky model used to compute the model visibilities

Name of the model image to be used as a sky model for model visibility computations. For now, this is used only by EP-Jones solver.

Parameters

  • modelimage (string='') - Name of the model image.

setptmodel(stokes=[0.0, 0.0, 0.0, 0.0])[source]

Set the point source model Stokes parameters to be used to compute the model visibilities

Set a global point source model Stokes parameters to use in solving operations.

Parameters

  • stokes (doubleArray=[0.0, 0.0, 0.0, 0.0]) - Vector of Stokes parameters.

setsolve(type='G', t='', table='', append=False, preavg=- 1.0, phaseonly=False, apmode='AP', refant='', refantmode='flex', minblperant=4, solnorm=False, normtype='median', minsnr=0.0, combine='', fillgaps=0, cfcache='', painc=360.0, fitorder=0, fraction=0.1, numedge=- 1, radius='', smooth=True, zerorates=False, globalsolve=True, niter=100, delaywindow=[''], ratewindow=[''], paramactive=[''], solmode='', rmsthresh=[''])[source]

Arrange to solve for calibration

This function specifies the calibration component that will be solved for by the {stff solve} function. Currently, only one type can be solved for at one time.

Each calibration component represents a separate calibration matrix correction included in the measurement equation. The different types correspond to different instrumental and atmospheric effects. Currently, the solvable calibration components are types ‘G’,’T’,’B’, ‘D’ and ‘DF’, which are antenna-based, and, ‘M’ and ‘MF’, which are baseline-based. Arrange to pre-apply any existing calibration components (of types other than the solved-for one) using the {stfaf setapply} function.

The parameters are:

egin{description} item[type] Specify the calibration type you want to solve for, from ‘G’,’T’,’B’,’D’,’DF’,’M’,’MF’.

item[t] Specify the solution interval. This can be specified as an integer (units of seconds assumed) or as a string containing a value and units (e.g., ’30s’, ‘45min’, ‘2h’) or ‘inf’ (infinite) or ‘int’ (per data integration). A solution interval of 0 (with or without units) is the same as ‘int’ (per integration), and negative solution intervals are treated as ‘inf’ (infinite).

item[table] Specify the output calibration table name in which to store the calibration solve result. Existing tables will be deleted and replaced.

item[append] Append the solutions to an existing table.

item[preavg] Specify the amount of pre-average (in time) within the solution interval. By default, data are averaged up to the solution interval (or up to 5 minutes for ‘D’ solving).

item[phaseonly] This parameter is deprecated, use apmode.

item[apmode] Control generation of amplitude-only (‘a’), phase-only (‘p’), or amplitude-and-phase (‘ap’, the default) solutions.

item[refant] Specify an antenna (using data selection syntax) for referencing the solutions.

item[solnorm] Normalize the solutions by their mean post-solve. For ‘B’, and ‘MF’, this is a complex normalization per solution spectrum. For other types, this is a global (per-spw) normalization of the amplitudes only.

item[minsnr] Specify the SNR below which solution are rejected.

item[combine] Specify which data axes (spw, field, scan, or some combination) on which the data should be combined to generate a single solution. E.g., combine=’spw’ will force combination of many spws to form a single solution (per solution interval). Similarly, combine=’scan’ with a long solution interval will force the combination of scans to yield individual solutions (per field and spw). Ordinarily, solutions are always broken at scans boundaries. Separate multiple combine options with commas.

item[fillgaps] For ‘B’ solutions, specify the largest solution channel gap (which arise due to flagged data) that will be filled post-solve via interpolation. Such solution gaps remain flagged by default.

end{description}

Pending improvements:

egin{itemize} item{Change t to solint?} item{Permit flexible specification of preavg (as for t)} end{itemize}

Parameters

  • type (string='G') - Component type

  • t (variant='') - Solution interval (units optional)

  • table (string='') - Output calibration table name

  • append (bool=False) - Append to existing table?

  • preavg (double=-1.0) - Pre-averaging interval (in sec)

  • phaseonly (bool=False) - Solve only for phase?

  • apmode (string='AP') - Solve for ‘AP’, ‘A’ (amp-only) or ‘P’ (phase-only)

  • refant (variant='') - Reference antenna. Default is none.

  • refantmode (string='flex') - Reference antenna mode

  • minblperant (int=4) - Minimum number of baselines per ant for solving

  • solnorm (bool=False) - Normalize solution after solve

  • normtype (string='median') - Solution normalization type

  • minsnr (float=0.0) - SNR threshold for accepting solutions

  • combine (string='') - Data axes on which to combine solving (scan, spw, and/or field)

  • fillgaps (int=0)

  • cfcache (string='') - Name of the directory to be used for convolution

function disk cache. This is used when type=EP. - painc (float=360.0) - Parallactic Angle increment used to trigger computation of a new convolution function. This is used when type=EP. Default value implies that only one convolution function will be computed for the entire range of observation. - fitorder (int=0) - Order of the polynomial fit, used when type=’A’. - fraction (float=0.1) - [SINGLE-DISH SPECIFIC] Edge detection parameter for otfraster/otf calibration. This is a number of edge points as a fraction of total number of points. - numedge (int=-1) - [SINGLE-DISH SPECIFIC] Edge detection parameter for otfraster calibration. This is a number of edge points. The value specified here comes before fraction. Note that edge points will be detected from both side of each raster row so that number of edge points is effectively twice of the specified value in each raster row. Default (-1) is to use fraction. - radius (string='') - [SINGLE-DISH SPECIFIC] Specifies radius of the central region of double circle gain calibration for fast scanning data. The value must be either empty or quantum string (numeric value with unit). Default (“”) is to use a radius of primary beam. - smooth (bool=True) - [SINGLE-DISH SPECIFIC] Whether or not applying smoothing during double circle gain calibration for fast scanning data. Default is True. - zerorates (bool=False) - [FRINGE-FIT SPECIFIC] Zero delay-rates in fringe fitting solution

tables.

  • globalsolve (bool=True) - [FRINGE-FIT SPECIFIC] Use global least-squares solver to improve fringe-fitting

    parameter estimates

  • niter (int=100) - [FRINGE-FIT SPECIFIC] Maximum number of iterations for global least-squares

    solver

  • delaywindow (doubleArray=['']) - [FRINGE-FIT SPECIFIC] Constrain FFT delay search to a

    window; a two-element list, units of nanoseconds

  • ratewindow (doubleArray=['']) - [FRINGE-FIT SPECIFIC] Constrain FFT rate search to a

    window; a two-element list, units of seconds per second

  • paramactive (boolArray=['']) - An array of three booleans to control whether to

    sove for delay, fringe-rate and dispersive delay

  • solmode (string='') - Solving mode: ‘’, ‘L1’; add ‘R’ for iterative outlier excision.

  • rmsthresh (doubleArray=['']) - RMS threshold sequence.

setsolvebandpoly(table='', append=False, t='', combine='', degamp=3, degphase=3, visnorm=False, solnorm=True, maskcenter=0, maskedge=5.0, refant='')[source]

Specialization of setsolve for polynomial B (bandpass) solving

This function is a specialization of the {stfaf setsolve} method which should be used to arrange for bandpass solving when polynomial solutions for B are desired, e.g., when per-channel SNR on calibrators is too low to obtain a useful sampled bandpass.

Prior to the solution, the visibility data are averaged in time, and the solution is performed for both phase and amplitude.

This method uses most of the same parameters as the generic {stfaf setsolve}, with a few unique additions:

egin{description}

item[degamp and degphase] The parameters permit specification of the polynomial order to use in amp and phase. Specifying 0 (zero) yields constant solutions.

item[visnorm] This parameter is used to normalize the assembled spectral data, in a per baseline manner. If set True, this will have the effect of removing any non-frequency-dependent closure errors (e.g., as caused by source structure, or introduced by the instrument) from the data, and should be used with caution. The resulting solutions will be effectively normalized as well. When {stfaf visnorm=F} is used, closure errors in the data (as supplied to the solver) may be visible in the form of offsets between the data and solutions. For bandpass calibration, this is usually ok, as the {em shape} of the bandpass is the most important aspect of the solution. In future this parameter will be generalized and made available for other solve types. (NB: Use of {stfaf solnorm=True} still provides for post-solve normalization of the solutions.)

item[maskcenter and maskedge] These parameters control how many channels are ignored on-the-fly, at the center and edges of each input spectral window, respectively. To avoid edge channels, it is almost always better to flag these channels directly, or select against them in {stfaf setdata}. Aggressive use of maskedge (large values), will yield polynomial solutions which will tend to diverge at the edges (especially when the polynomial degree is also high), because maskedge does not change the frequency domain of the solutions. Such solutions should be used with caution in subsequent operations. (It is best to avoid use of maskedge.) end{description}

The BPOLY solution is performed for both phase and amplitude, and the result will be stored in the same table. The frequency domain of the solutions is limited to only the range of frequencies selected in {stfaf selectvis}. When correcting data with these solutions (for other solves or with {stfaf correct}), only data within this domain will be corrected. Data outside (e.g., edge channels avoided in {stfaf setdata} for the solve), will not be corrected. Therefore, the same (or narrower) channel selection is recommended for all operations using solutions produced by this function and {stfaf solve()}.

Note that the {stfaf combine} parmaeter can be used meaningfully with the BPOLY solver. When combine=’spw’, the data from multiple spws will be combined on a common frequency axis, and a single polynomial will be determined spanning them all. This is different than for ordinary sampled ‘B’ solutions, for which combine=’spw’ causes the bandpass to be combined on a common channel axis, effectively yielding a mean bandpass for the set of spws.

Parameters

  • table (string='') - Output calibration table name

  • append (bool=False) - Append to existing table?

  • t (variant='') - Solution interval (units optional)

  • combine (string='') - Data axes on which to combine solving (scan, spw, and/or field)

  • degamp (int=3) - Polynomial degree for amplitude solution

  • degphase (int=3) - Polynomial degree for phase solution

  • visnorm (bool=False) - Normalize data prior to solution

  • solnorm (bool=True) - Normalize result?

  • maskcenter (int=0) - Number of channels to avoid in center of each band

  • maskedge (double=5.0) - Fraction of channels to avoid at each band edge (in %)

  • refant (variant='') - Reference antenna

setsolvegainspline(table='', append=False, mode='AMP', splinetime=10800, preavg=0.0, npointaver=10, phasewrap=250, refant='')[source]

Specialization of setsolve for cubic spline G (time-dependent gain) solving

This function is a specialization of the {stfaf setsolve} method which should be used when cubic spline G solutions are desired, e.g., when SNR on calibrators is very low. Currently, this solving mode treats dual polarization data on a per-polarization basis. The option to obtain a joint solution (a la ‘T’) will be provided in the future.

The visibility data are averaged in frequency (for multi-channel data) prior to the solution.

This method uses many of the basic parameters as the generic {stfaf setsolve}. Parameters unique to the spline solver are:

egin{description}

item[mode] For phase solutions only, use {stfaf mode=’PHAS’}. For amplitude solutions only, use {stfaf mode=’AMP’}. If both are desired, use {stfaf mode=’PHASAMP’}, and both will be solved for using the same spline timescale (this mode also assumes that all calibrators have the correct relative flux densities). If solving for phase and amplitude separately (usually in this order), it is usually desirable to apply the first one when solving for the second one. Spline solution so obtained will be stored in separate calibration tables. In the near future, the {stfaf mode} parameter will be consolidated with the generic {stfaf apmode} parameter.

item[splinetime] The spline timescale (time between knots) is specified here. The default is 10800 seconds (3 hours). In future this parameter will be consolidated with the generic {stfaf t} parameter. The {stfaf preavg} parameter should be set to a value at least 4X shorter than the spline time (an error will occur if there is insufficient sampling within the {stfaf splinetime} timescale), and consistent with the expected coherence. Consistent with these constraints, use the largest possible value for {stfaf preavg} to optimize the SNR of the pre-solve phase-tracking algorithm.

item[npointaver and phasewrap] These parameters tune the phase-unwrapping algorithm when {stfaf mode $=$ ‘PHAS’}. Cycle slips are detected (and removed before the spline solve) when the median phase a sequence of length {stfaf npointaver} (in integrations) differs by more than {stfaf phasewrap} degrees from the previous sequence.

end{description}

Pending improvements:

egin{itemize} item Consolidate more parameters with the generic {stfaf setsolve} item Introduce the generic combine options item Improve phase-tracking algorithm end{itemize}

Parameters

  • table (string='') - Output calibration table name

  • append (bool=False) - Append to existing table?

  • mode (string='AMP') - Phase or Amplitude mode?

  • splinetime (double=10800) - Spline timescale (sec)

  • preavg (double=0.0) - Pre-averaging interval (in sec)

  • npointaver (int=10)

  • phasewrap (double=250)

  • refant (variant='') - Reference antenna. Default is none.

setvi(old=False, quiet=False)[source]

TEMPORARY method to control use of new VI2 regime

Use this method to control whether the modern (old=False) or old-style (old=True) VisibilityIterator is used by the calibration application. General users should avoid use of this function unless they understand what this means.

This method will be removed from the calibrater tool in v5.1.

Parameters

  • old (bool=False) - Use old-style VI, if old=True, else use new VI2

  • quiet (bool=False) - Warn in logger, if quiet=False

smooth(tablein='', tableout='', field='', smoothtype='mean', smoothtime=60.0)[source]

Produce a smoothed calibration table

This function provides for time-dependent smoothing of sampled calibration solutions. Currently supported types are ‘G’, ‘B’, and ‘T’. (Smoothing on the frequency axis for ‘B’ will be supported in the near future.)

Two (sliding) smoothing types are currenlty supported: ‘median’ or ‘mean’, one of these options should be specified in {stfaf smoothtype}. The full width (in seconds) of the smoothing filter should be specified in {stfaf smoothtime}. Amplitude and (ambiguity-corrected) phase are smoothed separately.

Use {stfaf field} to limit the smoothing operation to a subset of the fields (standard selection syntax) found in the calibration table (other fields will pass to the output table unsmoothed). If {stfaf field} is left blank, all fields in the table will be smoothed.

The smoothing is always done independently for each field, but scan boundaries are not observed. Thus, if the {stfaf smoothtime} is large enough, smoothing may occur over many boundaries.

Flagged solutions in the input table will not participate in the smoothing calculation, but will be replaced with smoothed values if the smoothing window covers one or more unflagged solutions when centered on the flagged point.

Pending improvements:

egin{itemize} item Add other smoothtypes? item Add spw and other selection on input table item Add A/P toggle end{itemize}

Parameters

  • tablein (string='') - Input calibration table

  • tableout (string='') - Output calibration table

  • field (variant='') - Limit smoothing to these fields (default is all fields)

  • smoothtype (string='mean') - The smoothing type: ‘mean’ or ‘median’

  • smoothtime (double=60.0) - Smoothing filter time constant (sec)

solve()[source]

Solve for the selected calibration components

Execution of this function initiates a solve for the calibration component specified in a previous {stfaf setsolve} execution. Existing calibration components (as specified in one or more {stfaf setapply} executions) will be appropriately applied to the observed and model data according to their position in the Measurement Equation, and their commutation properties.

specifycal(caltable='', time='', spw='', antenna='', pol='', caltype='', parameter=[1.0], infile='', uniform=True)[source]

Externally specify calibration of various types

This function enables specifying calibration parameters externally.

Parameters

  • caltable (string='') - The calibration table name

  • time (string='') - Calibration timestamp

  • spw (string='') - Calibration spw(s)

  • antenna (string='') - Calibration antenna(s)

  • pol (string='') - Calibration polarization

  • caltype (string='') - Calibration timestamp

  • parameter (doubleArray=[1.0]) - Calibration parameters

  • infile (string='') - Ancillary input file

  • uniform (bool=True) - Assume uniform calibration values across the array

state()[source]

Request the apply/solve state of the calibrater tool. A listing of all calibration components that have been set for application or solving is written to the logger.

updatecaltable(caltable='')[source]

Caltable modernizer.

This method can be used to update a caltable (from v3.4 or later) to the current version of CASA.

The following updates are currently supported.

o At CASA v4.1.0, the OBSERVATION subtable and OBSERVATION_ID column were added to caltables. This method adds trivial versions of these elements to pre-v4.1 caltables.

Parameters

  • caltable (string='') - Name of the caltable.

validatecallib(callib='')[source]

Validate a Cal Library record

TBD

Parameters

  • callib (record='') - A calibration library record