Introduce per-phase sample-detector displacement with flat detector#73
Introduce per-phase sample-detector displacement with flat detector#73clemisch wants to merge 3 commits into
Conversation
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
|
I did notice a wrinkle which originates from allowing displacement on both sample and phase and combining them inside the phase: I have a non-zero This is confusing but by design: we can't compute 2θ shifts from sample and phase displacement independently and then combine them, because they don't combine linearly. We have to compute the effective displacement sample+phase and then compute 2θ shifts. And that we can only do in For refinement this is no problem because it happens behind the scenes. But it makes manual computation like above more complicated. See e.g. https://gitlab.esrf.fr/cschmid/xrdmap/-/commit/a806b05049ff2931719babff0b6b8fcabf810cac. I still want to have per-phase offsets, but I can see this confusion is a strong argument against it. |
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 eachPowderPatternDiffractionit combines per-sample and per-phase displacement and computes resulting 2θ shift from it.m2ThetaFlatDetDispRatiois the sample displacement, andm2ThetaPhaseFlatDetDispRatiois the per-phase displacement.GSAS-II has something similar called
LayerDisphere which allows per-phase offsets. Afaik it's currently undocumented.