edges_cal.cal_coefficients.CalibrationObservation.from_io

classmethod CalibrationObservation.from_io(io_obj: ~edges_io.io.CalibrationObservation, *, semi_rigid_path: str | ~pathlib.Path = ':semi_rigid_s_parameters_WITH_HEADER.txt', freq_bin_size: int = 1, spectrum_kwargs: dict[str, dict[str, typing.Any]] | None = None, s11_kwargs: dict[str, dict[str, typing.Any]] | None = None, internal_switch_kwargs: dict[str, typing.Any] | None = None, lna_kwargs: dict[str, typing.Any] | None = None, f_low: ~astropy.units.quantity.Quantity = <Quantity 40. MHz>, f_high: ~astropy.units.quantity.Quantity = <Quantity inf MHz>, sources: tuple[str] = ('ambient', 'hot_load', 'open', 'short'), receiver_kwargs: dict[str, typing.Any] | None = None, restrict_s11_model_freqs: bool = True, hot_load_loss_kwargs: dict[str, typing.Any] | None = None, **kwargs) CalibrationObservation[source]

Create the object from an edges-io observation.

Parameters:
  • io_obj – An calibration observation object from which all the data can be read.

  • semi_rigid_path (str or Path, optional) – Path to a file containing S11 measurements for the semi rigid cable. Used to correct the hot load S11. Found automatically if not given.

  • freq_bin_size – The size of each frequency bin (of the spectra) in units of the raw size.

  • spectrum_kwargs – Keyword arguments used to instantiate the calibrator LoadSpectrum objects. See its documentation for relevant parameters. Parameters specified here are used for _all_ calibrator sources.

  • s11_kwargs – Keyword arguments used to instantiate the calibrator LoadS11 objects. See its documentation for relevant parameters. Parameters specified here are used for _all_ calibrator sources.

  • internal_switch_kwargs – Keyword arguments used to instantiate the InternalSwitch objects. See its documentation for relevant parameters. The same internal switch is used to calibrate the S11 for each input source.

  • f_low (float) – Minimum frequency to keep for all loads (and their S11’s). If for some reason different frequency bounds are desired per-load, one can pass in full load objects through load_spectra.

  • f_high (float) – Maximum frequency to keep for all loads (and their S11’s). If for some reason different frequency bounds are desired per-load, one can pass in full load objects through load_spectra.

  • sources – A sequence of strings specifying which loads to actually use in the calibration. Default is all four standard calibrators.

  • receiver_kwargs – Keyword arguments used to instantiate the calibrator Receiver objects. See its documentation for relevant parameters. lna_kwargs is a deprecated alias.

  • restrict_s11_model_freqs – Whether to restrict the S11 modelling (i.e. smoothing) to the given freq range. The final output will be calibrated only between the given freq range, but the S11 models themselves can be fit over a broader set of frequencies.