empyrean.WeightingConfig

class WeightingConfig(enabled=True, preset=WeightingPreset.VFC17, default_sigma_arcsec=1.0, sigma_policy=None, additional_layers=<factory>)[source]

Bases: object

Observation weighting pipeline. Mirrors empyrean::WeightingConfig.

Default = enabled with the VFC17 preset + a NightlyDeweighting layer (production hot path; matches scott::od::ODConfig::default()). Set enabled=False for uniform 1″ weighting; pick a different preset or replace additional_layers for custom pipelines.

Warning

Passing additional_layers replaces the default layer list — it does not append to it. The default list is [WeightingLayer(kind=WeightingLayerKind.NIGHTLY_DEWEIGHTING, max_gap_days=0.5)], the production per-night 1/√N de-weighting; supplying e.g. a single observatory rule therefore drops nightly de-weighting from the production default. To add a rule while keeping production behavior, include the nightly layer explicitly:

WeightingConfig(
    additional_layers=[
        WeightingLayer(
            kind=WeightingLayerKind.OBSERVATORY_RULE,
            obs_code="F51",
            sigma=(0.1, 0.1),
        ),
        WeightingLayer(kind=WeightingLayerKind.NIGHTLY_DEWEIGHTING),
    ],
)

At most one NIGHTLY_DEWEIGHTING layer is accepted per chain (duplicates would compound the 1/√N factor and are rejected).

Methods

__init__([enabled, preset, ...])

Attributes

default_sigma_arcsec

Default 1σ when no rule applies (arcsec).

enabled

preset

sigma_policy

Sigma combination policy override.

additional_layers

Layers placed ahead of the preset's chain — first-match-wins, so they override preset rules for their stations; the preset is the fallback.

Parameters:
  • enabled (bool)

  • preset (WeightingPreset)

  • default_sigma_arcsec (float)

  • sigma_policy (SigmaPolicy | None)

  • additional_layers (list[WeightingLayer])

enabled: bool = True
preset: WeightingPreset = 'vfc17'
default_sigma_arcsec: float = 1.0

Default 1σ when no rule applies (arcsec). Used only when preset = NONE.

sigma_policy: SigmaPolicy | None = None

Sigma combination policy override. None = use the preset’s policy.

additional_layers: list[WeightingLayer]

Layers placed ahead of the preset’s chain — first-match-wins, so they override preset rules for their stations; the preset is the fallback.