orca.transform.spectrum_v2

Improved dynamic spectrum helpers (version 2).

Enhanced dynamic spectrum extraction with: * Read-only measurement set access * Proper MS FLAG column handling * Support for bcal=None (no calibration) * 4x frequency averaging (192 → 48 channels)

Attributes

logger

N_CHAN_OUT

REDIS_URL

REDIS_EXPIRE_S

REDIS_KEY_PREFIX

ROW_NUMS

Functions

dynspec_map_v2(self, subband_no, scan_no, ms, *[, ...])

Produce incoherent-sum + selected-baseline spectra from a single MS.

dynspec_reduce_v2(→ None)

Assemble per-scan lists from dynspec_map_v2 into 768-freq FITS cubes.

Module Contents

orca.transform.spectrum_v2.logger[source]
orca.transform.spectrum_v2.N_CHAN_OUT = 48[source]
orca.transform.spectrum_v2.REDIS_URL[source]
orca.transform.spectrum_v2.REDIS_EXPIRE_S = 36000[source]
orca.transform.spectrum_v2.REDIS_KEY_PREFIX = 'spec-v2-'[source]
orca.transform.spectrum_v2.ROW_NUMS = [('LWA-128&LWA-160', 54282), ('LWA-048&LWA-051', 33335), ('LWA-018&LWA-237', 30360),...[source]
orca.transform.spectrum_v2.dynspec_map_v2(self, subband_no: int, scan_no: int, ms: str, *, bcal: str = None, use_ms_flags: bool = True)[source]

Produce incoherent-sum + selected-baseline spectra from a single MS.

  • Uses FLAG column to mask samples (→ NaN).

  • If bcal is None ⇒ unity gains.

orca.transform.spectrum_v2.dynspec_reduce_v2(spectra: Iterable[List[_SnapshotSpectrumV2]], start_ts: datetime.datetime, out_dir: str) None[source]

Assemble per-scan lists from dynspec_map_v2 into 768-freq FITS cubes. Safe against missing Redis keys / malformed blobs.