pipeline.domain.datadescription.DataDescription

class DataDescription(dd_id: int, spw: SpectralWindow, pol_id: int)[source]

Bases: object

A logical representation of an entry in the DATA_DESCRIPTION table.

The DATA_DESCRIPTION table in the measurement set defines the shape of the data in the MAIN table.

id

Numerical identifier of the data description entry.

spw

SpectralWindow object for the spectral window ID associated with the data description.

pol_id

Polarization ID associated with the data description.

obs_time

Mean of midpoint observation times for data matching the data description.

chan_freq

List of channel centre frequencies for data matching the data description.

corr_axis

Vector containing polarization labels that were correlated together for data matching the data description.

Methods

get_polarization_id

Get the polarization ID associated with given polarization label.

get_polarization_label

Get the polarization label associated with given polarization ID.

Attributes

num_polarizations

Return number of polarizations in the DataDescription.

polarizations

Return polarizations in the DataDescription.

__init__(dd_id: int, spw: SpectralWindow, pol_id: int) None[source]

Initialize a DataDescription object.

Parameters:
  • dd_id -- Numerical identifier of the data description.

  • spw -- SpectralWindow object for spectral window ID associated with the data description.

  • pol_id -- Polarization ID associated with the data description.

static get_polarization_id(pol: str) int[source]

Get the polarization ID associated with given polarization label.

Parameters:

pol -- Polarization label to get ID for.

Returns:

Polarization ID associated with given label.

get_polarization_label(pol_id: int) str[source]

Get the polarization label associated with given polarization ID. This converts an integer to a string, eg. 0 -> 'XX'.

Parameters:

pol_id -- Polarization ID to get label for.

Returns:

Polarization label associated with given ID.

property num_polarizations: int

Return number of polarizations in the DataDescription.

property polarizations: list[str]

Return polarizations in the DataDescription.

Returns:

List of polarizations.