pipeline.domain.SpectralWindow

class SpectralWindow(spw_id: int, name: str, spw_type: str, bandwidth: float, ref_freq: dict, mean_freq: float, chan_freqs: ndarray, chan_widths: ndarray, chan_effective_bws: ndarray, sideband: int, baseband: int, receiver: str | None, freq_lo: list[float] | ndarray | None, band: str = 'Unknown', spectralspec: str | None = None, transitions: list[str] | None = None, sdm_num_bin: int | None = None, correlation_bits: str | None = None, median_receptor_angle: ndarray | None = None, specline_window: bool = False, grouping_id: str | None = None)[source]

Bases: object

A logical representation of a spectral window (spw).

id

The numerical identifier of this spectral window within the SPECTRAL_WINDOW subtable of the MeasurementSet.

band

Frequency band.

bandwidth

The total bandwidth.

baseband

The baseband.

channels

Frequency information of each channel in spectral window, i.e., frequencies, channel width, effective bandwidth.

freq_lo

A list of LO frequencies.

intents

the observing intents that have been observed using this spectral window.

mean_frequency

Mean frequency of spectral window.

name

Spectral window name.

receiver

Receiver type, e.g., 'TSB'.

ref_frequency

The reference frequency.

sideband

Side band.

transitions

Spectral transitions recorded associated with spectral window.

type

Spectral window type, e.g., 'TDM'.

sdm_num_bin

Number of bins for online spectral averaging.

correlation_bits

Number of bits used for correlation.

median_receptor_angle

Median feed receptor angle.

specline_window

Whether spw is intended for spectral line or continuum (VLA only).

grouping_id

Grouping ID to uniquely identify this spw in different MOUS within the same GOUS (ALMA-only, introduced in Cycle 12).

Methods

channel_range

Return the channel range for given minimum/maximum frequency.

Attributes

id

band

bandwidth

type

intents

ref_frequency

name

baseband

sideband

receiver

freq_lo

mean_frequency

channels

spectralspec

transitions

sdm_num_bin

correlation_bits

median_receptor_angle

specline_window

grouping_id

centre_frequency

Return the center frequency of the SpectralWindow.

frame

Return the reference frame code of the SpectralWindow.

max_frequency

Return the maximum frequency of the SpectralWindow.

min_frequency

Return the minimum frequency of the SpectralWindow.

num_channels

Return the number of channels in the SpectralWindow.

__getstate__() tuple[source]

Define what to pickle as a class instance.

__init__(spw_id: int, name: str, spw_type: str, bandwidth: float, ref_freq: dict, mean_freq: float, chan_freqs: ndarray, chan_widths: ndarray, chan_effective_bws: ndarray, sideband: int, baseband: int, receiver: str | None, freq_lo: list[float] | ndarray | None, band: str = 'Unknown', spectralspec: str | None = None, transitions: list[str] | None = None, sdm_num_bin: int | None = None, correlation_bits: str | None = None, median_receptor_angle: ndarray | None = None, specline_window: bool = False, grouping_id: str | None = None)[source]

Initialize SpectralWindow class.

Parameters:
  • spw_id -- Spw ID.

  • name -- Spw name.

  • spw_type -- Spectral window type, e.g., 'TDM'.

  • bandwidth -- The total bandwidth.

  • ref_freq -- The reference frequency, as a CASA 'frequency' measure dictionary.

  • mean_freq -- Mean frequency of spectral window in Hz.

  • chan_freqs -- A list of frequency of each channel in spw in Hz.

  • chan_widths -- A list of channel width of each channel in spw in Hz.

  • chan_effective_bws -- A list of effective bandwidth of each channel in spw in Hz.

  • sideband -- Side band.

  • baseband -- The baseband.

  • receiver -- Receiver type, e.g., 'TSB'.

  • freq_lo -- A list of LO frequencies in Hz.

  • band -- Frequency band.

  • spectralspec -- SpectralSpec name.

  • transitions -- Spectral transitions recorded associated with spectral window.

  • sdm_num_bin -- Number of bins for online spectral averaging.

  • correlation_bits -- Number of bits used for correlation.

  • median_receptor_angle -- Median feed receptor angle.

  • specline_window -- Whether spw is intended for spectral line or continuum (VLA only).

  • grouping_id -- GOUS ID used to identify project group level (new in Cycle 12 ALMA data) TODO improve description

__setstate__(state: tuple) None[source]

Define how to unpickle a class instance.

property centre_frequency: Frequency

Return the center frequency of the SpectralWindow.

channel_range(minfreq: Frequency, maxfreq: Frequency) tuple[int, int] | tuple[None, None][source]

Return the channel range for given minimum/maximum frequency.

Parameters:
  • minfreq -- Minimum frequency as measures.Frequency object.

  • maxfreq -- Maximum frequency as measures.Frequency object.

Returns:

2-Tuple of integers representing indices (min, max) of channel range end-points corresponding to given min/max frequency.

property frame: str

Return the reference frame code of the SpectralWindow.

property max_frequency: Frequency

Return the maximum frequency of the SpectralWindow.

property min_frequency: Frequency

Return the minimum frequency of the SpectralWindow.

property num_channels: int

Return the number of channels in the SpectralWindow.