chemotools.adaptation#

Adaptation methods for calibration transfer between instruments, together with metadata-aware transformation and validation utilities.

Import from this module:

from chemotools.adaptation import (
    DirectStandardization,
    MetadataFunctionTransformer,
    PiecewiseDirectStandardization,
    SpectralSpaceTransform,
    XAxisInterpolator,
)

from chemotools.adaptation.functions import subtract_reference
from chemotools.adaptation.validation import check_metadata_function

Available Classes#

Class

Description

DirectStandardization

Linear calibration transfer via least-squares mapping between instruments

PiecewiseDirectStandardization

Piecewise calibration transfer using local least-squares windows

SpectralSpaceTransform

SVD-based shared latent space domain adaptation

XAxisInterpolator

Resample spectra onto a shared x-axis grid via interpolation

MetadataFunctionTransformer

Apply a callable with auxiliary inputs supplied through metadata routing

Available Functions#

Function

Description

check_metadata_function

Validate a metadata-aware callable on representative data

subtract_reference

Subtract a shared or per-sample reference from spectra

divide_by_reference

Divide spectra by a shared or per-sample reference

scale_by_factor

Scale spectra by a scalar or array factor

add_offset

Add a shared or per-sample offset to spectra

See Also#

Adaptation Methods Overview - Complete documentation with examples and visual guides