edges.alanmode.alanio¶
Functions for writing/reading to/from file formats used in the C pipeline.
- edges.alanmode.alanio.read_alan_calibrated_temp(fname: str | Path) ndarray[source]¶
Read calibrated_{load}.txt from edges3.c.
This gives uncalibrated and calibrated temperatures.
- edges.alanmode.alanio.read_all_spec_txt(direc: Path, flow, fhigh)[source]¶
Read all spe_*r.txt files from a directory into a dict of spectra.
- edges.alanmode.alanio.read_modelled_s11s(pth: Path) QTable[source]¶
Read modelled S11s from a csv file.
- edges.alanmode.alanio.read_raul_s11_format(fname: str | Path) dict[str, ndarray][source]¶
Read files containing S11’s for all loads, LNA, and rigid cable, for EDGES-2.
These files are outputs from Raul’s pipeline, and were used as inputs for the C-code in EDGES-2 in some cases.
- edges.alanmode.alanio.read_s11_csv(fname) tuple[ndarray, ndarray][source]¶
Read a CSV file containing S11 data in Alan’s output format.
- edges.alanmode.alanio.read_spe_file(filename: str | Path, time: Time = <Time object: scale='utc' format='datetime' value=2026-03-05 13:14:16.726453>, telescope: str = 'edges-low', name: str = '')[source]¶
Read Alan’s spectrum files with formats like those of spe0.txt.
- edges.alanmode.alanio.read_spec_txt(fname: str | Path, time: Time | None = None, telescope: str = 'edges-low', name: str = '') GSData[source]¶
Read an averaged-spectrum file, like the ones output by acqplot7amoon.
- edges.alanmode.alanio.read_specal(fname: str | Path, t_load: float, t_load_ns: float) Calibrator[source]¶
Read a specal file, like the ones output by edges3(k).
- edges.alanmode.alanio.read_specal_iter(fname: str | Path) ndarray[source]¶
Read a specal file, like the ones output by edges3(k).
The outputs are from an intermediate iteration of NW modeling step.
- edges.alanmode.alanio.write_modelled_s11s(calobs: CalibrationObservation, fname: str | Path, hot_loss_model=None)[source]¶
Write all modelled S11’s in a calobs object to file, in the same format as C.
If a HotLoadCorrection exists, also write the rigid cable S-parameters, as edges2k.c does, otherwise assume the edges3.c format.
- edges.alanmode.alanio.write_spec_txt(freq: ndarray | Annotated[Quantity, PhysicalType('frequency')], n: float, spec: ndarray, fname: str | Path)[source]¶
Write an averaged-spectrum file, like spe_<load>r.txt files from edges2k.c.