GaussModel

 
GaussModel = class GaussModel(NonLinearModel)
    GaussModel(copy=None, **kwargs)
 
Gaussian Model.
 
    f( x:p ) = p_0 * exp( -0.5 * ( ( x - p_1 ) / p_2 )^2 )
 
    p_0 = amplitude
    p_1 = center
    p_2 = width
 
The parameters are initialized at {1.0, 0.0, 1.0}.
Parameter 2 (width) is always kept stricktly positive ( >0 ).
 
Examples
--------
>>> gauss = GaussModel( )
>>> print( gauss )
Gauss: f( x:p ) = p_0 * exp( -0.5 * ( ( x - p_1 ) / p_2 )^2 )
>>> print( gauss.getNumberOfParameters( ) )
3
>>> print( gauss( numpy.arange( 11 ) - 5 ) )
[  3.72665317e-06   3.35462628e-04   1.11089965e-02   1.35335283e-01
   6.06530660e-01   1.00000000e+00   6.06530660e-01   1.35335283e-01
   1.11089965e-02   3.35462628e-04   3.72665317e-06]
 
Attributes from Model
---------------------
    npchain, parameters, stdevs, xUnit, yUnit
 
Attributes from FixedModel
--------------------------
    npmax, fixed, parlist, mlist
 
Attributes from BaseModel
--------------------------
    npbase, ndim, priors, posIndex, nonZero,
         tiny, deltaP, parNames

 
Alternate
---------
`GaussModel()` is equivalent to `KernelModel( kernel=Gauss() )`.
 
 
Method resolution order:
GaussModel
NonLinearModel
Model
FixedModel
BaseModel
builtins.object

Constructor:
GaussModel( copy=None, **kwargs )
Gaussian model.
 
Number of parameters is 3.
 
Parameters
----------
copy : GaussModel
    to be copied
fixed : None or dictionary of {int:float|Model}
    int         index of parameter to fix permanently.
    float|Model values for the fixed parameters.
    Attribute fixed can only be set in the constructor.
    See: FixedModel
Methods defined here:
baseDerivative( xdata, params )
Return the derivative df/dx at each xdata (=x).
 
Parameters
----------
xdata : array_like
    values at which to calculate the result
params : array_like
    values for the parameters.
baseName()
Returns a string representation of the model.
baseParameterUnit( k )
Return the unit of the indicated parameter.
 
Parameters
---------
k : int
    parameter number.
basePartial( xdata, params, parlist=None )
Returns the partials at the input value.
 
Parameters
----------
xdata : array_like
    values at which to calculate the partials
params : array_like
    values for the parameters.
parlist : array_like
    list of indices active parameters (or None for all)
baseResult( xdata, params )
Returns the result of the model function.
 
Parameters
----------
xdata : array_like
    values at which to calculate the result
params : array_like
    values for the parameters.
copy()
Copy method.

Methods inherited from NonLinearModel:
Methods inherited from Model:
Overloaded operators and aliases Other methods Methods inherited from FixedModel:
Methods inherited from BaseModel: