Ticket #3205 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Add low-level method to find the UB matrix given a list of peaks and the lattice parameters.

Reported by: Dennis Mikkelson Owned by: Dennis Mikkelson
Priority: major Milestone: Iteration 30
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description

Given a list of peak positions and the lattice parameters, find the UB matrix that best indexes the peaks, without changing any of the lattice parameters. If the lattice parameters can be adjusted to better match the data, the BestFit_UB method can be used once the peaks are indexed by the UB matrix returned by this method.

Change History

comment:1 Changed 9 years ago by Dennis Mikkelson

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Dennis Mikkelson

(In [12675]) Added method to check for a valid index. Added tests for NumberIndexed() and ValidIndex() methods. refs #3205

comment:3 Changed 9 years ago by Dennis Mikkelson

(In [12704]) Added method to generate list of direction vectors, uniformly distributed over the y>0 hemisphere. This will be used for finding reciprocal space plane normal directions that have specified spacing. refs #3205

comment:4 Changed 9 years ago by Dennis Mikkelson

(In [12731]) Added method BestFit_Direction that will find the direction, in a list of directions, that most nearly corresponds to plane normals in reciprocal space, for a specified plane spacing. refs #3205

comment:5 Changed 9 years ago by Dennis Mikkelson

(In [12755]) Changed name of earlier BestFit_Direction() to SelectDirection(), since that more accurately describes it's action of selecting the best vector from a list. Added new method BestFit_Direction() that uses QR factorization to optimize the direction and length of the plane normal to a family of planes in reciprocal space, given a list of Qxyz vectors and one of the Miller indices for those vectors. refs #3205

comment:6 Changed 9 years ago by Dennis Mikkelson

(In [12768]) Added method to generate a list containing the circle of vectors that all form a specified angle with a specified axis vector. This method will be used to find the family of planes in the reciprocal lattice corresponding to a second unit cell basis vector. refs #3205

comment:7 Changed 9 years ago by Dennis Mikkelson

(In [12836]) Added methods GetIndexedPeaks_1D() and GetIndexedPeaks_3D() to indexing utils. Added tests for methods: BestFit_Direction(), GetIndexedPeaks_1D() GetIndexedPeaks_3D() and SelectDirection(), so all methods now have tests. refs #3205

comment:8 Changed 9 years ago by Dennis Mikkelson

(In [12842]) Added method BestFit_UB() that finds the UB matrix given lattice parameters and a list of Q vectors. Added test for this method as well. refs #3205

comment:9 Changed 9 years ago by Dennis Mikkelson

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:10 Changed 9 years ago by Dennis Mikkelson

  • Status changed from verify to reopened
  • Resolution fixed deleted
  • Milestone changed from Iteration 29 to Iteration 30

While the key method for finding a UB given lattice parameters currently works, it is very sensitive to the accuracy of the lattice parameters. Further improvements to this are need so that it is more robust with real data. For example, it may help to first index peaks at lower Q then gradually extend the peaks being indexed to include higher Q peaks.

comment:11 Changed 9 years ago by Dennis Mikkelson

(In [12985]) Cleaned up test code by putting code that gets a vector of Q's for testing into static method. refs #3205

comment:12 Changed 9 years ago by Dennis Mikkelson

(In [12990]) Added method GetIndexedPeaks() that takes a UB matrix instead of one or three direction vectors. Added test for this method. refs #3205

comment:13 Changed 9 years ago by Dennis Mikkelson

(In [12991]) Removed package specifier Kernel from Kernel::DblMatrix. For some reason this does not build on Win7, but does on Linux? refs #3205

comment:14 Changed 9 years ago by Dennis Mikkelson

(In [13003]) Added method Make_c_dir() to calculate the third edge vector of a rotated unit cell, given the other two rotated edge vectors, the length of side "c" and the cell angles. refs #3205

comment:15 Changed 9 years ago by Dennis Mikkelson

(In [13006]) Added method ScanFor_UB() that makes an initial scan across a large set of rotations to identify a UB that indexes the peaks. refs #3205

comment:16 Changed 9 years ago by Dennis Mikkelson

(In [13037]) Added a fairly robust method Find_UB(), that first searches a huge list of possible orientations to find a UB that indexes a small subset of low magnitude Q vectors. It then does a least squares refinement on the UB, and gradually increases the number of peaks to be indexed by adding Q vectors with increasing |Q|, doing a least squares refinement at each step. The number of low |Q| peaks to be initially indexed and the distance between possible orientations are controlled by parameters. refs #3205

comment:17 Changed 9 years ago by Dennis Mikkelson

(In [13050]) Find_UB() given lattice parameters now properly adds Q vectors from the sorted list, rather than from the original list. refs #3205

comment:18 Changed 9 years ago by Dennis Mikkelson

In [13295]:

Fix minor error in documentation comment.
refs #3205

comment:19 Changed 9 years ago by Dennis Mikkelson

In [13492]:

Removed older method for finding UB given lattice
parameters. The newer method is more robust.
refs #3205

comment:20 Changed 9 years ago by Dennis Mikkelson

In [13792]:

Added option to shift list of peaks indexed to
be centered around a specified peak.
refs #3205

comment:21 Changed 9 years ago by Dennis Mikkelson

In [13924]:

Added sort of list of Q's in all cases to Find_UB given
lattice parameters.
Updated test to test both cases: where default base_index
is used and where base_index specifies an actual peak.
refs #3205

comment:22 Changed 9 years ago by Dennis Mikkelson

In [13925]:

Renamed the Find_UB method that took indexed peaks
to Optimize_UB, and Find_Direction to Optimize_Direction
to more accurately reflect the use of these methods.
refs #3205

comment:23 Changed 9 years ago by Dennis Mikkelson

  • Status changed from reopened to accepted

comment:24 Changed 9 years ago by Dennis Mikkelson

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:25 Changed 9 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:26 Changed 9 years ago by Janik Zikovsky

  • Status changed from verifying to closed

Have used these (indirectly) with the FindUBUsingLatticeParameters algo.

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4052

Note: See TracTickets for help on using tickets.