cwitools.modeling.fit_model2d¶
-
cwitools.modeling.
fit_model2d
(model_func, model_bounds, xx, yy, zz)¶ Fit a Gaussian or Moffat PSF
Parameters: - model_func (callable) – The model function, of form f(parameters, x)
- model_bounds (list) – List of tuples representing (lower, upper) bounds on the model parameters. e.g. [(0,1), (-1,-1), … ]
- xx (numpy.ndarray) – Input x position meshgrid
- yy (numpy.ndarray) – Input y position meshgrid
- zz (numpy.ndarray) – Input data to fit to (e.g. flux)
Returns: The result of the fit.
Return type: scipy.optimize.OptimizeResult