KernelModel


 
KernelModel = class KernelModel(NonLinearModel)
    KernelModel(copy=None, kernel=Biweight, **kwargs)
 
Kernel Model, a Model build around an Kernel.
 
The KernelModel is defined as
 
    f( x:p ) = p_0 * K( ( x - p_1 ) / p_2 )
 
where K( u ) is a selectable kernel function on the rescaled input u
    u = ( x - p_1 ) / p_2.
 
    p_0 is the amplitude
    p_1 is the center
    p_2 is the range.
 
The parameters are initialized at {amp,0,1}. the amplitude is such that the
function integrates to 1.0. They are listed in the table.
 
Several kernel functions predefined.
 
Beware: The "bound" models are unaware of anything outside their range.
 
Author:      Do Kester
 
Examples
--------
>>> model = KernelModel( )
>>> model.kernel = Triweight()
 
Attributes
----------
kernel : Kernel
    the kernel of this model
 
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
 
 
Method resolution order:
KernelModel
NonLinearModel
Model
FixedModel
BaseModel
builtins.object

Constructor:
KernelModel( copy=None, kernel=Biweight, **kwargs )
Kernel Model.
 
Parameters
----------
copy : KernelModel
    model to be copied
kernel : Kernel
    kernel class (default = Biweight)
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 )
Returns the derivative at the xdata value.
 
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 name of a parameter.
Parameters
----------
k : int
    the kth parameter.
basePartial( xdata, params, parlist=None )
Returns the partials at the xdata value.
 
Parameters
----------
xdata : array_like
    values at which to calculate the result
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.
isBound()
Return true when the kernel is bound.
All non-zero values are between -1 and +1

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