Fit a N-dimensional region.
Parameters : | region : ndarray
lineshape :list :
params : list
amps : list
bounds : list
ampbounds : list
wmask : ndarray, optional
centers : list
error_flag : bool
**kw : optional
|
---|---|
Returns : | params_best : list
amp_best : list
param_err : list, only returned when error_flag is True
amp_err : list, only returned when error_flag is True
iers : list
|
Notes
The lineshape parameter:
Elements of the lineshape parameter list can be string indicating the lineshape of given dimension or an instance of a lineshape class which provide a sim method which takes two arguments, the first being the length of the lineshape the second being a list of lineshape parameters, and returns a simulated lineshape as well as a nparam method which when given the length of lineshape returns the number of parameters needed to describe the lineshape. Currently the following strings are allowed:
The first four lineshapes (Gaussian, Lorentzian, Voigt and Pseudo Voigt) all take a FWHM scale parameter.
The following are all valid lineshapes parameters for a 2D Gaussian peak: