pipeline.domain.scan.Scan

class Scan(id: int | None = None, antennas: list[Antenna] | None = None, intents: list[str] | None = None, fields: list[Field] | None = None, states: list[State] | None = None, data_descriptions: list[DataDescription] | None = None, scan_times: dict | None = None)[source]

Bases: object

A logical representation of a single scan.

id

The scan number within the MeasurementSet.

antennas

Set of Antenna objects for antennas associated with this scan.

intents

Set of Pipeline intents corresponding to the states associated with this scan.

fields

Set of Field objects for fields associated with this scan.

states

Set of State objects for states associated with this scan.

data_descriptions

Set of DataDescription objects for data description entries associated with this scan.

Methods

exposure_time

Return exposure time for this Scan for given spectral window ID.

mean_interval

Return the "mean" sub-scan integration time for given spectral window ID.

Attributes

end_time

Return end time of the Scan as a CASA 'epoch' measure dictionary.

spws

Return set of SpectralWindow objects for spectral windows associated with this Scan.

start_time

Return start time of the Scan as a CASA 'epoch' measure dictionary.

time_on_source

Return time-on-source for the Scan.

__init__(id: int | None = None, antennas: list[Antenna] | None = None, intents: list[str] | None = None, fields: list[Field] | None = None, states: list[State] | None = None, data_descriptions: list[DataDescription] | None = None, scan_times: dict | None = None) None[source]

Initialize a Scan object.

Parameters:
  • id -- The scan number within the MeasurementSet.

  • antennas -- List of Antenna objects for antennas associated with this scan.

  • intents -- Set of Pipeline intents corresponding to the states associated with this scan.

  • fields -- List of Field objects for fields associated with this scan.

  • states -- List of State objects for states associated with this scan.

  • data_descriptions -- List of DataDescription objects for data description entries associated with this scan.

  • scan_times -- Dictionary mapping spectral window ID keys (for all spectral windows associated with this scan) to a list of 2-tuples for all sub-scans, where each 2-tuple for a sub-scan contains the sub-scan epoch midpoint time and the sub-scan exposure time (for that spectral window). These are used to derive and store properties such as start-time, end-time, time-on-source.

property end_time: dict

Return end time of the Scan as a CASA 'epoch' measure dictionary.

exposure_time(spw_id: int) timedelta[source]

Return exposure time for this Scan for given spectral window ID.

Parameters:

spw_id -- Numerical identifier of spectral window to select.

Returns:

Exposure time for this Scan and given spectral window ID.

mean_interval(spw_id: int) timedelta[source]

Return the "mean" sub-scan integration time for given spectral window ID.

Note: at present, it is assumed that the integration time does not vary per sub-scan, and it therefore takes the integration time from the first sub-scan in this Scan to be representative (i.e. it does not take the mean from all sub-scan integration times).

Parameters:

spw_id -- Numerical identifier of spectral window to select.

Returns:

Sub-scan integration time for given spectral window ID.

property spws: set[SpectralWindow]

Return set of SpectralWindow objects for spectral windows associated with this Scan.

property start_time: dict

Return start time of the Scan as a CASA 'epoch' measure dictionary.

property time_on_source: timedelta

Return time-on-source for the Scan.