Package reflectometry :: Package model1d :: Package model :: Module profile :: Class Profile

Class Profile

source code

Reflectometry depth profile class.

TODO: add support for volume fraction TODO: add support for multilayer repeat structures TODO: separate roughness for magnetism layers TODO: more flexible interface functions

Instance Methods
 
__init__(self, names=None, depth=None, rough=None, rho=None, mu=None, phi=None, theta=None, max_rough=3)
Create a new reflectometry 1D profile model.
source code
 
refresh(self) source code
 
calc_offsets(self)
Recompute the offsets of each layer.
source code
 
calcMarker(self)
Find the range of the marker( slope, spline ) in y axis
source code
 
getCurrProfiles(self) source code
 
calc(self, n=200)
Compute the profiles.
source code
 
__getitem__(self, n)
model[i] returns the tuple (rho,mu,P,theta) with the contents for each cross-section in that layer.
source code
 
__delitem__(self, n)
del model[i] removes a layer.
source code
 
find(self, z)
Find the layer containing the z value.
source code
 
span(self, i, n)
Compute the total depth spanned by n layers starting at layer i.
source code
 
thickness(self)
Compute the total thickness of the system, excluding roughness extending into the incident medium or substrate.
source code
 
insertlayer(self, n, depth, rho, rough=None)
Insert a new layer after layer n.
source code
 
initDepth(self, n, depth)
Initialize the depth
source code
 
initRough(self, n, rough)
Initialize the rough
source code
 
initRho(self, n, rho)
Initialize the rho
source code
 
initMu(self, n, mu)
Initialize the mu
source code
 
initPhi(self, n, phi)
Initialize the phi
source code
 
initTheta(self, n, t)
Initialize the theta
source code
Method Details

__init__(self, names=None, depth=None, rough=None, rho=None, mu=None, phi=None, theta=None, max_rough=3)
(Constructor)

source code 

Create a new reflectometry 1D profile model.  A profile consists of
four cross sections --- scattering length density rho, absorption
profile mu, magnetic scattering P and magnetic angle theta.

The cross-sections are made up of list layers, all the same length,
or None if that cross section isn't defined.  The top layer and the
bottom layer are semi-infinite slabs.  The middle layers each have
a depth associated with them.  Between each pair of layers is an
interface, with associated roughness to indicate how much diffusion
there is between the layers. This means a system which is made up
of n layers (including incident medium and substrate) has n-1
roughness values and n-2 depth values.

The blend function breaks down if the roughness is too large.  Use
max_rough=k to set k*rough <= depth.  A value of 3 yields a smooth
profile.

Each layer can have a name.  The name can use TeX style math formatting
such as  r'$
m{Si}
m{O}_2' for silicon dioxide.

Various layer types are available.  As of this writing
they include:
    NoLayer    - the profile is not defined for this region
    FlatLayer  - a flat section
    SlopeLayer - a linear section
    SplineLayer - a cubic B-spline section
    JoinLayer   - extend the previous layer with the next depth

Use JoinLayer to create e.g., magnetic profiles which extend
across multple layers and can be fit with splines.

The resulting model has a number of attributes:
    magnetic is True if there are magnetic layers
    absorbing is True if there are absorbing layers
    d is the depth of each layer, including the nominal
        depth of the substrate and incident medium required
        to support roughness (out to 3 sigma)
    offset is the location of each layer interface, including
        values for leading and trailing edge of the incident
        medium and substrate roughness
    rho, mu, P, theta are the layers
    rough is the roughnesses
    names are the names of the layers

calc_offsets(self)

source code 
Recompute the offsets of each layer. This must be done after the model is updated (and in particular after the depths, or top and bottom roughness has changed). model.offset[0] and model.offset[-1] show the maximum extent of the profile between the semi-infinite uniform incident and substrate media. The other offsets show the position of the interfaces.

calc(self, n=200)

source code 

Compute the profiles. This uses equidistance steps in z.

TODO: use dz as the criterion rather than n TODO: Collapse excess layers to make computing reflectivity cheaper

insertlayer(self, n, depth, rho, rough=None)

source code 

Insert a new layer after layer n.

Not implemented.