Skip to main content

Calculations for X-ray Electric Field Intensities using the Parratt recursive algorithm.

Project description

A package for calculations of X-ray Electric Field Intensities (XEFI) using the Parratt recursive algorithm, and built to the feature-rich standards of xraysoftmat.

This package calculates discrete models of multi-layer structures, including the ability to slice simplistic models into arbitrary layers. Supports the use of the KKCalc package to calculate the index of refraction within layers.

pypi zenodo Documentation Coverage Status pre-commit.ci status

PyTest Linting Documentation

Python SemVer Code style: black Ruff Code doc: numpydoc

Screenshot of an XEFI generated map.

The Model

To make this model representative of the code, we count $N+1$ layers from $i=0$ to $i=N$ inclusive, as python indexes.

Screenshot of the XEFI model geometry.

Here, layers $i=0$ and $i=N$ are semi-infinite layers, typically modelling air/vacuum and a substrate respectively. Boundary conditions allow us to set the incident amplitude $T_0 = 1$, and the reflected amplitude $R_{N}=0$. We define the following quantities:

Variable

Description

$N$

The number of interfaces between the top and bottom layers, corresponding to $N+1$ layers

$i$

The layer number, indexed from 0 (i.e. 0 to $N$)

$z_i$

The depth of the $i^{th}$ interface ($z_i < 0$).

$d_i$

The thickness of the $i^{th}$ layer ($d_0 = d_N = ∞$)

$θ^t_i$

The transmitted angle of incidence in layer $i$. Same as the angle of reflection $θ^r_i$ in layer $i$.

$k_i$

The z-component of the wavevector in the $i^{th}$ layer.

$T_i$

The complex amplitude of the downward propogating electric field at interface $i$.

$R_i$

The complex amplitude of the upward propogating electric field at interface $i$.

$X_i$

The ratio of the downward and upward propogating electric field intensities at interface $i$.

$E^{Total}_i$

The total electric field in layer $i$.

$E_{beam}$

The X-ray beam energy in eV.

After recursively computing the ratio $X_i$, then solving the amplitudes $T_i$, $R_i$ at each interface, then the total electric field at depth $z$ in the film can then be calculated as the sum of downward and upward propogating waves:

$$E^{Total}_i(E_{beam}, θ^t_0, z) = T_i(E_{beam}, θ^t _0) exp(-i k_i (z-z_i)) + R_i (E_{beam}, θ^t_0) exp(i k_i (z-z_i))$$

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xefi-0.1.0.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xefi-0.1.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file xefi-0.1.0.tar.gz.

File metadata

  • Download URL: xefi-0.1.0.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for xefi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd7da5ec6d9f7e1be9ae2d885f52d2dd0fd377ce4c0cc49810a8295e1d966b82
MD5 e8d2803288c9647a73c370498710fb86
BLAKE2b-256 cacd3f60c6264073dba6535dde9e9e690a934e556508ab5d8b782341893d2058

See more details on using hashes here.

File details

Details for the file xefi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xefi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for xefi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd787524f5ea8bab58d37adcb30557dd7fe6e8df7658d53c7c5818f92c438a67
MD5 36b96c5d820a84562c5e7a1e24dd1e59
BLAKE2b-256 305da6045c303f39c78ff625b6f63c49e30694de1230bf5651caea9ee267c70c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page