Package reflectometry :: Package model1d :: Package model :: Module calcRefl

Module calcRefl

source code

Basic reflectometry calculations.

reflectivity, reflectivity_amplitude:
Slab model with optional absorption and roughness. The function reflectivity returns the magnitude squared of the waveform. The function reflectivity_amplitude returns the complex waveform.
magnetic_reflectivity, magnetic_amplitude, unpolarized_magnetic:
Slab model with supporting magnetic scattering. The function magnetic_reflectivity returns the magnitude squared for the four spin polarization cross sections [++, +-, -+, --]. The function magnetic_amplitude returns the complex waveforms. The function unpolarized_magnetic returns the expected magnitude for a measurement of the magnetic scattering using an unpolarized beam.
convolve, fixedres, varyingres
Functions for estimating the resolution and convolving the the profile with the resolution function.

Author: Paul Kienzle

Functions
 
reflectivity(*args, **kw)
Return reflectivity R^2 from slab model with sharp interfaces.
source code
 
reflectivity_amplitude(Q, depth, rho, mu=0, sigma=None, wavelength=1)
Returns the complex reflectivity waveform.
source code
 
magnetic_reflectivity(*args, **kw)
Magnetic reflectivity for slab models.
source code
 
unpolarized_magnetic(*args, **kw)
Returns the average of magnetic reflectivity for all cross-sections.
source code
 
magnetic_amplitude(Q, depth, rho, mu=0, wavelength=1, rho_m=0, theta_m=0, Aguide=-90.0)
Returns the complex magnetic reflectivity waveform.
source code
 
fixedres(wavelength, dLoL, dT, Q)
Return resolution dQ for fixed slits.
source code
 
varyingres(wavelength, dLoL, dToT, Q)
Return resolution dQ for varying slits.
source code
 
convolve(Qi, Ri, Q, dQ)
Return convolution R[k] of width dQ[k] at points Q[k].
source code
Function Details

reflectivity(*args, **kw)

source code 

Return reflectivity R^2 from slab model with sharp interfaces. returns reflectivities.

The parameters are as follows:

Q (angstrom**-1)
points at which to evaluate the reflectivity
depth (angstrom)
thickness of the individual layers (incident and substrate depths are ignored)
rho (microNb)
Scattering length density.
mu (microNb)
absorption. Defaults to 0.
sigma (angstrom)
interface roughness between the current layer and the next. The final layer is ignored. This may be a scalar for fixed roughness on every layer, or None if there is no roughness.
wavelength (angstrom)
Incident wavelength (only affects absorption). May be a vector. Defaults to 1.

This function does not compute any instrument resolution corrections.

Use reflectivity_amplitude to return the complex waveform.

reflectivity_amplitude(Q, depth, rho, mu=0, sigma=None, wavelength=1)

source code 

Returns the complex reflectivity waveform.

See reflectivity for details.

magnetic_reflectivity(*args, **kw)

source code 

Magnetic reflectivity for slab models.

Returns the expected values for the four polarization cross sections (++,+-,-+,--).

Return reflectivity R^2 from slab model with sharp interfaces. returns reflectivities.

The parameters are as follows:

Q (angstrom**-1)
points at which to evaluate the reflectivity
depth (angstrom)
thickness of the individual layers (incident and substrate depths are ignored)
rho (microNb)
Scattering length density.
mu (microNb)
absorption. Defaults to 0.
wavelength (angstrom)
Incident wavelength (only affects absorption). May be a vector. Defaults to 1.
rho_m (microNb)
Magnetic scattering length density correction.
theta_m (degrees)
Angle of the magnetism within the layer.
Aguide (degrees)
Angle of the guide field; -90 is the usual case

This function does not compute any instrument resolution corrections or interface diffusion

Use magnetic_amplitude to return the complex waveform.

unpolarized_magnetic(*args, **kw)

source code 

Returns the average of magnetic reflectivity for all cross-sections.

See magnetic_reflectivity for details.

magnetic_amplitude(Q, depth, rho, mu=0, wavelength=1, rho_m=0, theta_m=0, Aguide=-90.0)

source code 

Returns the complex magnetic reflectivity waveform.

See magnetic_reflectivity for details.

fixedres(wavelength, dLoL, dT, Q)

source code 

Return resolution dQ for fixed slits.

Angular divergence dT is (s1+s2)/d, where d is the distance between the slits and s1,s2 is the slit openings. Slits and distances should use the same units.

varyingres(wavelength, dLoL, dToT, Q)

source code 

Return resolution dQ for varying slits.

Angular divergence dT/T is (s1+s2)/d/theta(Q(s1,s2)).