uvex_transients.phase_space.sampling.core.SurveySampler.from_settings#

classmethod SurveySampler.from_settings(settings: Mapping, *, schedule: SurveySchedule | None = None, mission=None, cosmology: Cosmology | None = None, **overrides) → SurveySampler[source]#

Rebuild a sampler from the settings of another one.

Parameters:
  • settings (Mapping) – The settings of the sampler to rebuild.

  • schedule (SurveySchedule, optional) – The schedule. Needed unless settings names one in the registry.

  • mission (str or m4opt.missions.Mission, optional) – The mission. Needed unless settings names one.

  • cosmology (Cosmology, optional) – By default the configured one, with a warning if its name is not the recorded one.

  • **overrides – Any other constructor argument, replacing the recorded value.

Returns:

A sampler that makes the same measurement, and so reproduces the scales of the recorded one.

Return type:

SurveySampler

Raises:

ValueError – If no schedule or no mission can be found.