Module utility

Module utility 

Source
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§

Fit1D
StitchParams
TofScale

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§

MobilityFn
Optional mobility callback: scan -> 1/K0