DepthDistribution#

class de_ebsd.sim.DepthDistribution(energies_kev, depth_step, accum_z, n_total)[source]#

Bases: object

Backscatter yield versus energy and exit depth.

Attributes:
energies_kev

Energy bin centers in keV, ascending, shape (nE,).

depth_step

Depth bin size in nm.

accum_z

Electron counts per (energy, depth, y, x), shape (nE, nz, ny, nx); the lateral window is EMsoft’s central +/- numsx/10 region.

n_total

Total number of incident electrons (totnum_el * multiplier).

Methods

depth_weights

The weighting lambda_E(z) for one energy bin (EMsoft lambdaE).

energy_index

Index of the energy bin closest to energy_kev.

from_emsoft

Load from an EMsoft Monte Carlo (or master pattern) HDF5 file.

from_simulation

Build depth statistics from the native Monte Carlo (EMsoft-free).

integration_depths

Number of depth bins to integrate per energy (EMsoft izzmax).

show

Inspect exit-depth bins and the backend's 99% integration window.

single_energy

A simple exponential exit-depth model for one energy bin.

Attributes

n_depths

n_energies

energies_kev

depth_step

accum_z

n_total

depth_weights(energy_kev, normal_absorption_length)[source]#

The weighting lambda_E(z) for one energy bin (EMsoft lambdaE).

The lateral-summed exit fraction per depth bin, multiplied by exp(+2 pi z / x_gp) to cancel the normal absorption that the Bloch eigenvalues already contain.

energy_index(energy_kev)[source]#

Index of the energy bin closest to energy_kev.

classmethod from_emsoft(path)[source]#

Load from an EMsoft Monte Carlo (or master pattern) HDF5 file.

classmethod from_simulation(material, beam_energy_kev, **kwargs)[source]#

Build depth statistics from the native Monte Carlo (EMsoft-free).

Delegates to de_ebsd.sim.montecarlo.transport.simulate_depth_distribution() (see it for the keyword arguments); material is a Crystal or a MaterialProperties.

integration_depths(fraction=0.99)[source]#

Number of depth bins to integrate per energy (EMsoft izzmax).

For each lateral pixel the depth reaching fraction of that pixel’s yield is found; the maximum over pixels (cumulative over energies, as in EMsoft) is returned per energy bin.

show(energy_kev=None)[source]#

Inspect exit-depth bins and the backend’s 99% integration window.

Returns an energy/slice-selectable anywidget, also exportable to HTML. Selection is inspection only: it does not truncate or mutate the model.

classmethod single_energy(energy_kev, thickness=100.0, depth_step=1.0, decay_length=30.0)[source]#

A simple exponential exit-depth model for one energy bin.

A coarse stand-in that reproduces band geometry but not the full dynamical depth contrast. Superseded as the standalone default by the native Monte Carlo (from_simulation()), which the simulator now builds automatically when no depth profile is supplied; this remains a fast zero-config fallback for direct backend use.