IntervalCalState

class IntervalCalState[source]

Bases: object

IntervalCalState is a data structure used to map calibrations for all data registered with the pipeline.

It is implemented as a multi-dimensional array indexed by data selection parameters (ms, spw, field, intent, antenna), with the end value being a list of CalFroms, representing the calibrations to be applied to that data selection.

Methods Summary

as_applycal()

Return the CalState as a string representation of the corresponding applycal commands.

clear()

create_from_context(context)

Return a new IntervalCalState based on given Pipeline context.

export_to_casa_callibrary(ms, callibfile)

from_calapplication(context, calto, calfroms)

get_caltable([caltypes])

Get the names of all caltables registered with this CalState.

merged([hide_empty])

trimmed(context, calto)

Return a copy of this IntervalCalState trimmed to the specified CalTo data selection.

Methods Documentation

as_applycal() str[source]

Return the CalState as a string representation of the corresponding applycal commands.

clear()[source]
static create_from_context(context: Context) IntervalCalState[source]

Return a new IntervalCalState based on given Pipeline context.

This method initialises a new IntervalCalState instance and then updates its key attributes by generating "ID to intent" and "ID to field" mapping dictionaries, generating interval trees with correct dimensions, and computing the shape, for all measurement sets that are registered in the given context.

Parameters:

context -- The Pipeline context.

Returns:

IntervalCalState based on given Pipeline context.

export_to_casa_callibrary(ms, callibfile)[source]
static from_calapplication(context, calto, calfroms)[source]
get_caltable(caltypes=None) set[str][source]

Get the names of all caltables registered with this CalState.

If an optional caltypes argument is given, only caltables of the requested type will be returned.

Parameters:

caltypes -- Caltypes should be one or/a list of table types known in CalFrom.CALTYPES.

Return type:

set of strings

merged(hide_empty=False)[source]
trimmed(context, calto)[source]

Return a copy of this IntervalCalState trimmed to the specified CalTo data selection. :param calto: :param selection_intervals: :return: