Ticket #6753 (closed: fixed)
Create a CalculatePeakHKL algorithm
Reported by: | Nick Draper | Owned by: | Owen Arnold |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.5 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #6754 | Tester: | Andrei Savici |
Description
This will take a peak workspace with a valid UB matrix and calculate HKL values for all peaks.
Options:
- Bool Overwrite exsitng values
- Bool Allow fractional peaks
Change History
comment:3 Changed 8 years ago by Owen Arnold
We should just be able to take peak positions QLab and convert to HKL using the UB matrix. We will not perform any truncation. All peaks will be indexed in this manner.
comment:4 Changed 8 years ago by Owen Arnold
It might be possible to do this without creating a new algorithm. IndexPeaks has a property called RoundHKL, if set to False, it should provide non-integer HKL values...I'll need to try this out.
comment:5 Changed 8 years ago by Owen Arnold
We'll need to do this as a separate algorithm, because we don't want to optimise the UBmatrix as part of the indexing, and IndexPeaks always tries this optimisation. However, we should use the utilities used in Index Peaks, namely those from MantidGeometry/Crystal/IndexingUtils.h
comment:6 Changed 8 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:7 Changed 8 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:8 Changed 8 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:9 Changed 8 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:10 Changed 8 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:11 Changed 8 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:12 Changed 8 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:13 Changed 8 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:14 Changed 8 years ago by Owen Arnold
Tester: The following compares results of peak indexing using this new algorithm against IndexPeaks. Note that CalculatePeaksHKL does not perform any UB optimisation, unlike IndexPeaks. This is why IndexPeaks is run first in the script below (before the workspace (sample included) is cloned.
However, running the following, you should find that the Miller indices calculated via each algorithm (above) give the same results within the default tolerance. The script below does this. The data file is in the system test data directory.
ws = "TOPAZ_3132" filename = ws+"_event.nxs" LoadEventNexus(Filename=filename,OutputWorkspace=ws,FilterByTofMin='3000',FilterByTofMax='16000') # Convert to Q space ConvertToDiffractionMDWorkspace(InputWorkspace=ws,OutputWorkspace=ws+'_MD2',LorentzCorrection='0', OutputDimensions='Q (lab frame)', SplitInto='2',SplitThreshold='150') # Find peaks FindPeaksMD(InputWorkspace=ws+'_MD2',MaxPeaks='100',OutputWorkspace=ws+'_peaksLattice') # 3d integration to centroid peaks CentroidPeaksMD(InputWorkspace=ws+'_MD2',CoordinatesToUse='Q (lab frame)', PeakRadius='0.12',PeaksWorkspace=ws+'_peaksLattice',OutputWorkspace=ws+'_peaksLattice') # Find the UB matrix using the peaks and known lattice parameters FindUBUsingLatticeParameters(PeaksWorkspace=ws+'_peaksLattice',a='10.3522',b='6.0768',c='4.7276', alpha='90',beta='90',gamma='90', NumInitial='20', Tolerance='0.12') # And index to HKL IndexPeaks(PeaksWorkspace=ws+'_peaksLattice', Tolerance='0.12', RoundHKLs=False) cloned = CloneWorkspace(InputWorkspace=ws+'_peaksLattice') CalculatePeaksHKL(PeaksWorkspace=cloned, OverWrite=True) Diff = DiffPeaksWorkspaces(LHSWorkspace = ws+'_peaksLattice', RHSWorkspace=cloned) # -- Should print zero Rows -- # print Diff.rowCount()
Tester: Also, if this ticket passes, please inform the owner of #6754 that work can commence on this ticket.
comment:15 Changed 8 years ago by Owen Arnold
- Status changed from accepted to verify
- Resolution set to fixed
comment:16 Changed 8 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:17 Changed 8 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:18 Changed 8 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:19 Changed 8 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:20 Changed 8 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:21 Changed 8 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:22 Changed 8 years ago by Andrei Savici
- Status changed from verify to verifying
- Tester set to Andrei Savici
comment:23 Changed 8 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:24 Changed 8 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:25 Changed 8 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:26 Changed 8 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:27 Changed 8 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:28 Changed 8 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:29 Changed 8 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:31 Changed 8 years ago by Andrei Savici
Works as described. But for the proposed test, IndexPeaks does not perform optimization either. That happens only when peaks come from multiple runs
comment:32 Changed 8 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:33 Changed 8 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:34 Changed 8 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:35 Changed 8 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:36 Changed 8 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:37 Changed 8 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:38 Changed 8 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:39 Changed 8 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:40 Changed 8 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:41 Changed 8 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:42 Changed 8 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:43 Changed 8 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:44 Changed 8 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:45 Changed 8 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:46 Changed 7 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:47 Changed 7 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:48 Changed 7 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:49 Changed 7 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:50 Changed 7 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:51 Changed 7 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:52 Changed 7 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:53 Changed 7 years ago by Owen Arnold
refs #6753. Alg prototype.
Changeset: a86e736c87b6cfb705c728ed75597984d0669bf5
comment:54 Changed 7 years ago by Owen Arnold
refs #6753. Index peaks.
Changeset: 99de9255e7be3413320991937a7c9861b015b466
comment:55 Changed 7 years ago by Owen Arnold
refs #6753. Calculation corrections.
Changeset: 00db11fe1c29e45cbe4e500ebd06171fae5957b0
comment:56 Changed 7 years ago by Owen Arnold
refs #6753. Signature changed.
Changeset: 68aeef56eddd140d36cd849648b981898889b3e2
comment:57 Changed 7 years ago by Owen Arnold
refs #6753. Fix warnings.
Changeset: e19f4a61a852958e3594f2a0391b57834a82a8e1
comment:58 Changed 7 years ago by Owen Arnold
refs #6753. Fix warning.
Changeset: e1e1260f808431696c5b1f4e3a4269ca27cf0a09
comment:59 Changed 7 years ago by Owen Arnold
refs #6753. Wiki docs.
Changeset: fa65446e734c508d0e9244ab259d5987b8354381
comment:60 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7599