Skip to main content

x-ray optics package

Project description

pyxro for X-Ray Optics

The python X-Ray Optics package allows for the calculation of reflectivity and photoelectron emission intensities of multilayer samples as a function of incident angle or photon energy.

It is based on YXRO from Yang et al. [doi]. The simulation code includes important x-ray optical effects such as total reflection at grazing incidence, core-level resonance, and standing-wave effects.

The code in this repository is still in development and is composed of two parts:

  • pyxro: the main part of the code that allows to create/manipulate samples and run physics simulations.
  • webapp: a web interface built with Dash to operate pyxro

Examples

[Mo/Si]x5 3.4 nm multilayer mirror with oxidized Si layer and C on top

import pyxro.multilayer as xroml

sample = xroml.MultilayerSample(name = 'Mo/Si 3.4 nm')
sample.add_layer(layer = {'name': 'C', 'formula': 'C', 'density': 1.0, 'thickness': 5.0})
sample.add_layer(template='SiO2', layer = {'name': 'SiO2', 'thickness': 8.0})
sample.add_layer(template='Si', layer = {'name': 'Si', 'thickness': 15.0})
sample.add_layer(template='Mo', layer = {'name': 'Mo', 'thickness': 13.6, 'repeat': 5})
sample.add_layer(template='Si', layer = {'name': 'Si', 'thickness': 20.4, 'repeat': 5})
sample.add_layer(template='Si', layer = {'name': 'Substrate'})
sample.get_sample()
id name formula density repeat thickness molecular_weight nve energy_gap
0 1 C C 1.0 1 5.0 12.0107 4 0.00
1 2 SiO2 SiO2 2.2 1 8.0 60.0843 16 9.00
2 3 Si Si 2.3 1 15.0 28.0855 4 1.12
3 4 Mo Mo 10.1 5 13.6 95.9400 6 0.00
4 5 Si Si 2.3 5 20.4 28.0855 4 1.12
5 6 Substrate Si 2.3 1 0.0 28.0855 4 1.12
sample.get_fullsample()
id name formula density repeat thickness molecular_weight nve energy_gap interdiffusion interdiffusion_type
0 0 Vacuum 0.0 1 100.0 0.0000 0 0.00 0.0 none
1 1 C C 1.0 1 5.0 12.0107 4 0.00 0.0 none
2 2 SiO2 SiO2 2.2 1 8.0 60.0843 16 9.00 0.0 none
3 3 Si Si 2.3 1 15.0 28.0855 4 1.12 0.0 none
4 4 Mo_1 Mo 10.1 5 13.6 95.9400 6 0.00 0.0 none
5 5 Si_1 Si 2.3 5 20.4 28.0855 4 1.12 0.0 none
6 4 Mo_2 Mo 10.1 5 13.6 95.9400 6 0.00 0.0 none
7 5 Si_2 Si 2.3 5 20.4 28.0855 4 1.12 0.0 none
8 4 Mo_3 Mo 10.1 5 13.6 95.9400 6 0.00 0.0 none
9 5 Si_3 Si 2.3 5 20.4 28.0855 4 1.12 0.0 none
10 4 Mo_4 Mo 10.1 5 13.6 95.9400 6 0.00 0.0 none
11 5 Si_4 Si 2.3 5 20.4 28.0855 4 1.12 0.0 none
12 4 Mo_5 Mo 10.1 5 13.6 95.9400 6 0.00 0.0 none
13 5 Si_5 Si 2.3 5 20.4 28.0855 4 1.12 0.0 none
14 6 Substrate Si 2.3 1 0.0 28.0855 4 1.12 NaN NaN
sample.set_axis(axis='incident_angle', range = (0, 0.02, 10))
sample.set_axis(axis='photon_energy', fixed_value = 3000)
sample.calculate_optical_constants()
Refl = sample.calculate_reflectivity()
Refl.plot(yscale='log', figsize=(4,3));

png

EF = sample.calculate_electric_field()
EF.T.plot(yincrease=False, figsize=(3,4));

png

import pyxro.calculation as xrocalc

calc = xrocalc.Calculation(sample)
calc.get_single_photoemission(label = 'Mo', Ank='Mo3d', layers=[4])
calc.photoemission.T.plot(yincrease=False, figsize=(3,4))

png

calc.photoemission.integrate('depth').plot(figsize=(4,3));

png

Webapp screenshots

Defining a sample: png

Reflectivity calculation: png

Electric field calculation: png

Relative PES intensities of levels for all incident angles: png

Copyright

MLExchange Copyright (c) 2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

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

pyxro-0.1.0.tar.gz (15.3 MB view details)

Uploaded Source

Built Distribution

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

pyxro-0.1.0-py3-none-any.whl (15.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyxro-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.2

File hashes

Hashes for pyxro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45ceb2e138c1f843e87fcda6a669dd32481a096eb106aa9c2fabef9c5dcf5439
MD5 54d182084ce50475a5f205e516bdef70
BLAKE2b-256 5e98b0bb6091289eeca84dbbb45ee90df27e1f75a1f6753fd3851dd78dec0822

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyxro-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.2

File hashes

Hashes for pyxro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9bee177a7734be7b63674e36f72b929f48e9c231daef9a02a6621baccbd555f
MD5 494860bfb78024911a92491c182cf0fa
BLAKE2b-256 6d1225ee808988db784bb0ad82155fa6d3a9022f05f37e82c5335e1cb6d5cd08

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