ewoksxas.tasks.tests.test_autobk#

Functions

count_peaks(y[, filter_value])

Count the number of extrema which are larger than the filter_value.

evaluate_autobk_task(inputs[, name])

Run the task and convert output to AutoBKStats format.

stub_autobk(monkeypatch)

Replace larch.xafs.autobk with a deterministic stub.

test_autobk_chi_matches_snapshot(fe_foil_one)

Compare the full chi waveform against a stored larch snapshot.

test_autobk_clamp_hi(fe_foil_one)

Test autobk task by changing clamp_hi parameter.

test_autobk_clamp_lo(fe_foil_one)

Test autobk task by changing clamp_lo parameter.

test_autobk_dk(fe_foil_one)

Test autobk task by changing dk parameter.

test_autobk_e0(fe_foil_one)

Test autobk task by changing e0 parameter.

test_autobk_kmax(fe_foil_one)

Test autobk task by changing kmax parameter.

test_autobk_kmin(fe_foil_one)

Test autobk task by changing kmin parameter.

test_autobk_kweight(fe_foil_one)

Test autobk task by changing kweight parameter.

test_autobk_matches_larch_reference(fe_foil_one)

Pin larch's absolute autobk output against a known-good reference.

test_autobk_nclamp(fe_foil_one)

Test autobk task by changing nclamp parameter.

test_autobk_output_type(fe_foil_one)

Output types share one fit and differ only by exact in-task transforms.

test_autobk_rbkg(fe_foil_one)

Test autobk task by changing rbkg parameter.

test_default_output_is_chik(fe_foil_one, ...)

With no 'output' key the task returns chi * k (the chik default).

test_e0_from_metadata_used_when_not_overridden(...)

Without an e0 parameter, the table's e0 (from Normalize) is forwarded.

test_e0_parameter_is_forwarded(fe_foil_one, ...)

An explicit e0 is passed straight through to autobk.

test_edge_step_parameter_is_forwarded(...)

An explicit edge_step is passed straight through to autobk.

test_extra_parameters_pass_through(...)

Parameters other than output/e0/edge_step reach autobk verbatim.

test_output_chi_is_unscaled(fe_foil_one, ...)

output='chi' returns the raw chi from autobk.

test_output_chie_uses_energy_axis(...)

output='chie' is reported on the energy grid, not the k grid.

test_output_chik2_is_k_squared_weighted(...)

output='chik2' returns chi * k**2.

Classes

AutoBKStats(*, name, mean, amplitude, ...)

Dataclass for storing X(k) evaluation stats for quantitative comparison.