ess.snspowder.powgen.peaks.fit_vanadium_peaks#
- ess.snspowder.powgen.peaks.fit_vanadium_peaks(data, *, peak_estimates=None, windows=None, background=None, peak=None, fit_parameters=None, fit_requirements=None)[source]#
Fit coherent scattering peaks of vanadium.
This function wraps
scippneutron.peaks.fit_peaks()and provides default parameters for vanadium at POWGEN.- Parameters:
data (
DataArray) – A 1d data array wheredata.datais the dependent variable anddata.coords[data.dim]is the independent variable for the fit. Must be 1-dimensional and not binned.peak_estimates (
Variable|None, default:None) – Initial estimates of peak locations. A peak will be fitted for each estimate. Must be a 1d variable with dimensiondata.dim. IfNone, estimates are derived usingtheoretical_vanadium_dspacing().windows (
Variable|None, default:None) –If a scalar, the size of fit windows. A window is constructed for each peak estimate centered on the estimate with a width equal to
windows(adjusted to the data range and to maintain a separation between peaks, seescippneutron.peaks.FitParameters.neighbor_separation_factor).If a 2d array, the windows for each peak. Must have sizes
{data.dim: len(data), 'range': 2}wherewindows['range', 0]andwindows['range', 1]are the lower and upper bounds of the fit windows, respectively. The windows are not adjusted automatically in this case.Defaults to
sc.scalar(0.02, unit='angstrom').background (
Model|str|Iterable[Model] |Iterable[str] |None, default:None) – The background model or models. Defaults to('linear', 'quadratic'). That is, a fit with a linear background is attempted, and if the fit fails, a quadratic background is tried.peak (
Model|str|Iterable[Model] |Iterable[str] |None, default:None) – The peak model or models. Defaults to'gaussian'.fit_parameters (
FitParameters|None, default:None) – Parameters for the fit not otherwise listed as function arguments.fit_requirements (
FitRequirements|None, default:None) – Constraints on the fit result.
- Returns: