Ticket #4557 (closed: fixed)
express MD axis units as related to lattice vectors rather then momentum
Reported by: | Alex Buts | Owned by: | Alex Buts |
---|---|---|---|
Priority: | blocker | Milestone: | Release 2.0 |
Component: | VATES | Keywords: | |
Cc: | zikovskyjl@…, saviciat@…, campbellsi@… | Blocked By: | #4522 |
Blocking: | Tester: | Andrei Savici |
Description
When we can not agree if B-matrix should be used directly in the transformation into reciprocal coordinate system, (e.g to use reciprocal lattice coordinate system or notional coordinate system -- currently used by Mslice and Horace) we can of course normalize resulting image by reciprocal lattice parameters a*, b* c* (2p/a, 2p/b, 2p/c) as this is usually the natural scale of the process, occurring in the experiment.
This means converting momentum components and momentum constrains for QhQkQl mode of ConvertToMDEvents procedure into kind of "hkl" system of coordinates.
As soon as axis caption clearly say so, it can be done within the routine, defining the transformation matrix. This creates some inconsistency with axis untis but can be accepted as temporary measure.
In more general way it should be implemented within transformation into any target coordinate system but this can not be achieved for iteration 32.
Like in Mslice, I am intending to keep |Q| mode in units of momentum.
Change History
comment:3 Changed 9 years ago by Alex Buts
refs #4557 Enabled test needed for that
And hopefully fix it on Unix
Changeset: 667e688fd6bc38fe95a0b00d1eb5e61cb86e7ae2
comment:4 Changed 9 years ago by Alex Buts
refs #4557 This fixes it
Though couple of additional unit tests will be useful.
Changeset: 8e337fdf300ef462d42994e89dfffc2fa46a4f55
comment:5 Changed 9 years ago by Alex Buts
- Status changed from accepted to verify
- Resolution set to fixed
new boolean property introduced which enables this behaviour.
would be nice if python interface to slice viewer selects dimensions on the basis of their id-s and not axis names.
comment:6 Changed 9 years ago by Andrei Savici
- Status changed from verify to verifying
- Tester set to Andrei Savici
comment:7 Changed 9 years ago by Andrei Savici
- Status changed from verifying to reopened
- Resolution fixed deleted
Something is very wrong. It's even worst than it was before. In our test script, I tried
SetUB(Workspace='CNCS_7860_event',a='10.4165',b='3.4165',c='10.4165',u='1,0,0',v='0,0,1')
and
ConvertToMDEvents(InputWorkspace='preMDpart'+str(i),OutputWorkspace='MDpart'+str(i),QDimensions='QhQkQl',QinHKL=False,dEAnalysisMode='Direct',MinValues='-2,-2,-3,-1',MaxValues='2,2,3,3',SplitInto="20,20,20,1")
The U matrix transforms in such a way that the first Q component is along h, the second along k, the third along l, not 1st along u, second along v. If you want that, the description of the transformation is in the UB matrix document.
Here is a quick sanity check: The arcs should meet at 0, when plotted with
ps=plotSlice("MD", xydim=[0,2], slicepoint=[0,0] )
in such a way that the arcs are perpendicular to the component along the beam direction
comment:8 Changed 9 years ago by Alex Buts
This is what generated by getUmatrix procedure on Oriented lattice in case of uv specified in the example.
I am going to compare results from Umatrix with Mslice and dropping all suspicious permutations out of there (which includes returning the matrix multiplications on ConvertToMDEvents methods to its initial form.
comment:9 Changed 9 years ago by Alex Buts
refs #4557 Some unit/sanity test for orientation matrix
Changeset: edb58c4a4159f8f3d75d6c25b13d1739f0abc3eb
comment:10 Changed 9 years ago by Alex Buts
refs #4557 Returned to previous behaviour if Q units are selected.
Changeset: 80da26b2b75e1dccf6a217ec534d4a913378199f
comment:11 Changed 9 years ago by Alex Buts
refs #4557 Fixing failing unit test
Changeset: 8369b27cd3b42de177e7014839a68e10d396356e
comment:12 Changed 9 years ago by Alex Buts
refs #4557 It seems sort things out
Changeset: 11ae6ce2f701203dafce5c9f66e9e4662f1855a9
comment:13 Changed 9 years ago by Alex Buts
refs #4557 Fixing unit test
Changeset: 242a86fe5b17a920575a0801032f7d7ca2d486b4
comment:14 Changed 9 years ago by Alex Buts
It seems sorts thing out as the script below (with possible modifications doing QinHKL) produces result, which looks very similar to Mslice.
WS_Name = 'CNCS_7860_event' Load(Filename='CNCS_7860_event.nxs',OutputWorkspace=WS_Name ) #ConvertUnits(InputWorkspace=WS_Name,OutputWorkspace=WS_Name,Target='DeltaE',EMode='Direct',EFixed='3') #Rebin(InputWorkspace=WS_Name,OutputWorkspace=WS_Name,Params='-1,0.05,3',PreserveEvents=True) #SaveNXSPE(InputWorkspace=WS_Name,Filename='d:/Data/Slicer/'+WS_Name+'.nxspe',Efixed=3,Psi=0) AddSampleLog(Workspace=WS_Name,LogName='Ei',LogText='3',LogType='Number') MD_Name='MD1' SetUB(Workspace=WS_Name,a='10.4165',b='3.4165',c='10.4165',u='1,0,0',v='0,1,0') ConvertToMDEvents(InputWorkspace=WS_Name,OutputWorkspace=MD_Name,QDimensions='QhQkQl',QinHKL=False,dEAnalysisMode='Direct',MinValues='-2,-2,-3,-1',MaxValues='2,2,3,3',SplitInto="20,20,20,1") ps=plotSlice(MD_Name, xydim=["Q1","Q2"], slicepoint=[0,0] ) MD_Name='MD2' SetUB(Workspace=WS_Name,a='10.4165',b='3.4165',c='10.4165',u='1,0,0',v='0,0,1') ConvertToMDEvents(InputWorkspace=WS_Name,OutputWorkspace=MD_Name,QDimensions='QhQkQl',QinHKL=False,dEAnalysisMode='Direct',MinValues='-2,-2,-3,-1',MaxValues='2,2,3,3',SplitInto="20,20,20,1") ps=plotSlice(MD_Name, xydim=["Q1","Q3"], slicepoint=[0,0] ) MD_Name='MD3' SetUB(Workspace=WS_Name,a='10.4165',b='3.4165',c='10.4165',u='0,1,0',v='0,0,1') ConvertToMDEvents(InputWorkspace=WS_Name,OutputWorkspace=MD_Name,QDimensions='QhQkQl',QinHKL=False,dEAnalysisMode='Direct',MinValues='-2,-2,-3,-1',MaxValues='2,2,3,3',SplitInto="20,20,20,1") ps=plotSlice(MD_Name, xydim=["Q2","Q3"], slicepoint=[0,0] )
comment:16 Changed 9 years ago by Alex Buts
- Status changed from accepted to verify
- Resolution set to fixed
comment:18 Changed 9 years ago by Andrei Savici
- Status changed from verifying to closed
Seems to be working as described
comment:19 Changed 9 years ago by Alex Buts
refs #4557 uv was set to any cut when specified in ConvertToMDEvents
Changeset: 6516ddf8405f31b790d29ede63e05622f6c25477
comment:20 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 5404