orca.transform.spectrum_v3

Dynamic-spectrum helpers (v3) * 100% read-only MeasurementSet access * Optionally respects MS FLAG column * bcal optional; if present, used at native resolution (NO rebin) * NO spectral averaging: 192 chans/subband → 16 SPWs → 3072 total chans

Attributes

logger

N_CHAN_OUT

REDIS_URL

REDIS_EXPIRE_S

REDIS_KEY_PREFIX

ROW_NUMS

Functions

dynspec_map_v3(→ List[_SnapshotSpectrumV3])

Map step on a SINGLE MS:

dynspec_reduce_v3(→ None)

Reduce step:

Module Contents

orca.transform.spectrum_v3.logger[source]
orca.transform.spectrum_v3.N_CHAN_OUT = 192[source]
orca.transform.spectrum_v3.REDIS_URL[source]
orca.transform.spectrum_v3.REDIS_EXPIRE_S = 36000[source]
orca.transform.spectrum_v3.REDIS_KEY_PREFIX = 'spec-v3-'[source]
orca.transform.spectrum_v3.ROW_NUMS = [('LWA-128&LWA-160', 54282), ('LWA-048&LWA-051', 33335), ('LWA-018&LWA-237', 30360),...[source]
orca.transform.spectrum_v3.dynspec_map_v3(subband_no: int, scan_no: int, ms: str, bcal: str | None = None, use_ms_flags: bool = True) List[_SnapshotSpectrumV3][source]
Map step on a SINGLE MS:
  • Reads DATA & FLAG (cross-correlations only)

  • Optionally applies bcal at native resolution (192 channels) — NO rebin

  • Stores incoherent-sum and selected-baseline spectra in Redis

Returns JSONable _SnapshotSpectrumV3 list (for the reducer).

orca.transform.spectrum_v3.dynspec_reduce_v3(spectra: Iterable[List[_SnapshotSpectrumV3]], start_ts: datetime.datetime, out_dir: str) None[source]
Reduce step:
  • Gathers Redis blobs from dynspec_map_v3 outputs

  • Builds 4×(time×freq) cubes per type, freq = 192×16 = 3072

  • Writes FITS into {out_dir}/{type}/{DATE}-{corr}.fits