ewoksxas.fit.tests.conftest#

Shared fixtures synthesising ground-truth peaks for the peak-fit tests.

Peaks are built from silx’s own profile functions (the engine behind the fit), on a noiseless grid, so the fitted center, area, width(s) and mixing are known exactly. peak_factory returns (y, truth) where truth holds the descriptors the fit should recover. An independent lmfit-based Gaussian oracle (lmfit_gaussian) guards against testing silx purely against itself.

Functions

component_list(lca_x)

components(excess_components)

excess_components(lca_x, component_list)

lca_x()

lmfit_gaussian(x)

An independent (lmfit) Gaussian oracle: (y, center, area).

multi_peak_factory(x)

Return a factory building a sum of well-separated Gaussian peaks.

peak_factory(x)

Return a factory building a ground-truth peak and its descriptors.

rand_components(lca_x, component_list)

sample(lca_x, component_list)

x()

A fine, wide x-grid so even broad asymmetric tails decay at the edges.