fitproblem

sans.perspectives.fitting.fitproblem

class sans.perspectives.fitting.fitproblem.FitProblem

Bases: sans.perspectives.fitting.fitproblem.FitProblemComponent

FitProblem class allows to link a model with the new name created in _on_model, a name theory created with that model and the data fitted with the model. FitProblem is mostly used as value of the dictionary by fitting module.

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x057468F0>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.perspectives.fitting.fitproblem'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

clear_model_param()

clear constraint info

enable_smearing()
Parameters:flag – bool.When flag is 1 get the computer smear value. When

flag is 0 ingore smear value.

get_fit_data()
Returns:data associate with this class
get_fit_tab_caption()
get_graph_id()

Get graph_id

get_model()
Returns:saved model
get_model_param()

return list of couple of parameter name and value

get_name()
get_origin_data()
get_param2fit()

return the list param names to fit

get_range()
Returns:fitting range
get_residuals()
Returns:residuals
get_result()

get result

get_scheduled()

return true or false if a problem as being schedule for fitting

get_smearer()

return smear object

get_theory_data()
Returns:theory generated with the current model and data of this class
get_weight()

returns weight array

save_model_name()
schedule_tofit()

set schedule to true to decide if this fit must be performed

set_fit_data()

Store data associated with this class :param data: list of data selected

set_fit_tab_caption()
set_graph_id()

Set graph id (from data_group_id at the time the graph produced)

set_model()

associates each model with its new created name :param model: model selected :param name: name created for model

set_model_param()

Store the name and value of a parameter of this fitproblem’s model :param name: name of the given parameter :param value: value of that parameter

set_param2fit()

Store param names to fit (checked) :param list: list of the param names

set_range()

set fitting range :param qmin: minimum value to consider for the fit range :param qmax: maximum value to consider for the fit range

set_residuals()

save a copy of residual :param data: data selected

set_result()
set_smearer()

save reference of smear object on fitdata

Parameters:smear – smear object from DataLoader
set_theory_data()

save a copy of the data select to fit

Parameters:data – data selected
set_weight()

Received flag and compute error on data. :param flag: flag to transform error of data. :param is2d: flag to distinguish 1D to 2D Data

class sans.perspectives.fitting.fitproblem.FitProblemComponent

Bases: object

Inferface containing information to store data, model, range of data, etc... and retreive this information. This is an inferface for a fitProblem i.e relationship between data and model.

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x057465D0>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

__module__ = 'sans.perspectives.fitting.fitproblem'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

clear_model_param()

clear constraint info

enable_smearing()
Parameters:flag – bool.When flag is 1 get the computer smear value. When

flag is 0 ingore smear value.

get_fit_data()
get_fit_tab_caption()

Return the caption of the page associated with object

get_graph_id()

Get graph_id

get_model()
Returns:saved model
get_model_param()

return list of couple of parameter name and value

get_name()
get_param2fit()

return the list param names to fit

get_range()
Returns:fitting range
get_residuals()
Returns:residuals
get_result()

get result

get_scheduled()

return true or false if a problem as being schedule for fitting

get_smearer()

return smear object

get_theory_data()
Returns:list of data dList
get_weight()

get fitting weight

save_model_name()
schedule_tofit()

set schedule to true to decide if this fit must be performed

set_fit_data()
Store of list of data and create by create new fitproblem of each data
id , if there was existing information about model, this information get copy to the new fitproblem
Parameters:data – list of data selected
set_fit_tab_caption()

store the caption of the page associated with object

set_graph_id()

Set graph id (from data_group_id at the time the graph produced)

set_model()

associates each model with its new created name :param model: model selected :param name: name created for model

set_model_param()

Store the name and value of a parameter of this fitproblem’s model :param name: name of the given parameter :param value: value of that parameter

set_param2fit()

Store param names to fit (checked) :param list: list of the param names

set_range()

set fitting range

set_residuals()

save a copy of residual :param data: data selected

