scippneutron.peaks.FitParameters#
- class scippneutron.peaks.FitParameters(*, guess_background_fraction=0.5, neighbor_separation_factor=0.3333333333333333)[source]#
- Parameters for fitting peaks. - __init__(*, guess_background_fraction=0.5, neighbor_separation_factor=0.3333333333333333)#
 - Methods - __init__(*[, guess_background_fraction, ...])- Attributes - The fraction of fit windows used for estimating the background. - Determines how close fit windows may be to neighboring peaks. - 
guess_background_fraction: float#
- The fraction of fit windows used for estimating the background. - Determines what fraction of each fit window is used for estimating the initial parameters for background fits. E.g., a value of 0.5 means that half the range is used for the background; specifically first and last quarter of the window. Initial parameters for the peak are estimated from the remainder of the window. 
 - 
neighbor_separation_factor: float#
- Determines how close fit windows may be to neighboring peaks. - The fit window for a peak with initial estimate \(p_i\) is shrunk to the exclusive interval \((p_i - \Delta, p_i + \Delta)\) if it is smaller than the given fit window, where \[\Delta = (p_{i+1} - p_{i-1}) \cdot \mathsf{neighbor\_separation\_factor}\]- is based on the separation between the left and right neighbor estimate of the peak. - Importantly, this uses the peak estimates, not the actual fitted peak positions.