Ticket #10055 (closed: worksforme)
SaveNexus does not stores/reloads a workspace created by SofQW3
Reported by: | Alex Buts | Owned by: | Michael Reuter |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Alex Buts |
Description (last modified by Alex Buts) (diff)
Run script below from the folder where the test file resides twice. (you need Mantid 3.1 or nightly to do that, Mantid 3.2 will fail)
################################################## ## Visualize 2D Matrix workspace ## ################################################## root=os.path.dirname(os.path.realpath(__file__)) config.appendDataSearchDir(root) config['defaultsave.directory']=root # Load source file rez_file = FileFinder.getFullPath('MAP05935MD.nxs') if len(rez_file) == 0: Load(Filename='MAP05935_4to1_033.nxspe', OutputWorkspace='MAP05935', LoaderName='LoadNXSPE', LoaderVersion=1) # Got Matrix workspace SofQW3(InputWorkspace='MAP05935', OutputWorkspace='MAP05935MD', QAxisBinning='0,0.02,3', EMode='Direct') SaveNexus(InputWorkspace='MAP05935', Filename='MAP05935MD.nxs') else: Load(Filename=rez_file, OutputWorkspace='MAP05935MD', LoaderName='LoadNexusProcessed', LoaderVersion=1) #Show the result as described at http://www.mantidproject.org/SliceViewer_Python_Interface #plotSlice('MAP05935MD') # Got 1D slice Rebin2D(InputWorkspace='MAP05935MD', OutputWorkspace='MAP05935MD_line',\ Axis1Binning='-2.02692,0.187385,16.7115', Axis2Binning='1.26,0.102857,1.36286', UseFractionalArea=True)
First time it works fine while second time it fails on Rebin and workspace itself looks ugly.
The test file referred by the script with the whole script version can be found on ftp://ftp.nd.rl.ac.uk/scratch/abuts/Ticket_10055 but actually any inelastic direct mode nxspe file should do.
The problem is incorrect saving/loading of the binning data
Change History
comment:7 Changed 6 years ago by Michael Reuter
- Status changed from inprogress to verify
- Resolution set to worksforme
Your script has an error in it. The SaveNexus call should be:
SaveNexus(InputWorkspace='MAP05935MD', Filename='MAP05935MD.nxs')
otherwise you are just saving the NXSPE data and not the SQW data. The NXSPE data won't work in Rebin2D well. :-) With the script fixed, redoing the Rebin2D over and over shows the same plot.
comment:8 Changed 6 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:9 Changed 6 years ago by Alex Buts
Correct resolution, so I am removing testing files from the ftp server
comment:10 Changed 6 years ago by Karl Palmen
- Status changed from verifying to verify
- Tester Karl Palmen deleted
comment:11 Changed 6 years ago by Alex Buts
- Status changed from verify to verifying
- Tester set to Alex Buts
comment:13 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10897