edges.sim.receivercal¶
Module with routines for simulating calibration datasets.
- edges.sim.receivercal.get_data_from_calobs(srcs: Sequence[str], calobs, tns: Model | None = None, sim: bool = False, loads: dict | None = None) ndarray[source]¶
Generate input data to fit from a calibration observation.
- edges.sim.receivercal.simulate_q(*, load_s11: ndarray, receiver_s11: ndarray, load_temp: Annotated[Quantity, PhysicalType('temperature')], t_sca: ndarray, t_off: ndarray, t_unc: ndarray, t_cos: ndarray, t_sin: ndarray) ndarray[source]¶
Simulate the observed 3-position switch ratio data, Q.
- Parameters:
load_s11 (np.ndarray) – The S11 of the input load (antenna, or calibration source) as a function of frequency.
receiver_s11 (np.ndarray) – The S11 of the internal LNA.
load_temp – The (calibrated) temperature of the input load.
t_sca – The scaling temperature (i.e. ~T_load+ns)
t_off (np.ndarray) – The offset temperature (i.e. ~T_load)
t_unc (np.ndarray) – The noise-wave parameter T_uncorrelated
t_cos (np.ndarray) – The noise-wave parameter T_cos
t_sin (np.ndarray) – The noise-wave parameter T_sin
t_load (float, optional) – The fiducial internal load temperature, by default 300.0
t_load_ns (float, optional) – The internal load + noise source temperature, by default 400.0
- Returns:
q – The simulated 3-position switch ratio data.
- edges.sim.receivercal.simulate_q_from_calibrator(load: InputSource, calibrator: Calibrator, scale_model: Callable | None = None) ndarray[source]¶
Simulate the observed 3-position switch ratio, Q, from noise-wave solutions.
- Parameters:
calibrator – The calibration observation that contains the solutions.
load (str) – The load to simulate.
- Returns:
np.ndarray – The 3-position switch values.
- edges.sim.receivercal.simulate_qant_from_calibrator(calibrator: Calibrator, ant_s11: ndarray, ant_temp: ndarray, scale_model: Callable | None = None, loss: ndarray | float = 1, t_amb: float = 296, bm_corr: float | ndarray = 1) ndarray[source]¶
Simulate antenna Q from a calibration observation.
- Parameters:
calobs (
CalibrationObservation) – The calibration observation that contains the solutions.ant_s11 – The S11 of the antenna.
ant_temp – The true temperature of the beam-weighted sky.
- Returns:
np.ndarray – The simulated 3-position switch ratio, Q.