edges_io.io.CalibrationObservation.compile_obs_from_def#
- classmethod CalibrationObservation.compile_obs_from_def(path: Path, include_previous=True) tuple[Path, str] [source]#
Make a tempdir containing pointers to relevant files built from a definition.
Takes a definition file (YAML format) from a particular Observation, and uses the
include
andprefer
sections to generate a full list of files from any number of Observations that make up a single full observation. Will only include a single file of each kind.- Parameters:
path (Path) – The path (absolute or relative to current directory) to the observation (not the definition file).
include_previous (bool, optional) – Whether to by default “include” the previous observation (if any can be found). This means that observation will be used to supplement this one if this is incomplete.
- Returns:
TemporaryDirectory – A temp directory in which there will be a directory of the same name as
path
, and under which will be a view into a “full” observation, compiled from the definition. Each file in the directory will be a symlink. Note that this return variable must be kept alive or the directory will be cleaned up.name (str) – The name of the observation (i.e. the directory inside the temporary direc).