Depth probe simulation is an auxiliary simulation type, which helps to visualize the total intensity in dependence on the beam incidence angle and the position in the sample.
The depth-probe simulation computes the local field intensity |ψ(z)|²/|ψ_i|² — the squared wave amplitude relative to the incident wave. This quantity is not the energy flux density, and it is not the Fresnel transmission coefficient T. Due to standing waves, it can exceed 1, whereas T ≤ 1 always.
The incident wave has unit amplitude at the lower interface of the fronting layer (z = 0). For a beam from below, it has unit amplitude at the upper interface of the substrate layer. These reference planes are independent of how the sample is sliced internally; they matter only if the medium of incidence absorbs. Reflectance R and transmittance T refer to the same planes.
To compute the total wave intensity as function of $\alpha_\text{i}$ and z, use
import bornagain as ba
scan = ...
sample = ...
z_axis = ba.EquiDivision("z (nm)", nz, z_min, z_max)
simulation = ba.DepthprobeSimulation(scan, sample, z_axis)
# ... set options
result = simulation.simulate()
Supported scan types: grazing angle scan, wavelength scan, wavenumber qz scan.
In a qz scan, qz is twice the vertical wavenumber of the incident wave in the fronting medium, as in specular simulations. Since a qz scan specifies no wavelength, all materials must then be defined by their scattering-length density.
In a grazing angle scan, negative angles describe a beam entering through the substrate. The incident wave is then the one in the substrate, and “transmitted” waves are those propagating along the incident direction (here upward).
For the constructor arguments, see sections scan, sample.
For optional settings, see simulation options.
For the return type of function simulate(),
see Datafield.
The constructor takes an optional flags argument
simulation = ba.DepthprobeSimulation(scan, sample, z_axis, flags)
Flags may designate a partial beam
ba.ZDirection_None # = 0, may be ommitted: total field
ba.ZDirection_Reflected # = 1, reflected beam only
ba.ZDirection_Transmitted # = 2, transmitted beam only
or/and a property of the simulated wave field
ba.WaveProperty_Intensity # = 0, may be ommitted: intensity, |psi|^2
ba.WaveProperty_Modulus # = 4, modulus of wave amplitude, |psi|
ba.WaveProperty_Phase # = 8, phase of wave amplitude, arg(psi), in rad
To combine flags from each of these groups, combine them with the “or” operator:
flags = ba.ZDirection_Reflected | ba.WaveProperty_Modulus
If the sample is magnetic, or if the scan has a
polarization or an analyzer, the simulation computes
the spinor wave field.
Its amplitude matrix M(z) maps the incident spinor to the local one.
The computed intensity is tr(A M ρ M†),
where ρ is the polarization matrix of the incident beam
and A the analyzer matrix.
Likewise, reflected() and transmitted() return reflectance and
transmittance for the given polarizer and analyzer.
Modulus and phase of a spinor field are not defined.
Therefore the flags WaveProperty_Modulus and WaveProperty_Phase
are rejected for magnetic samples and for polarized beams.
Depth probe simulation was introduced in BornAgain 1.12. It was first used and documented in Frielinghaus et al, Nucl Instr Meth A 871, 72 (2017) and Adlmann et al, J Phys Condens Matter 30, 165901 (2018).