Package reflectometry :: Package model1d :: Package adaptor :: Module reflModel :: Class ReflModel

Class ReflModel

source code


Model class for Refl.
Instance Methods
 
__init__(self, name, magnetic=False)
Constructor.
source code
 
getClassName(self)
Return the full class name
source code
 
clear(self)
clear the contents of the model.
source code
 
getParameters(self)
Return a list of strings representing the fitting parameter names.
source code
 
getLayers(self)
Return a list of parameters for the model.
source code
 
getLayer(self, pname)
Return a list of parameters for the model.
source code
 
addLayer(self, pmName)
Add a fitting parameter to the model.
source code
 
layer(self, name, depth=100.0, sigma=0.0, rho=1.0, mu=0.0, rho_m=0.0, theta_m=0.0) source code
 
incident(self, name, depth=100.0, sigma=0.0, rho=1.0, mu=0.0, rho_m=0.0, theta_m=0.0) source code
 
substrate(self, name, depth=100.0, sigma=0.0, rho=1.0, mu=0.0, rho_m=0.0, theta_m=0.0) source code
 
interface(self, rough=5.0) source code
 
removeLayer(self, pmName)
remove a parameter by its name.
source code
 
__call__(self)
Return the result for the simulation.
source code
 
getResidual(self)
Return a vector to calculate norm2.
source code
 
getChisq(self)
Return the chisq value for the optimization.
source code
 
fromPyFile(self, fname)
Rebuild the object from an python script file
source code
 
toPyFile(self, fname)
Save the object in a file in python format.
source code

Inherited from site-packages.park.fitpark.fitModel.FitModel: getData, getName, setData, setName

Inherited from site-packages.park.fitpark.fitterObject.FitterObject: __repr__, fromFile, fromXml, getNodeName, getVersion, parse, setNodeName, setVersion, toFile, toPrettyXml, toXml, toXmlNode

Inherited from site-packages.park.fitpark.fitObject.FitObject: clone, copyFrom, equals, getHashCode, getSelfObject

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables

Inherited from site-packages.park.fitpark.fitModel.FitModel: data

Inherited from site-packages.park.fitpark.fitterObject.FitterObject: VERSION

Properties

Inherited from object: __class__

Method Details

__init__(self, name, magnetic=False)
(Constructor)

source code 
Constructor. A model must have a name.
Overrides: object.__init__

getClassName(self)

source code 
Return the full class name
Overrides: site-packages.park.fitpark.fitModel.FitModel.getClassName

clear(self)

source code 
clear the contents of the model.
Overrides: site-packages.park.fitpark.fitterObject.FitterObject.clear

getParameters(self)

source code 
Return a list of strings representing the fitting parameter names. The user class override this function.
Overrides: site-packages.park.fitpark.fitModel.FitModel.getParameters

addLayer(self, pmName)

source code 
Add a fitting parameter to the model. pmName is the parameter's name that should not include the model name.

__call__(self)
(Call operator)

source code 
Return the result for the simulation.
Overrides: site-packages.park.fitpark.fitModel.FitModel.__call__

getResidual(self)

source code 
Return a vector to calculate norm2. It is required by leastsq() method to calculate the error bar of parameters.
Overrides: site-packages.park.fitpark.fitModel.FitModel.getResidual

getChisq(self)

source code 
Return the chisq value for the optimization. This provides the default implementation, which is || residual ||^2.
Overrides: site-packages.park.fitpark.fitModel.FitModel.getChisq

toPyFile(self, fname)

source code 
Save the object in a file in python format. fname: a file name or a file handler. Return true when successes.