diff --git a/docs/source/algorithms/OptimizeCrystalPlacementByRun-v1.rst b/docs/source/algorithms/OptimizeCrystalPlacementByRun-v1.rst new file mode 100644 index 0000000000000000000000000000000000000000..758e4c699cbc0ffd59b44ee0c1d41b3f669e54a1 --- /dev/null +++ b/docs/source/algorithms/OptimizeCrystalPlacementByRun-v1.rst @@ -0,0 +1,45 @@ +.. algorithm:: + +.. summary:: + +.. relatedalgorithms:: + +.. properties:: + +Description +----------- + +This algorithm basically optimizes h,k, and l offsets from an integer by +varying the parameters sample positions for each run in the peaks workspace. + +The crystal orientation matrix, :ref:`UB matrix <Lattice>`, from the +PeaksWorkspace should index all the runs "very well". Otherwise iterations +that slowly build a :ref:`UB matrix <Lattice>` with corrected sample +orientations may be needed. + + +Usage +----- + +**Example:** + +.. testcode:: ExOptimizeCrystalPlacementByRun + + ws=LoadIsawPeaks("calibrated.peaks") + FindUBUsingFFT(PeaksWorkspace=ws,MinD=2,MaxD=20,Tolerance=0.12) + IndexPeaks(PeaksWorkspace='ws',Tolerance=0.12) + wsd = OptimizeCrystalPlacementByRun(InputWorkspace=ws,OutputWorkspace='wsd',Tolerance=0.12) + print('Optimized %s sample position: %s'%(mtd['wsd'].getPeak(0).getRunNumber(),mtd['wsd'].getPeak(0).getSamplePos())) + print('Optimized %s sample position: %s'%(mtd['wsd'].getPeak(8).getRunNumber(),mtd['wsd'].getPeak(8).getSamplePos())) + +Output: + +.. testoutput:: ExOptimizeCrystalPlacementByRun + + Optimized 71907 sample position: [-0.000678629,-2.16033e-05,0.00493278] + Optimized 72007 sample position: [-0.0027929,-0.00105681,0.00497094] + + +.. categories:: + +.. sourcelink:: diff --git a/docs/source/release/v3.14.0/diffraction.rst b/docs/source/release/v3.14.0/diffraction.rst index a45853b397cceee8d9e91e21df9978f6e89688e7..0db6bbf8caf1099b9ef9c4b33f842ed6eae2697a 100644 --- a/docs/source/release/v3.14.0/diffraction.rst +++ b/docs/source/release/v3.14.0/diffraction.rst @@ -43,7 +43,7 @@ Improvements - :ref:`IntegratePeaksUsingClusters <algm-IntegratePeaksUsingClusters>` will now treat NaN's as background. - SCD Event Data Reduction Diffraction Interface now adds goniometer for CORELLI and used proton charge as monitor count if no monitors are in input file. - :ref:`SetCrystalLocation <algm-SetCrystalLocation>` is a new algorithm to set the sample location in events workspaces. -- :ref:`OptimizeCrystalPlacementByRUn <algm-OptimizeCrystalPlacementByRUn>` is new algorithm to update the sample position for each run in a peaks workspace. +- :ref:`OptimizeCrystalPlacementByRun <algm-OptimizeCrystalPlacementByRun>` is new algorithm to update the sample position for each run in a peaks workspace. Bugfixes ########