pipeline.domain.spectralwindow.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:
objectA 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
Return the channel range for given minimum/maximum frequency.
Attributes
Return the center frequency of the SpectralWindow.
Return the reference frame code of the SpectralWindow.
Return the maximum frequency of the SpectralWindow.
Return the minimum frequency of the SpectralWindow.
Return the number of channels in the SpectralWindow.
- __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
- 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 num_channels: int
Return the number of channels in the SpectralWindow.