IterativeGeneralizedGaussianWBackground.fit_bg¶
giant.point_spread_functions.gaussians
:
- classmethod IterativeGeneralizedGaussianWBackground.fit_bg(x, y, z)¶
This method tries to fit the background using linear least squares without worrying about any PSF included.
This is useful if you need to subtract off a rough estimate of the background before attempting to fit the PSF for an initial guess. The results of the fit are stored in the
bg_b_coef
,bg_c_coef
, andbg_d_coef
.- Parameters:
x (Sequence | ndarray) – The x values underlying the data the background is to be fit to
y (Sequence | ndarray) – The y values underlying the data the background is to be fit to
z (Sequence | ndarray) – The z or “height” values for the background
- Returns:
The initialized BG PSF with values according to the fit for the background only
- Return type: