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

Class Parameters

source code


a custom dictionary of Parameters.  All keys must be
strings, and valid Python symbol names, and all values
must be Parameters.

Custom methods:
---------------

add()
add_many()

Instance Methods [hide private]
new empty dictionary

__init__(self, *args, **kwds)
Initialize an ordered dictionary.
source code
 
__setitem__(self, key, value)
od[i]=y
source code
 
add(self, name, value=None, vary=True, min=None, max=None, expr=None)
convenience function for adding a Parameter: with p = Parameters() p.add(name, value=XX, ....)
source code
 
add_many(self, *parlist)
convenience function for adding a list of Parameters: Here, you must provide a sequence of tuples, each containing at least the name.
source code
 
__getattr__(self, name)
Allow easy access to the parameter attributes like value ect.
source code
 
can_kick(self, pnames=None)
Checks if the given parameters can be kicked and returns the good ones in a list.
source code
 
kick(self, pnames=None)
Kicks the given parameters to a new value chosen from the uniform distribution between max and min value.
source code

Inherited from collections.OrderedDict: __delitem__, __eq__, __iter__, __ne__, __reduce__, __repr__, __reversed__, clear, copy, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from dict: __cmp__, __contains__, __ge__, __getattribute__, __getitem__, __gt__, __le__, __len__, __lt__, __new__, __sizeof__, get, has_key

Inherited from object: __delattr__, __format__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from collections.OrderedDict: fromkeys

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

Initialize an ordered dictionary. The signature is the same as regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary.

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__setitem__(self, key, value)
(Index assignment operator)

source code 

od[i]=y

Overrides: dict.__setitem__
(inherited documentation)

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

source code 

convenience function for adding a Parameter: with p = Parameters() p.add(name, value=XX, ....)

is equivalent to p[name] = Parameter(name=name, value=XX, ....

add_many(self, *parlist)

source code 
convenience function for adding a list of Parameters:
Here, you must provide a sequence of tuples, each containing
at least the name. The order in each tuple is the following:
    name, value, vary, min, max, expr
with   p = Parameters()
p.add_many( (name1, val1, True, None, None, None),
            (name2, val2, True,  0.0, None, None),
            (name3, val3, False, None, None, None),
            (name4, val4))

__getattr__(self, name)
(Qualification operator)

source code 

Allow easy access to the parameter attributes like value ect. fx. all values can be reached with Parameters.value