Skip to main content

MultiplicativeBaselineConfig

Struct MultiplicativeBaselineConfig 

Source
pub struct MultiplicativeBaselineConfig {
    pub b0_init: f64,
    pub b1_init: f64,
    pub b2_init: f64,
    pub fit_b0: bool,
    pub fit_b1: bool,
    pub fit_b2: bool,
    pub spatial_global: bool,
    pub b0_bounds: (f64, f64),
    pub b1_bounds: (f64, f64),
    pub b2_bounds: (f64, f64),
}
Expand description

Bounded multiplicative polynomial baseline (issue #635): y(E) = (b0 + b1·z + b2·z²) · T_model(E) with z = ln(E/E_ref) and E_ref = √(E_min·E_max) of the fit grid.

A NEREIDS extension (see MultiplicativeBaselineModel for the SAMMY departure record): real VENUS sample/open-beam ratios sit a few % from unity with smooth energy dependence, and freeing the SAMMY Anorm together with temperature and density is degenerate on such data (IPTS-37432 finding A3: T → 4471 K with no warning). The bounded multiplicative form fitted jointly with temperature at fixed density is the production recipe (χ²/ν ≈ 2–8 across the 20-run campaign).

b0 is exactly degenerate with Anorm, so a free Anorm alongside ANY configured baseline — even a fully frozen one — is rejected (validate_multiplicative_baseline). A frozen-b0 + free-Anorm combination would be well-posed, but supporting it buys nothing (Anorm would just play b0’s role at a rescaled value); the sanctioned combination is the additive ABC(+DF) background with fit_anorm = false.

What prevents the A3-style runaway is SMOOTHNESS, not amplitude: a single global quadratic in ln E cannot produce a narrow local feature at a resonance whatever its coefficients, so the dips stay attributed to the physics model. The (configurable) coefficient boxes bound the baseline’s overall tilt/curvature PER ln-E UNIT, not the evaluated B(E) itself: the worst-case excursion from b0 grows with the grid’s log-width, |B − b0| ≤ |b1|·|z|_max + |b2|·z²_max (≈ ±0.23 beyond b0’s own ±0.1 box on a 1–30 eV grid at the default ±0.05 boxes; more on wider grids, where only the runtime B(E) > 0 guard applies). “A few % off unity” describes the typical FITTED values on campaign data and the hard b0 box at mid-grid — not a hard envelope on B(E) across the grid.

Fields§

§b0_init: f64

Initial mid-grid baseline value b0 (default 1.0).

§b1_init: f64

Initial slope per ln-E unit b1 (default 0.0).

§b2_init: f64

Initial curvature per ln-E² unit b2 (default 0.0).

§fit_b0: bool

Whether b0 is free (default true). All-false = frozen baseline (the #633 fixed-parameter pattern; used by the spatial global mode).

§fit_b1: bool

Whether b1 is free (default true).

§fit_b2: bool

Whether b2 is free (default true).

§spatial_global: bool

spatial_map_typed only: fit ONE baseline on the aggregated mean spectrum, then freeze it for every pixel (default true — per-pixel baselines on <500 counts/bin biased fitted temperatures by up to +150 K on IPTS-37432; the global mode removed 80 % of that). Ignored by the single-spectrum fitters.

§b0_bounds: (f64, f64)

Optimizer box for b0 (default (0.9, 1.1) — “a few % off unity”).

§b1_bounds: (f64, f64)

Optimizer box for b1 (default (-0.05, 0.05)).

§b2_bounds: (f64, f64)

Optimizer box for b2 (default (-0.05, 0.05)).

Trait Implementations§

Source§

impl Clone for MultiplicativeBaselineConfig

Source§

fn clone(&self) -> MultiplicativeBaselineConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MultiplicativeBaselineConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MultiplicativeBaselineConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more