Expand description
Utility functions for DIA clustering.
This module provides various utility functions organized into logical sections:
- TOF Scale - TOF axis binning and scaling
- Smoothing - Gaussian smoothing and blur functions
- Marginal Building - Build RT/IM marginals from frame data
- Peak Detection - Find peaks in 1D traces
- Fitting - Fit1D struct and moment-based fitting
- Stitching - Stitch overlapping peaks across windows
Structs§
Functions§
- blur_
tof_ all_ frames - build_
im_ marginal - Build IM marginal (absolute scan axis). We have to touch selected entries:
- build_
rt_ marginal - Build RT marginal (len = frames in [rt_lo..rt_hi]), using (bin,scan) window
- build_
tof_ hist - Build a histogram over CSR bins (one value per bin in [bin_lo..bin_hi]).
- fallback_
rt_ peak_ from_ trace - find_
im_ peaks_ row - fit1d_
moment - gaussian_
blur_ tof_ sparse - im_
peak_ id - lerp
- quad_
subsample - quantile
- quantile_
mut - robust_
noise_ mad - Compute robust noise estimate using MAD (Median Absolute Deviation). Returns noise in the same units as the input signal.
- robust_
noise_ neighbor_ diff - Compute noise from neighbor differences. Uses the median of absolute neighbor differences, which is robust to peaks.
- rt_
peak_ id - smooth_
vector_ gaussian - Light 1D Gaussian smoothing on a vector (along scans).
- stitch_
im_ peaks_ flat_ unordered_ impl - Core stitching logic on ImPeak1D in TOF space.
- trapezoid_
area_ fractional - Safe integration of a piecewise-linear signal y over [x0, x1]. x is in sample-index units, segments are [s, s+1] for s=0..n-2. Handles boundaries: no y[n] access, supports n==0/1.
Type Aliases§
- Mobility
Fn - Optional mobility callback: scan -> 1/K0