Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c4073eb
feat: first version of delta/beta profile
tifuchs Jul 12, 2026
beee738
fix: EpitaxyInterface now is again consuming Film so thatinterfacial …
tifuchs Jul 12, 2026
cf2a59b
Merge branch 'master' into DWBA
tifuchs Jul 12, 2026
1e54f7d
fix: gap in zDensity
tifuchs Jul 13, 2026
5e1faf3
feat: make optical profile based on interfaces, reduce profile numeri…
tifuchs Jul 15, 2026
393aec6
feat(phys): add Wyckoff setters and compact symmetry metadata
tifuchs Jul 16, 2026
2fa9e43
fix: Wyckoff parameters are now fitted as absolute parameter (user fa…
tifuchs Jul 16, 2026
5b151be
feat: add Poisson surface unit cell handling
tifuchs Jul 18, 2026
eef423a
feat: add simple resolution correction
tifuchs Jul 23, 2026
3d17833
feat: visualization of atomistic models in jupyter notebook using py3…
tifuchs Jul 24, 2026
af90fcd
fix: force atomic coordinates to be stacked for split_in_layers()
tifuchs Jul 24, 2026
d4a2eed
perf: caching of atomic form factors
tifuchs Jul 24, 2026
743680b
perf: cache scattering factor lookups
tifuchs Jul 24, 2026
06d7563
build: statically link xxhash for binary releases
tifuchs Jul 24, 2026
1ebf766
perf: zdensity C++ backend
tifuchs Jul 24, 2026
8e5dcd1
feat(CTR): coherence of film epitaxy along z
tifuchs Jul 25, 2026
2dd5e79
docs: note PoissonSurface basis now requires three parameters
tifuchs Jul 28, 2026
051b43b
docs(phys): document F_bulk lattice-sum denominator fix as breaking
tifuchs Jul 28, 2026
774d6cd
test(phys): cover loading legacy value_kind="delta" Wyckoff parameters
tifuchs Jul 28, 2026
683b75b
test(phys): split legacy .xtal regression into three tracked cases
tifuchs Jul 28, 2026
7e5d1f4
perf(phys): bound the dispersion cache with LRU eviction
tifuchs Jul 28, 2026
eb05d70
refactor(phys): dedupe hardcoded hc constant in CTRoptics
tifuchs Jul 28, 2026
f9e5029
docs(phys): document stack_on's below_state and below_component params
tifuchs Jul 28, 2026
f7698a9
perf(phys): make FormFactorCache lookup and touch O(1)
tifuchs Jul 28, 2026
21513d3
test(phys): add value-level checks to the split-bulk-domain smoke test
tifuchs Jul 28, 2026
4b3dd1a
fix(phys): handle empty coherentDomainMatrix in accelerated F_uc back…
tifuchs Jul 28, 2026
e2e7a4c
fix(phys): skip CIF import test without ase, fix Windows temp-file re…
tifuchs Jul 28, 2026
8ae2814
ci: install extendedfilesupport extra so ase-dependent tests run
tifuchs Jul 28, 2026
efa9043
ci: run all xrayutils test modules and install symmetry extra
tifuchs Jul 28, 2026
7151d68
ci: run new xrayutils test modules in wheel smoke tests
tifuchs Jul 28, 2026
d2c3bba
fix(phys): fix float-equality CI failure and package unpackaged test …
tifuchs Jul 28, 2026
ce0828d
fix(phys): anchor film correctly to the bulk at lower end
tifuchs Jul 28, 2026
b595e0e
feat(phys): extend epitaxy interface strain coupling
tifuchs Jul 29, 2026
3cb9c39
build: bundle third-party licenses for statically-linked xxHash and p…
tifuchs Jul 29, 2026
46be5d0
fix(phys): correct strained optical profile construction
tifuchs Jul 29, 2026
a3f9aee
fix(phys): vectorize optical reflectivity and wavefields
tifuchs Jul 29, 2026
5ce82e1
fix(phys): correct ionic optics and Windows wheel arguments
tifuchs Jul 29, 2026
d2b7fb1
docs: update CHANGELOG for PR 65
tifuchs Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ concurrency:
env:
CIBW_SKIP: "*-musllinux_*"
CIBW_BUILD_FRONTEND: "build"
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
CIBW_CONFIG_SETTINGS: "setup-args=-Dstatic_xxhash=true"
CIBW_CONFIG_SETTINGS_WINDOWS: 'setup-args="--vsenv -Dstatic_xxhash=true"'
CIBW_TEST_ENVIRONMENT: "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 MPLBACKEND=Agg QT_QPA_PLATFORM=minimal"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_EXTRAS: extendedfilesupport,symmetry
CIBW_TEST_COMMAND: >-
python -c "from orgui.datautils.xrayutils import CTRuc;
assert CTRuc.HAS_CPP_ACCEL;
CTRuc.set_accel_backend('cpp');
print('CTR_ACCEL_BACKEND=', CTRuc.CTR_ACCEL_BACKEND)" &&
pytest --pyargs orgui.datautils.xrayutils.test.test_CTRcalc
orgui.datautils.xrayutils.test.test_CTRsymmetry
orgui.datautils.xrayutils.test.test_CTRresolution
orgui.datautils.xrayutils.test.test_CTRoptical_profile
orgui.datautils.xrayutils.test.test_scattering_factor_cache
CIBW_TEST_SKIP: "*-manylinux_aarch64"

jobs:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,21 @@ jobs:
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-musllinux_*"
CIBW_BUILD_FRONTEND: "build"
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
CIBW_CONFIG_SETTINGS: "setup-args=-Dstatic_xxhash=true"
CIBW_CONFIG_SETTINGS_WINDOWS: 'setup-args="--vsenv -Dstatic_xxhash=true"'
CIBW_TEST_ENVIRONMENT: "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 MPLBACKEND=Agg QT_QPA_PLATFORM=minimal"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_EXTRAS: extendedfilesupport,symmetry
CIBW_TEST_COMMAND: >-
python -c "from orgui.datautils.xrayutils import CTRuc;
assert CTRuc.HAS_CPP_ACCEL;
CTRuc.set_accel_backend('cpp');
print('CTR_ACCEL_BACKEND=', CTRuc.CTR_ACCEL_BACKEND)" &&
pytest --pyargs orgui.datautils.xrayutils.test.test_CTRcalc
orgui.datautils.xrayutils.test.test_CTRsymmetry
orgui.datautils.xrayutils.test.test_CTRresolution
orgui.datautils.xrayutils.test.test_CTRoptical_profile
orgui.datautils.xrayutils.test.test_scattering_factor_cache
CIBW_TEST_SKIP: "*-manylinux_aarch64"
with:
output-dir: wheelhouse
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ jobs:
run: python -m pip install --upgrade pip pytest

- name: Install package
run: python -m pip install ".[speedup]"
run: python -m pip install ".[speedup,extendedfilesupport,symmetry]"

- name: Run xrayutils tests
run: >-
pytest --pyargs
orgui.datautils.xrayutils.test.test_HKLcalc
orgui.datautils.xrayutils.test.test_DetectorCalibration
orgui.datautils.xrayutils.test.test_CTRcalc
orgui.datautils.xrayutils.test.test_CTRsymmetry
orgui.datautils.xrayutils.test.test_CTRresolution
orgui.datautils.xrayutils.test.test_CTRoptical_profile
orgui.datautils.xrayutils.test.test_scattering_factor_cache
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
__pycache__/
dist/
build/
subprojects/xxHash-0.8.2/
subprojects/.wraplock
orgui.egg-info/
orgui/_version.py
benchmarks/roi_sum_results.json
Expand Down
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,70 @@
This is the changelog for the software orGUI, written by Timo Fuchs


## [Unreleased] (2026-07-19)

Scientific and analysis additions:

- Added interface-based optical ``delta``/``beta`` profiles and layered
wavefield calculations for s- and p-polarized X-rays. Scalar and
multidimensional angle inputs are supported, and specular reflectivity can
be calculated for s, p, or unpolarized incidence. This provides the optical
wavefield foundation for future distorted-wave Born approximation (DWBA)
calculations; the full distorted-wave scattering amplitude is not included
yet.
- Added optional CTR intensity-resolution modeling with constant or
gamma-dependent box and Gaussian functions. Calculations can convolve
irregular existing L points or sample the crystal structure factor with
deterministic quadrature.
- Added Poisson-distributed surface occupancies and coherent out-of-plane
epitaxy/strain coupling for film-interface models.
- Added py3Dmol atom-sphere rendering for Jupyter notebooks. ``plot3d`` now
selects py3Dmol automatically in a notebook, can be directed to either
py3Dmol or Mayavi explicitly, and can incrementally add unit cells to a
shared viewer. Covalent radii are interpreted consistently by both backends
and can be adjusted with the dimensionless ``radius_scale`` parameter.
- ``PoissonSurface``'s basis now requires three parameters (``W``, ``alpha``,
``offset``) instead of two. The previous two-parameter form was only ever
used in test code, so no migration path is provided; a saved ``.xtal``/
``.xpr`` file with a two-parameter ``PoissonSurface`` basis will fail to
load.
- Wyckoff-parameterized fit values are now interpreted as absolute atomic
positions instead of deltas relative to the Wyckoff position. Wyckoff
parameter fitting was development-only and never part of a release, so no
migration is provided.

