Update UB matrix if IndexPeaks called with CommonUBForAll=False and table contains only peaks from one run #38964
Labels
Diffraction
Issues and pull requests related to diffraction
ISIS Team: Diffraction
Issue and pull requests managed by the Diffraction subteam at ISIS
Single Crystal
Issues and pull requests related to single crystal
Milestone
Is your feature request related to a problem? Please describe.
If a peak table contains only peaks from a single run then
IndexPeaks
called withCommonUBForAll=False
will optimise the UB but this won't be stored on the workspacemantid/Framework/Crystal/src/IndexPeaks.cpp
Lines 503 to 506 in 56f61ef
Describe the solution you'd like
Update UB matrix if
IndexPeaks
called withCommonUBForAll=False
and table contains only peaks from one run - in this way ifRoundHKLs=False
peak.getQSampleFrame() = 2*np.pi*peaks.sample().getOrientedLattice().getUB() @ peak.getHKL()
Perhaps for backwards compatibility would require an additional parameter e.g.
UpdateUB = False
- but it's difficult as this only applies to some peak tables (with peaks from 1 run).Describe alternatives you've considered
Can call
CalculateUMatrix
with indexed peaks and observed lattice parameters, this does seem to produce better results sometimes than e.g.FindUBUsingLatticeParameters
.OptimizeCrystalPlacement
also often seems to find goniometer offsets that improve the accuracy of the UB.Additional context
How to treat tables with peaks from multiple runs? Could update the goniometer matrix for peaks from the same run such that
R_old * UB_new = R_new * UB_old
?Not sure this is intuitive/desired behaviour, though it might help with calibrating goniometer angles, axes and offsets
The text was updated successfully, but these errors were encountered: