Bases: exceptions.Exception
Exception raise to stop the fit
add_data fill a self.dList with data to fit
Parameters: |
|
---|
Returns: | list of data dList |
---|
Returns: | saved model |
---|
Remove one element from the list
Parameters: |
|
---|
set_model save a copy of the model
Parameters: |
|
---|
set self.selected to 0 or 1 for other values raise an exception
Parameters: |
|
---|
Bases: DataLoader.data_info.Data1D
Wrapper class for SANS data FitData1D inherits from DataLoader.data_info.Data1D. Implements a way to get residuals from data.
Clone the current object, without copying the data (which will be filled out by a subsequent operation). The data arrays will be initialized to zero.
Parameters: |
|
---|
Check whether the data has slit smearing information
Returns: | True is slit smearing info is present, False otherwise |
---|
Compute residuals.
If self.smearer has been set, use if to smear the data before computing chi squared.
Parameters: |
|
---|---|
Returns: | residuals |
Returns: | residuals derivatives . |
---|---|
Note : | in this case just return empty array |
Bases: DataLoader.data_info.Data2D
Wrapper class for SANS data
Clone the current object, without copying the data (which will be filled out by a subsequent operation). The data arrays will be initialized to zero.
Parameters: |
|
---|
Returns: | residuals derivatives . |
---|---|
Note : | in this case just return empty array |
Parameters: |
|
---|---|
Returns: | a model at this uid or None if no FitArrange element was created with this Uid |
return the self.selected value of the fit problem of Uid
Parameters: |
|
---|
select a couple of model and data at the Uid position in dictionary and set in self.selected value to value
Parameters: |
|
---|
Receives plottable, creates a list of data to fit,set data in a FitArrange object and adds that object in a dictionary with key Uid.
Parameters: |
|
---|
set a model on a given uid in the fit engine.
Parameters: |
|
---|---|
Note : | pars must contains only name of existing model’s parameters |
Bases: park.model.Model
PARK wrapper for SANS models.
override eval method of park model.
Parameters: |
|
---|
Evaluate the model and derivatives wrt pars at x.
pars is a list of the names of the parameters for which derivatives are desired.
This method needs to be specialized in the model to evaluate the model function. Alternatively, the model can implement is own version of residuals which calculates the residuals directly instead of calling eval.
return a list of value of paramter to fit
Parameters: |
|
---|
Set the initial value for a set of parameters.
E.g., model.set(width=3,center=5)
Set value for parameters to fit
Parameters: |
|
---|
Sans Assembly class a class wrapper to be call in optimizer.leastsq method
Calculates chi^2
Parameters: |
|
---|---|
Returns: | chi^2 |
Bases: park.parameter.Parameter
SANS model parameters for use in the PARK fitting service. The parameter attribute value is redirected to the underlying parameter value in the SANS model.
Set a parameter to a value, a range or an expression. If it is a value, the parameter will be fixed for the fit. If it is a range, the value will be varying for the fit. If it is an expression, the parameter will be calculated from the values of other parameters in the fit.
Raises ValueError if the value could not be interpreted.
Return parameter range string.
E.g., ” Gold .....|.... 5.2043 in [2,7]”
override the _getvalue of park parameter
:return value the parameter associates with self.name