Scientific correctness and performance fixes:

- Optical profiles now preserve areal optical content under surface-normal
strain, keep ionic forward scattering factors for charged species, avoid
merging layers beyond the requested z tolerance, and remain finite at the
exact p-polarized critical-angle limit.
- Optical reflectivity and full wavefield calculations now evaluate angle
arrays with NumPy-vectorized kernels while preserving the caller's input
shape.
- Corrected film and epitaxy-interface anchoring, stacking, and support
ownership across strained interfaces.
- Fixed missing support in one-dimensional electron-density calculations and
corrected atomic-coordinate stacking when splitting unit cells into layers.
- Added a C++ electron-density backend and bounded caches for atomic form
factors, anomalous scattering factors, and accelerated form-factor lookup.

A ***critical bug*** was fixed that affects bulk CTR calculations:

- ``UnitCell.F_bulk``'s semi-infinite geometric lattice sum used the raw,
untransformed ``l`` index instead of the index converted by
``refHKLTransform`` when computing the out-of-plane attenuation phase. This
was only correct for the default case where a component uses its own bulk
cell as the reference (no ``reference_uc`` set); any explicit
``reference_uc`` whose out-of-plane reciprocal axis differs from the
bulk's — including a plain scale difference between the reference and bulk
out-of-plane axis length, not only a rotated or reindexed reference — gave
incorrect bulk structure-factor amplitudes. This bug was present in both
the accelerated (numba/C++) and plain-Python code paths in all previous
released versions, up to and including v1.5.0. See the CTR structure-factor
documentation for details.


## [1.5.0] (2026-06-07)

[532b60b](https://github.com/tifuchs/orGUI/commit/532b60bab3073ae9f0ff063a0e119aa9e9957857)...[c574bdf](https://github.com/tifuchs/orGUI/commit/c574bdf0bd5af6fa8258d108e7355c579bfef857)
Expand Down
29 changes: 29 additions & 0 deletions THIRD_PARTY_LICENSES/pybind11-BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>, All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Please also refer to the file .github/CONTRIBUTING.md, which clarifies licensing of
external contributions to this project including patches, pull requests, etc.
26 changes: 26 additions & 0 deletions THIRD_PARTY_LICENSES/xxHash-BSD-2-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
xxHash Library
Copyright (c) 2012-2021 Yann Collet
All rights reserved.

BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading