RunConfig#

class uvex_transients.cli.config.RunConfig(raw: Mapping, source: Path | None = None)[source]#

A parsed CLI run-config, resolving each section lazily on first access.

Every command reads the same config file; a command only touches the properties it actually needs (generate reads .schedule/.transients/.mission/.generate; cut reads .schedule/.transients/.mission/.cuts; photometry reads .schedule/.transients/.mission/.photometry), so a config missing an unrelated section (e.g. no photometry: block, if you never run that command) still works.

Parameters:
  • raw (Mapping) – The parsed run-config YAML, as a nested mapping.

  • source (str or Path, optional) – The config file’s path, used only to make error messages more specific.

Methods

from_yaml(path)

Parse a run-config YAML file (see uvex_transients.cli.yaml_tags.get_run_yaml).

has_section(name)

Whether the parsed config has a top-level name: section at all.

Attributes

cuts

The parsed cuts: section, in declared order (required by the cut command).

detection_counts

The parsed detection_counts: section (required by the detection-counts command).

generate

The parsed generate: section (required by the generate command).

keep_intermediate

Whether the run command should keep each stage's catalog on disk (top-level keep_intermediate:).

mission

The resolved Mission (mission: section; defaults to "uvex").

photometry

The parsed photometry: section (optional; every field defaults to "every band"/the package default).

schedule

The resolved SurveySchedule (schedule: section; falls back to the package default).

simulator

A SurveySimulator built from .schedule/.transients (cached across one CLI invocation).

transients

The resolved {key: TransientBase instance} (transients: section, required).

yield_config

The parsed yield: section (optional; defaults to a 0.9 Clopper-Pearson confidence level).