Ticket #3991 (closed: fixed)
OrientedLattice: set U matrix using u,v vectors
Reported by: | Janik Zikovsky | Owned by: | Andrei Savici |
---|---|---|---|
Priority: | major | Milestone: | Release 2.0 |
Component: | Mantid | Keywords: | |
Cc: | owen.arnold@…, 8oz@… | Blocked By: | |
Blocking: | Tester: | Jose Borreguero |
Description
Using the u,v vectors in the instrument plane as defined in: http://horace.isis.rl.ac.uk/Getting_started
(u along the beam, psi = 0 )
define the U matrix in a OrientedLattice that has had its B matrix set previously.
Also, add a method that will return the u,v vectors from the U matrix currently in the OrientedLattice object.
The u and v vectors should not need to be stored in the object.
Change History
comment:2 Changed 9 years ago by Andrei Savici
Still needs tests and wiki. Refs #3991.
Changeset: 83fece3eb3338732f5e6143a8ad869b3ee072e1e
comment:3 Changed 9 years ago by Andrei Savici
Wiki and tests for SetUB. Cleaned up OrientedLattice. Refs #3991
Changeset: 2c1784b26e7988b4b758b968b2bce0408c69776b
comment:4 Changed 9 years ago by Andrei Savici
Modified OrientedLattice to return u and v. Refs #3991
Changeset: 0401009ff8d715c84f6641b8aa4a4f969fe5be36
comment:5 Changed 9 years ago by Andrei Savici
Some extra python bindings for OrientedLattice. Refs #3991
The setUFromVectors accepts only numpy arrays. It would be better if there were V3Ds instead
Changeset: 191de0352d79ca67d26ad4f2c73e4982dd9d482a
comment:6 Changed 9 years ago by Andrei Savici
setUFromVectors now works with lists, V3D or numpy arrays. Refs #3991
Changeset: 98bfe9d98d6241d330243cf4d758a64befc294ed
comment:7 Changed 9 years ago by Andrei Savici
- Status changed from accepted to verify
- Resolution set to fixed
How to test SetUB:
- Load a workspace w
- Run SetUB. Put some reasonable values
- At the python console
w=mtd[ "w " ] s=w.getSample() o=s.getOrientedLattice() print o.getU() print o.a()
How to test u and v:
At the python console
o=OrientedLattice() set some UB matrix with o.setUB(...) print o.getuVector() print o.getvVector()
Alternatively:
o=OrientedLattice(2,2,2) o.setUFromVectors([1,1,0],V3D(1,-1,0)) print o.getuVector() print o.getvVector()
Make sure that multiplying the UB matrix with the u vector results a vector along z Note that setUFromVectors can accept length 3 lists, length 3 numpy arrays, or V3Ds (or any combination of them)
comment:8 Changed 9 years ago by Jose Borreguero
- Status changed from verify to verifying
- Tester set to Jose Borreguero
comment:10 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 4838