Package ComboCode :: Package cc :: Package ivs :: Package sigproc :: Package lmfit :: Module parameter :: Class Parameter
[hide private]
[frames] | no frames]

Class Parameter

source code


A Parameter is the basic Parameter going into Fit Model. The Parameter holds many attributes: value, vary, max_value, min_value, constraint expression. The value and min/max values will be be set to floats.

Instance Methods [hide private]
 
__init__(self, name=None, value=None, vary=True, min=None, max=None, expr=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__repr__(self)
repr(x)
source code
 
setup_bounds(self)
set up Minuit-style internal/external parameter transformation of min/max bounds.
source code
 
scale_gradient(self, val)
returns scaling factor for gradient the according to Minuit-style transformation.
source code
 
_getval(self)
get value, with bounds applied
source code
 
__str__(self)
string
source code
 
__abs__(self)
abs
source code
 
__neg__(self)
neg
source code
 
__pos__(self)
positive
source code
 
__nonzero__(self)
not zero
source code
 
__int__(self)
int
source code
 
__long__(self)
long
source code
 
__float__(self)
float
source code
 
__trunc__(self)
trunc
source code
 
__add__(self, other)
+
source code
 
__sub__(self, other) source code
 
__div__(self, other)
/
source code
 
__truediv__(self, other)
/
source code
 
__floordiv__(self, other)
//
source code
 
__divmod__(self, other)
divmod
source code
 
__mod__(self, other)
%
source code
 
__mul__(self, other)
*
source code
 
__pow__(self, other)
**
source code
 
__gt__(self, other)
>
source code
 
__ge__(self, other)
>=
source code
 
__le__(self, other)
<=
source code
 
__lt__(self, other)
<
source code
 
__eq__(self, other)
==
source code
 
__ne__(self, other)
!=
source code
 
__radd__(self, other)
+ (right)
source code
 
__rdiv__(self, other)
/ (right)
source code
 
__rtruediv__(self, other)
/ (right)
source code
 
__rdivmod__(self, other)
divmod (right)
source code
 
__rfloordiv__(self, other)
// (right)
source code
 
__rmod__(self, other)
% (right)
source code
 
__rmul__(self, other)
* (right)
source code
 
__rpow__(self, other)
** (right)
source code
 
__rsub__(self, other)
(right)
source code
 
__getattr__(self, name)
Allow to reach any cierr directly with coded attribute name (fx.
source code
 
can_kick(self)
Returns True is the parameter can be kicked (has defined min and max)
source code
 
kick(self)
Kick the starting value to a random value between min and max
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  value
get value

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, value=None, vary=True, min=None, max=None, expr=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

setup_bounds(self)

source code 

set up Minuit-style internal/external parameter transformation of min/max bounds.

returns internal value for parameter from self.value (which holds the external, user-expected value). This internal values should actually be used in a fit....

As a side-effect, this also defines the self.from_internal method used to re-calculate self.value from the internal value, applying the inverse Minuit-style transformation. This method should be called prior to passing a Parameter to the user-defined objective function.

This code borrows heavily from JJ Helmus' leastsqbound.py

__str__(self)
(Informal representation operator)

source code 

string

Overrides: object.__str__

__getattr__(self, name)
(Qualification operator)

source code 

Allow to reach any cierr directly with coded attribute name (fx. ci95), Allow to get min and max with the bounds attribute Allow to obtain procentual error


Property Details [hide private]

value

get value

Get Method:
unreachable.value(self) - get value
Set Method:
unreachable.value(self, val) - set value