set_result()
set_theory_data()

save a copy of the data select to fit :param data: data selected

set_weight()

set fitting range

class sans.perspectives.fitting.fitproblem.FitProblemDictionary

Bases: sans.perspectives.fitting.fitproblem.FitProblemComponent, dict

This module implements a dictionary of fitproblem objects

__class__

alias of type

__cmp__

x.__cmp__(y) <==> cmp(x,y)

__contains__(k) → True if D has a key k, else False
__delattr__

x.__delattr__(‘name’) <==> del x.name

__delitem__

x.__delitem__(y) <==> del x[y]

__dict__ = <dictproxy object at 0x06294050>
__eq__

x.__eq__(y) <==> x==y

__ge__

x.__ge__(y) <==> x>=y

__getattribute__

x.__getattribute__(‘name’) <==> x.name

__getitem__()

x.__getitem__(y) <==> x[y]

__gt__

x.__gt__(y) <==> x>y

__hash__

x.__hash__() <==> hash(x)

__init__()
__iter__

x.__iter__() <==> iter(x)

__le__

x.__le__(y) <==> x<=y

__len__

x.__len__() <==> len(x)

__lt__

x.__lt__(y) <==> x<y

__module__ = 'sans.perspectives.fitting.fitproblem'
__ne__

x.__ne__(y) <==> x!=y

static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

add_data()

Add data to the current dictionary of fitproblem. if data id does not exist create a new fit problem. :note: only data changes in the fit problem

clear() → None. Remove all items from D.
clear_model_param()

clear constraint info

copy() → a shallow copy of D
enable_smearing()
Parameters:flag – bool.When flag is 1 get the computer smear value. When

flag is 0 ingore smear value.

static fromkeys(S[, v]) → New dict with keys from S and values equal to v.

v defaults to None.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
get_batch_result()

get result

get_fit_data()

return data for the given fitproblem id :param fid: is key representing a fitproblem. usually extract from data

id
get_fit_problem()

return fitproblem contained in this dictionary

get_fit_tab_caption()

Return the caption of the page associated with object

get_graph_id()

Get graph_id

get_model()
Returns:saved model
get_model_param()

return list of couple of parameter name and value

get_name()
get_param2fit()

return the list param names to fit

get_range()
Returns:fitting range
get_residuals()
Returns:residuals
get_result()

get result

get_scheduled()

return true or false if a problem as being schedule for fitting

get_smearer()

return smear object

get_theory_data()
Returns:list of data dList
get_weight()

return fit weight

has_key(k) → True if D has a key k, else False
items() → list of D's (key, value) pairs, as 2-tuples
iteritems() → an iterator over the (key, value) items of D
iterkeys() → an iterator over the keys of D
itervalues() → an iterator over the values of D
keys() → list of D's keys
pop(k[, d]) → v, remove specified key and return the corresponding value

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty

save_model_name()
schedule_tofit()

set schedule to true to decide if this fit must be performed

set_batch_result()

set a list of result

set_fit_data()

save a copy of the data select to fit :param data: data selected

set_fit_tab_caption()

store the caption of the page associated with object

set_graph_id()

Set graph id (from data_group_id at the time the graph produced)

set_model()

associates each model with its new created name :param model: model selected :param name: name created for model

set_model_param()

Store the name and value of a parameter of this fitproblem’s model :param name: name of the given parameter :param value: value of that parameter

set_param2fit()

Store param names to fit (checked) :param list: list of the param names

set_range()

set fitting range

set_residuals()

save a copy of residual :param data: data selected

set_result()
set_smearer()

save reference of smear object on fitdata :param smear: smear object from DataLoader

set_theory_data()

save a copy of the data select to fit :param data: data selected

set_weight()

fit weight

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update(E, **F) → None. Update D from E and F: for k in E: D[k] = E[k]

(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]

values() → list of D's values

Table Of Contents

Previous topic

fitpanel

Next topic

fitting

This Page