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 (str or pathlib.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 as schedule.

Returns:

The experiment, holding the stored points. The model is fitted on first use.

Return type:

Experiment

Raises:

ValueError – If the file records no sampler that can be rebuilt and none is given.