Arithmetic and normalization#
MoDaCor provides two arithmetic patterns.
Source-based Divide,
Multiply, and
Subtract obtain their second operand from
IoSources. They suit scalar metadata or calibration arrays that should remain
external to the processing workspace.
DivideDatabundles,
MultiplyDatabundles, and
SubtractDatabundles operate on
two prepared BaseData entries in ProcessingData. Their
with_processing_keys order is significant and they update the first bundle.
All use BaseData unit algebra, uncertainty propagation, broadcasting, and
metadata checks. Do not strip values to arrays to reimplement these semantics in
a pipeline step.
FindScaleFactor1D estimates a
one-dimensional overlap scale. Its lognormal estimator uses a caller-selected
named uncertainty component rather than silently inventing a combined
uncertainty. Exact duplicate fit coordinates are inverse-variance averaged
before interpolation.
SubtractInterpolated1D
subtracts a one-dimensional background on a different coordinate grid. Its
nearest mode is an explicit nearest-neighbour remap without extrapolation;
linear propagates background uncertainty through the interpolation
coefficients. Negate changes the sign of a
selected BaseData entry while retaining its uncertainty magnitudes.
UnitsLabelUpdate
changes a unit label only under its documented contract; it is not a substitute
for numerical conversion.