Package reflectometry :: Package model1d :: Package model :: Module model :: Class Model

Class Model

source code

Instance Methods
 
__init__(self, datafile=None, magnetic=True) source code
 
addProfile2Layer(self, idx, mL, mP, b)
Add a profile in a layer
source code
 
setProfile2Layer(self, idx, mL, mP, b)
set a profile in a layer
source code
 
addLayers(self, name, depth=100.0, rho=0.0, mu=0.0, phi=0.0, theta=0.0) source code
 
setRoughness(self, index, rough=5.0)
set the rough
source code
 
setDepth(self, index, depth=100)
sets the depth of layer number index
source code
 
setValue(self, name, idx=0, rho=0.0, mu=0.0, phi=0.0, theta=0.0, depth=100) source code
 
setIncidentValue(self, name, rho=0.0, mu=0.0, phi=0.0, theta=0.0, depth=100)
set the profile of the incident layer
source code
 
setSubstrateValue(self, name, rho=0.0, mu=0.0, phi=0.0, theta=0.0, depth=100)
set the profile of the substrate layer
source code
 
loadData(self, fname)
Loads in data with the given filename
source code
 
calcProfile(self, maxQ=None, dz=None)
calculte the profile from model dz (Angstrom) the step size for the profile.
source code
 
calcTheory(self, Q, dz=None) source code
 
reflectivity(self, calcQs, background=0.0, wavelength=4.75, fitdQs=None) source code
 
incident(self, name, rho=0, mu=0, phi=0, theta=0.0)
model.incident('name',rho=0,mu=0,phi=0,theta=270) Add the incident medium to the model.
source code
 
substrate(self, name, rho=2.07, mu=0, phi=0, theta=0.0)
model.substrate('name',rho=2.07,mu=0,phi=0,theta=270) Add the substrate to the model.
source code
 
layer(self, name, depth=100, rho=0, mu=0, phi=0, theta=270)
model.layer('name',depth,rho=0,mu=0,phi=0,theta=270) Add a layer to the model for all profiles.
source code
 
interface(model, width)
set the interface width between layers.
source code
 
fromPyFile(self, fname)
Rebuild the object from an python script file
source code
 
loadModel4Staj(self, fname, loadData=False) source code
Class Variables
  wavelength = 4.75
  background = 0.0
Method Details

calcProfile(self, maxQ=None, dz=None)

source code 

calculte the profile from model
dz (Angstrom)
    the step size for the profile.
maxQ (inv Angstrom)
    the maximum desired Q.  This is equivalent to dz = 4*pi/maxQ.
dz default to 1 angstrom profile steps if neither maxQ nor dz are given

layer(self, name, depth=100, rho=0, mu=0, phi=0, theta=270)

source code 
model.layer('name',depth,rho=0,mu=0,phi=0,theta=270) Add a layer to the model for all profiles. The layer can be flat (give either the value or a range), it can be 'join' indicating that it should extend the preceding layer of the same profile by the depth of the new layer, or it can be layer constructor such as spline(n,[lo,hi]).

interface(model, width)

source code 
set the interface width between layers. The width specifies one standard deviation of a Gaussian smearing function.