edges_io.io.CalibrationObservation#
- class edges_io.io.CalibrationObservation(path, log_level=40, run_num: int | dict = _Nothing.NOTHING, repeat_num: int | dict = _Nothing.NOTHING, spectra_kwargs: dict = _Nothing.NOTHING, s11_kwargs: dict = _Nothing.NOTHING, resistance_kwargs: dict = _Nothing.NOTHING, original_path=_Nothing.NOTHING, tmpdir: Path | None = None, *, check=True, fix=False)[source]#
A full set of data required to calibrate field observations.
Incorporates several lower-level objects, such as
Spectrum
,Resistance
andS1P
in a seamless way.- Parameters:
path (str or Path) – The path (absolute or relative to current directory) to the top level directory of the observation. This should look something like
Receiver01_2020_01_01_040_to_200MHz/
.run_num (int or dict, optional) – If an integer, the run number to use for all loads. If None, by default uses the last run for each load. If a dict, it should specify the run number for each load.
repeat_num (int or dict, optional) – If an integer, the repeat number to use for all S11 standards measurements, for all loads. If None, by default uses the last repeat (typically 02) for each load. If a dict, it should specify the repeat number for each load.
include_previous (bool, optional) – Whether to by default include the previous observation in the same directory to supplement the current one if parts are missing.
compile_from_def (bool, optional) – Whether to attempt compiling a virtual observation from a
definition.yaml
inside the observation directory. This is the default behaviour, but can be turned off to enforce that the current directory should be used directly.
Methods
__init__
(path[, log_level, run_num, ...])Method generated by attrs for class CalibrationObservation.
check_contents
(path[, fix])Check whether contents of this container are in the correct format.
check_definition
(path)Check the associated definition.yaml file within an observation.
check_self
(path, fix)compile_obs_from_def
(path[, include_previous])Make a tempdir containing pointers to relevant files built from a definition.
from_def
(path[, include_previous])from_observation_yaml
(obs_yaml)Create a CalibrationObservation from a specific YAML format.
get_base_files
(path[, with_notes])Get a list of valid files in this observation.
get_simulator_names
(path)match_path
(path[, root])Give a path relative to the root, determine its describing class.
path_to_datetime
(path)read_all
()Read all spectra and resistance files into memory.
typestr
(name)Generate a string uniquely defining the 'kind of thing' the object is.
Attributes
A list of all data files used in this observation.
Dictionary specifying run numbers for each component.