Skip to content

Deprecation ramp: align pecos-engines GeneralNoiseModel idle-noise API with the structured vocabulary #424

Description

@ciaranra

Goal

Align the idle-noise surface of GeneralNoiseModel / GeneralNoiseModelBuilder in
crates/pecos-engines (and its PyO3 fluent builder in
python/pecos-rslib/src/engine_builders.rs) with the structured idle-noise vocabulary
(PR #420 layer-1 families; #423 layer-2 channels) — via a staged deprecation ramp,
because this API has external users.

Ramp

  1. Additive release: new structured setters (family-style or with_idle_channels(...))
    alongside the existing methods; nothing existing changes behavior.
  2. Warning release: legacy idle methods emit deprecation warnings. Each warning must
    state the numerically equivalent new spelling, not just the new name — see units
    below.
  3. Removal / major release: legacy methods removed or explicitly re-documented as
    low-level primitives, per what usage telemetry and downstream feedback allow.

Unit trap (the reason the ramp needs care)

The builder rescales its public inputs before they reach the runtime fields
(crates/pecos-engines/src/noise/general/builder.rs, ~line 1006): square-root scaling on
the quadratic rate, a p_idle_coherent_to_incoherent_factor * 0.5 adjustment on the
stochastic branch, and a cycles-to-radians conversion. The structured vocabulary matches
the runtime application semantics (general.rs), not these builder input units. A naive
"use p_idle_sin_squared instead of p_idle_quadratic_rate" migration would silently
change the physics; the conversion formulas must be documented and embedded in the
warnings.

Alignment notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpythonPull requests that update python coderustPull requests that update rust code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions