GaussPrior

 
GaussPrior = class GaussPrior(Prior)
    GaussPrior(center=0.0, scale=1.0, limits=None, circular=False, prior=None)
 
Gauss prior distribution.
 
    Pr( x ) = exp( - ( ( x - c ) / scale )^2 )
 
By default: center = 0 and scale = 1.
 
It can also have a limited domain. (To be done)
By default the domain is [-Inf,+Inf].
In computational practice the domain is limited to about [-6, 6] scale units.
 
domain2unit: u = 0.5 * ( erf( ( d - center ) / scale ) + 1 )
unit2domain: d = erfinv( 2 * u - 1 ) * scale + center
 
Examples
--------
>>> pr = GaussPrior()                         # center=0, scale=1
>>> pr = GaussPrior( center=1.0, scale=0.5 )
>>> pr = GaussPrior( limits=[0,None] )        # limited to values >= 0
>>> pr = GaussPrior( center=1, circular=3 )   # circular between 0.5 and 2.5
 
Attributes
----------
center : float
    center of the Gaussian prior
scale : float
    scale of the Gaussian prior
 
Attributes from Prior
--------------------=
lowLimit, highLimit, circular, deltaP, _lowDomain, _highDomain
 
 
Method resolution order:
GaussPrior
Prior
builtins.object

Constructor:
GaussPrior( center=0.0, scale=1.0, limits=None, circular=False, prior=None )
Constructor.
 
Parameters
----------
center : float
    of the location of the prior
scale : float
    of the exponential
limits : None or [float,float]
    None    no limits are set
    2 floats    lowlimit and highlimit
circular : bool or float
    bool : y|n circular with period from limits[0] to limits[1]
    float : period of circularity
prior : GaussPrior
    prior to copy (with new scale if applicable)
Methods defined here:
copy()
Copy the prior
domain2Unit( dval )
Return a value in [0,1] given a value within the valid domain of
a parameter for a Gauss distribution.
 
domain2unit: u = 0.5 * ( erf( ( d - center ) / scale ) + 1 )
 
Parameters
----------
dval : float
    value within the domain of a parameter
isBound()
Return true if the integral over the prior is bound.
logResult( x )
Return a the log of the result of the prior.
 
Parameters
----------
x : float
    value within the domain of a parameter
partialLog( x )
Return partial derivative of log( Prior ) wrt x.
 
Parameters
----------
x : float
    the value
result( x )
Return a the result of the distribution function at x.
 
Parameters
----------
x : float
    value within the domain of a parameter
shortName()
Return a string representation of the prior.
unit2Domain( uval )
Return a value within the valid domain of the parameter given a value
between [0,1] for a Gauss distribution.
 
unit2domain: d = erfinv( 2 * u - 1 ) * scale + center
 
Parameters
----------
uval : float
    value within [0,1]

Methods inherited from Prior: