Ticket #8992 (closed: fixed)
LineCuts units
Reported by: | Owen Arnold | Owned by: | Owen Arnold |
---|---|---|---|
Priority: | blocker | Milestone: | Release 3.1.1 |
Component: | Framework | Keywords: | CORE PatchCandidate |
Cc: | Blocked By: | #9009 | |
Blocking: | #9046 | Tester: | Karl Palmen |
Description (last modified by Owen Arnold) (diff)
In most cases, MD line cuts should have axes and units reported w.r.t their origin workspace. I generated a work around for this issue here #8104, but there should be a good way to access this information on the generated MDWorkspaces.
The following script illustrates the problem. The generated plot lines should completely overlap.
CreateMDWorkspace(Dimensions='2',EventType='MDEvent',Extents='-10,10,-10,10',Names='Q_lab_x,Q_lab_y',Units='A,B',OutputWorkspace='test') FakeMDEventData(InputWorkspace='test',UniformParams='1000',PeakParams='100000,0,0,1') line_md = BinMD(InputWorkspace='test',AxisAligned='0',BasisVector0='X,units,0.888154,0.459545',BasisVector1='Y,units,-0.459545,0.888154',Translation='-4.93562,-2.3918',OutputExtents='0,9.61632,-0.1,0.1',OutputBins='100,1') save_path = "/Users/spu92482/Desktop/line_md.nxs" SaveMD(Filename=save_path, InputWorkspace=line_md) reloaded_line_md = LoadMD(Filename=save_path) plotMD([line_md, reloaded_line_md]) # Should be the same!!!!
Change History
comment:3 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state
comment:5 Changed 7 years ago by Owen Arnold
After some initial investigation, there seems to be two problems here:
1) The is no original workspace if reloaded, so picking up the transformations from the original workspace, (even though they do exist) is skipped.
2) The MD nexus format does not save multiple transformations (treat under a separate ticket).
comment:6 Changed 7 years ago by Owen Arnold
Tester:
Run the script in the description, and check that the plots line-up.
Then run this at the end of the script above and check that the outputs match the comments.
print "These should be different" print line_md.numOriginalWorkspaces(), reloaded_line_md.numOriginalWorkspaces() print "But these should be the same" print line_md.getNumberTransformsToOriginal(), reloaded_line_md.getNumberTransformsToOriginal()
comment:7 Changed 7 years ago by Owen Arnold
- Status changed from assigned to inprogress
refs #8992. Utilise coord trans to original.
This has been prevented thus far, because use of coord transforms has been based on the presence of original workspaces. Original workspaces will not be present upon a reload.
I've also exposed the new getters on MDGeometry to python.
Changeset: e4253729ec04765d7930be6b5fbe90a72824cb80
comment:8 follow-up: ↓ 12 Changed 7 years ago by Owen Arnold
The next steps here are to merge in master after #9009 is complete, and change ConvertToMDHistoWorkspace so that uses the new getters added to MDGeometry rather than relying on the number of workspaces to be set.
comment:10 Changed 7 years ago by Owen Arnold
- Keywords CORE added
This is a core change owing to the fact that MDGeometry has been extended.
comment:11 Changed 7 years ago by Owen Arnold
refs #8992. Use number of transformations to original.
ConvertMDHistoToMatrixWorkspace should not count original workspaces. I've also refactored this code so that I'm not having to work with raw pointers.
Changeset: b65e6140d90ae3a9e40e3250717f235fe216c778
comment:12 in reply to: ↑ 8 Changed 7 years ago by Owen Arnold
Replying to Owen Arnold:
The next steps here are to merge in master after #9009 is complete, and change ConvertToMDHistoWorkspace so that uses the new getters added to MDGeometry rather than relying on the number of workspaces to be set.
Done
comment:13 Changed 7 years ago by Owen Arnold
Pending checkbuild develop branch is broken.
comment:14 Changed 7 years ago by Owen Arnold
- Status changed from inprogress to verify
- Resolution set to fixed
comment:15 Changed 7 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:16 Changed 7 years ago by Karl Palmen
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/8992_coord_trans_loading'
Full changeset: 62d7cf70e9160c90a29f7eac36b259cde0f71420
comment:17 Changed 7 years ago by Owen Arnold
- Keywords PatchCandidate added
I think this is possibly a patch candidate, and I'm going to mark it up as such.
comment:18 Changed 7 years ago by Owen Arnold
comment:19 Changed 7 years ago by Nick Draper
- Milestone changed from Release 3.2 to Release 3.1.1
Moved to patch release 3.1.1
comment:20 Changed 7 years ago by Owen Arnold
refs #8992. Problem fixed.
Although, I'd like to do some more refactoring to neaten things up before hand.
Changeset: e6789be8c3fa014b13bf43f5c321dadcf34fd4f7
comment:21 follow-up: ↓ 22 Changed 7 years ago by Russell Taylor
What's the story with the commit in comment:20? The ticket has been tested and merged to master, but now this new commit has popped up on a branch with the same name as the merged one (but not the same branch).
comment:22 in reply to: ↑ 21 Changed 7 years ago by Owen Arnold
Replying to Russell Taylor:
What's the story with the commit in comment:20? The ticket has been tested and merged to master, but now this new commit has popped up on a branch with the same name as the merged one (but not the same branch).
My mistake. Entered the wrong ticket number. That commit should have gone against #8376. This commit has nothing to do with this ticket.
comment:23 Changed 7 years ago by Owen Arnold
refs #8992. Utilise coord trans to original.
This has been prevented thus far, because use of coord transforms has been based on the presence of original workspaces. Original workspaces will not be present upon a reload.
I've also exposed the new getters on MDGeometry to python.
Changeset: 892641698fbb0348afe3df85ab766af2a399ca00
comment:24 Changed 7 years ago by Owen Arnold
refs #8992. Use number of transformations to original.
ConvertMDHistoToMatrixWorkspace should not count original workspaces. I've also refactored this code so that I'm not having to work with raw pointers.
Changeset: 7e538b154c98d583e3e8899adc66299e5659d79f
comment:25 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9835