Skip to content

fix(phys): accumulate epitaxy strain per layer - #68

Merged
tifuchs merged 1 commit into
masterfrom
fix-ctr-interface-layer-accumulation
Jul 30, 2026
Merged

fix(phys): accumulate epitaxy strain per layer#68
tifuchs merged 1 commit into
masterfrom
fix-ctr-interface-layer-accumulation

Conversation

@tifuchs

@tifuchs tifuchs commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

This fixes artificial quasi-Bragg intensity generated by broad, strain-coupled EpitaxyInterface profiles.
Previously, the interface calculated a strain for every structural layer but advanced each complete unit-cell cycle using only the final layer’s strain. For multi-layer cells, this introduced a displacement modulation with the layer-cycle period, leaking intensity into systematic extinctions and anti-Bragg positions.
The interface now:
Calculates the occupancy-weighted physical height of every structural layer.
Accumulates interface positions layer by layer.
Handles the upper and lower materials’ layer spacings independently.
Preserves the existing strain-coupling and bulk-anchoring conventions.
Regression coverage includes an analytic layer-origin test and a RuO₂/TiO₂ CTR test that reproduces the original quasi-Bragg artifact.

Validation

pytest orgui/datautils/xrayutils/test/test_CTRcalc.py: 109 passed, 4 skipped
pytest orgui/datautils/xrayutils/test/test_CTRoptical_profile.py: 28 passed
ruff check orgui/datautils/xrayutils: passed
RuO₂/TiO₂ anti-Bragg amplitude reduced from approximately 0.124 to 0.0101.
FeReO₄/TiO₂ anti-Bragg amplitude reduced from approximately 1.073 to 0.0637.

@tifuchs
tifuchs merged commit eeedc01 into master Jul 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant