uvex_transients.phase_space.experiment.Experiment.load#
- classmethod Experiment.load(path: str | Path, *, sampler: Sampler | None = None, **context) Experiment[source]#
Rebuild an experiment from a points file of either format.
The file is one written by
save(), or by the earlier format.- Parameters:
path (
strorpathlib.Path) – An ECSV file of points.sampler (
Sampler, optional) – A sampler to use instead of rebuilding the one the file records, for example one whose survey schedule is not in the registry.**context – What the file could not record, passed to the sampler’s
from_settings, such asschedule.
- Returns:
The experiment, holding the stored points. The model is fitted on first use.
- Return type:
- Raises:
ValueError – If the file records no sampler that can be rebuilt and none is given.