FreeShapeModel = class FreeShapeModel(LinearModel) |
|
FreeShapeModel(npix, copy=None, shape=None, nconvolve=0, center=0.5,
xlo=0.0, xhi=None, **kwargs)
Pixelated Model.
f( x:p ) = p( expanded )
where p is a array of amplitudes of the same size as the input x divided by
the number of pixels per bin ( ppb ). When ppb > 1, each p has a shape which
is used to fill the pixels of the bin. Initially the shape is a top-hat,
which can be autoconvolved.
By default ppb = 5.
The parameters are initialized at {0}.
Although this is a LinearModel it will not work very well with the ( linear )
Fitter. It will be a very ill-posed problem.
Using NestedSampler its exponential prior will ensure that all
parameters are kept positive.
Attributes
----------
npix : int
Number of pixels in result. Is also npar.
xlo : float ( default 0 )
Lowest value in xdata
xhi : float ( default npix )
Highest value in xdata
xlo and xhi define the valid domain of the model.
All input data must be: xlo <= xdata <= xhi
shape : Kernel
shape of convolving function
center : float (between 0..1)
position of the center of shape with respect to the pixels
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
Examples
--------
>>> nn = 100
>>> fsm = FreeShapeModel( nn, nconvolve=4, xlo=-1.0, xhi=4.0 )
>>> print( fsm.shape )
Author Do Kester |
|
- Method resolution order:
- FreeShapeModel
- LinearModel
- Model
- FixedModel
- BaseModel
- builtins.object
Constructor:
- TBCbaseDerivative( xdata, params )
- Returns the derivative of the model function df/dx.
Parameters
----------
xdata : array_like
value at which to calculate the result
params : array_like
values for the parameters
Methods defined here:
- FreeShapeModel( npix, copy=None, shape=None, nconvolve=0, center=0.5,
xlo=0.0, xhi=None, **kwargs)
- Free Shape model with npix pixels.
The number of parameters equals the number of pixels
Parameters
----------
npix : int
number of pixels = npar
copy : FreeShapeModel
model to be copied
shape : None or Kernel
None : Use Tophat(), convolved nconvolve times.
Kernel : use the kernel as shape; nconvolve does not apply.
nconvolve : int
number of (auto)convolutions on Tophat
center : float (between 0..1)
positions where the pixels are centered.
default: 0.5 -> pixels run from k to k+1
xlo : float ( default 0.0 )
lowest value in xdata
xhi : float ( default np )
highest value in xdata
- baseName()
- baseParameterUnit( k )
- Return the unit of the indicated parameter.
Parameters
---------
k : int
parameter number.
- basePartial( xdata, params, parlist=None )
- Returns the partial derivative of the model function to
each of the parameters.
Parameters
----------
xdata : array_like
value at which to calculate the result
params : array_like
values for the parameters
- baseResult( xdata, params )
- Returns the result of the model function.
Parameters
----------
xdata : array_like
value at which to calculate the result
params : array_like
values for the parameters
- checkDomain( xdata )
- Check for all data inside domain defined by (xlo - range, xhi + range).
range = self.shape.range
Parameters
----------
xdata : array_like
value at which to calculate the result
Raises
------
ValueError when outside domain.
- copy()
- Copy method.
Methods inherited from Model:
Overloaded operators and aliases
Other methods
- addModel( model )
- appendModel( model, operation )
- assignDF1( partial, i, dpi )
- assignDF2( partial, i, dpi )
- chainLength()
- correctParameters( params )
- derivative( xdata, param, useNum=False )
- divideModel( model )
- domain2Unit( dvalue, kpar=None )
- getIntegralUnit()
- getLimits()
- getLinearIndex()
- getNumberOfParameters()
- getParameterName( k )
- getParameterUnit( k )
- getPrior( k )
- hasLimits( fitindex=None )
- hasPriors( isBound=True )
- isDynamic()
- isMixed()
- isNullModel()
- isolateModel( k )
- multiplyModel( model )
- nextPrior()
- numDerivative( xdata, param )
- numPartial( xdata, param )
- operate( res, pars, next )
- partial( xdata, param, useNum=False )
- partialDomain2Unit( dvalue )
- pipeModel( model )
- pipe_0( dGd, dHdG)
- pipe_1( dGd, dHdG)
- pipe_2( dGd, dHdG)
- pipe_3( dGd, dHdG)
- pipe_4( dGdx, dHdG)
- pipe_5( dGdx, dHdG)
- pipe_6( dGdx, dHdG)
- pipe_7( dGdx, dHdG)
- pipe_8( dGdx, dHdG)
- pipe_9( dGdx, dHdG)
- result( xdata, param=None )
- selectPipe( ndim, ninter, ndout )
- setLimits( lowLimits=None, highLimits=None )
- setPrior( k, prior=None, **kwargs )
- shortName()
- strictNumericDerivative( xdata, param )
- strictNumericPartial( xdata, params, parlist=None )
- subtractModel( model )
- testPartial( xdata, params, silent=True )
- unit2Domain( uvalue, kpar=None )
Methods inherited from FixedModel:
Methods inherited from BaseModel:
|
|