scippneutron.peaks.remove_peaks#

scippneutron.peaks.remove_peaks(data, fit_results)[source]#

Remove peaks from data by subtracting fitted models.

Peaks are removed by subtracting fitted peak models from the data. The background models are ignored in this operation.

Parameters:
  • data (DataArray) – 1d data with peaks. Must have a dimension-coordinate.

  • fit_results (Iterable[FitResult]) – Results of fitting the peaks that should be removed. Any unsuccessful fits are ignored.

Returns:

DataArraydata with peaks removed.

See also

fit_peaks

Fit the peaks in data and construct the required input to fit_results.