Skip to main content

grax

grax is an independent Python package for diffraction-grating simulations in X-ray optics, inspired by RETICOLO v9 and extended with higher-level workflows for practical studies.

Documentation

Full user and API documentation is published online.

  • User guide and tutorials: see the project documentation site
  • API reference: see the API section in the documentation site

For local docs builds from this repository, use:

tools/build_docs.sh --html

Installation

graxpy supports Python 3.12 and 3.13 only.

python -m pip install graxpy

graxpy now supports local Henke-table material lookup for elemental string names such as "Si" and "Pt", with optional density overrides through grax.MaterialSpec. Existing DataFrame optical-constants inputs still work, and xrt-compatible material objects remain supported for now but emit a deprecation warning.

PyPI project page: https://pypi.org/project/graxpy/0.1.0/

For local editable installs:

python -m pip install -e .

Local web app

Install the package and web extra, then start the local server.

From PyPI:

python -m pip install "graxpy[web]"
grax-web

From a local repository checkout:

python -m pip install -e ".[web]"
grax-web

The syntax graxpy.[web] is invalid. The extra must be attached directly to the package name: graxpy[web].

Then open http://127.0.0.1:5050. Use the home page to create and save gratings, then open the plot page to combine saved runs and select the diffraction orders to overlay.

grax-web now opens that local URL in your default browser automatically on startup.

Start on a different port when needed:

grax-web --port 8000

You can also override the bind address:

grax-web --host 0.0.0.0 --port 8000

When developing the web app locally, restart grax-web after changing run-state or UI logic so the browser sees the updated server behavior.

Local data is stored in .grax-web/ by default:

  • saved gratings: .grax-web/saved_gratings/
  • run results: .grax-web/runs/
  • combined plots: .grax-web/plots/
  • grating previews: .grax-web/previews/

Each saved run lives in .grax-web/runs/<run_id>/ and includes:

  • manifest.json
  • summary.csv
  • all_orders.csv
  • selected_efficiency.png

Use Plots to combine saved runs and choose which diffraction orders to overlay for each run. Use Manage runs to rename runs or bulk delete them.

Repository at a glance

  • src/grax/: core package source code
  • examples/: runnable examples
  • docs/: documentation sources

Attribution

grax is inspired by RETICOLO v9. This project is an independent Python implementation and is not an official RETICOLO distribution. RETICOLO is not bundled as part of the public graxpy package distribution.

License

Copyright (C) [2026] [Helmholtz-Berlin fur Materialen und Energie GmbH (HZB)]

Licensed under the European Union Public License (EUPL), Version 1.2.

You may not use this work except in compliance with the License.

A copy of the License is available at: https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12

Download files

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

Source Distribution

graxpy-0.4.7.tar.gz (692.2 kB view details)

Uploaded Source

Built Distribution

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

graxpy-0.4.7-py3-none-any.whl (778.5 kB view details)

Uploaded Python 3

File details

Details for the file graxpy-0.4.7.tar.gz.

File metadata

  • Download URL: graxpy-0.4.7.tar.gz
  • Upload date:
  • Size: 692.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.13

File hashes

Hashes for graxpy-0.4.7.tar.gz
Algorithm Hash digest
SHA256 efce38a22a1a393643d86014724aa6fe162e39c39bb0d8040a36bd6053679860
MD5 77d0ba4cb22fa4df8cd4d9abfbfee7ef
BLAKE2b-256 a3088ee3da8c56d99e51838c41b628d4ce3fcb85cad4c68bafbedc99cd1d2fa9

See more details on using hashes here.

File details

Details for the file graxpy-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: graxpy-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 778.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.13

File hashes

Hashes for graxpy-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3af31ff0ff037839c36ed9ea80642987692df2ed72aac3dde6c0f4520bbb480f
MD5 7c612b427f03044bc1cc620c0c70f1cb
BLAKE2b-256 29a7fc7ae79dd6211cb9572afe831b2e07ab2b3705de8e3f847ee524ca94d146

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.8

2 files

This release

0.4.7 This release

2 files

0.4.6

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page