pp_localized_msc — Localized moving-window multiplicative scatter correction¶
Group: Signal transforms · C ABI: n4m_transform_localized_msc_*
Description¶
Feature-wise MSC using a moving local wavelength window.
Parameters¶
Name |
Type |
Default |
|---|---|---|
|
|
|
|
|
|
|
|
|
API and bindings¶
C ABI (ABI 2): n4m_transform_localized_msc_create · n4m_transform_localized_msc_destroy · n4m_transform_localized_msc_fit · n4m_transform_localized_msc_is_fitted · n4m_transform_localized_msc_transform. Use the linked public header for the exact signature, configuration, and result handles.
Python (verified public re-export):
from n4m.transform.scatter import LocalizedMSC
Source signature: LocalizedMSC().
R: no current source-verified entry point was found for this catalog method.
MATLAB / Octave: no current source-verified entry point was found for this catalog method.
Explanations¶
Bibliographic source¶
No single paper canonically defines this implementation. It is a moving-window extension of Geladi, MacDougall & Martens (1985), https://doi.org/10.1366/0003702854248656.
Mathematical principle¶
At each wavelength, a local window is regressed on the corresponding reference window to obtain an intercept and slope; the center value is corrected by those local coefficients. The fitted reference is either supplied or learned from the training mean.
Appropriate uses¶
Correcting scatter whose offset or gain changes gradually across the wavelength axis.
Limits and validation¶
Local regressions become unstable in flat windows or with small windows; eps only guards degeneracy. Moving coefficients can distort broad bands and require a stable reference.
Implementation¶
n4m.transform.scatter.LocalizedMSC wraps n4m_transform_localized_msc_*; the local regressions are in cpp/src/c_api/c_api_advanced.cpp.
The ABI-2 implementation is the n4m_transform_localized_msc_* lifecycle in libn4m.
Sources and provenance¶
https://doi.org/10.1366/0003702854248656; https://github.com/GBeurier/nirs4all-methods/blob/main/cpp/src/c_api/c_api_advanced.cpp
See also: methods index · interactive dashboard