ewoksxas.converters.resample#

Align ragged per-spectrum arrays onto a single shared x grid.

The AutoBK and Xftf tasks produce one (x, y) spectrum per input row. When the inputs differ slightly (e.g. different e0), Larch returns k/R grids of different lengths, which cannot be stacked into a single Orange Table (one shared x-axis per table). This module resamples such ragged spectra onto one common grid, either by linear interpolation (default) or by rebinning.

Functions

interpolate_spectrum(target_x, x, y)

Linearly interpolate the spectrum (x, y) onto target_x.

resample_to_common_grid(x_list, y_list[, mode])

Resample ragged (x, y) spectra onto one shared x grid.

Classes

Alignment(*values)

How to align spectra of differing length onto a common x grid.