Skip to content

Introduce per-phase sample-detector displacement with flat detector#73

Open
clemisch wants to merge 3 commits into
vincefn:masterfrom
clemisch:phase_displace_ratio
Open

Introduce per-phase sample-detector displacement with flat detector#73
clemisch wants to merge 3 commits into
vincefn:masterfrom
clemisch:phase_displace_ratio

Conversation

@clemisch
Copy link
Copy Markdown
Contributor

@clemisch clemisch commented Apr 30, 2026

Introduces model for sample-detector displacement, assuming transmission geometry and a flat detector as presented in Hulbert2023.

Unlike other displacements (m2ThetaDisplacement, m2ThetaTransparency) which act only on the whole PowderPattern (i.e. all phases), this new displacement can act also per-phase. In each PowderPatternDiffraction it combines per-sample and per-phase displacement and computes resulting 2θ shift from it.

m2ThetaFlatDetDispRatio is the sample displacement, and m2ThetaPhaseFlatDetDispRatio is the per-phase displacement.

GSAS-II has something similar called LayerDisp here which allows per-phase offsets. Afaik it's currently undocumented.

Before, PowderPattern calculated delta from its displacement, and phase
calculated delta from per-phase displacement, then the deltas were added.

Physically this doesn't make sense. Displacements should be added and
delta computed from combined (physical) displacement.

This is implemented in this commit.
after last commit the function CalcFlatDetDispShift had only one call site
so we might as well inline it
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