ewoksxas.fit.peak_fit.PeakModel#
- class ewoksxas.fit.peak_fit.PeakModel(data, shape=PeakShape.GAUSSIAN, baseline=Baseline.NONE, roi=None, sensitivity=2.5, fwhm_points=None, auto_fwhm=True, strip_width=None, strip_iterations=None, snip_width=None)[source]#
Bases:
objectFit one or several peaks of a single shape, with an optional baseline.
- Parameters:
- auto_fwhm: bool#
- fit()[source]#
Fit the peaks and background to the region of interest.
Runs silx’s native flow –
estimate(auto peak count) thenrunfitwith the selected background theory – and prunes peaks the fit drove to zero.- Return type:
- Returns:
The fit wrapped in a
MultiPeakFitResult.
- classmethod from_dict(data, parameters=None)[source]#
Construct a PeakModel from plain dictionaries.
- Args:
data: Mapping with
"x"and"y"arrays. parameters: Optional settings:shape,baseline,xmin,xmax,sensitivity,fwhm_points,auto_fwhm,strip_width,strip_iterationsandsnip_width.
- Parameters:
data (
dict[str,ndarray[tuple[int,...],dtype[float64]]])parameters (
dict|None)
- Return type:
- fwhm_points: int | None#
- sensitivity: float#
- xmax: float#
- xmin: float#