mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
210 stars 122 forks source link

ConvertToMD not working #16422

Closed AndreiSavici closed 7 years ago

AndreiSavici commented 8 years ago

Expected behavior

I am trying to create an MD workspace, where I just copy the X axis of the input workspace. If I start from an event workspace, I expect the number of MDEvents to be the same as the number of neutron events. If I start from a Workspace2D, the number of MDEvents should be equal to the number of non-masked spectra multiplied by thenumber of bins

Actual behavior

The output contains 0 MDEvents

Steps to reproduce the behavior

w=Load("CNCS_7860")
mdtof=ConvertToMD(w,QDimensions="CopyToMD",dEAnalysisMode="Elastic")
mdq=ConvertToMD(w,QDimensions="|Q|",dEAnalysisMode="Elastic")

print "Number original events: ",w.getNumberEvents()
print "Number MDEvents transformed to |Q|: ",mdq.getNEvents()
print "Number MDEvents copied to TOF: ",mdtof.getNEvents()

Platforms affected

I've tested it on RHEL7 and Ubuntu. The bug is present in earlier versions of Mantid (from at least 3.5)

AndreiSavici commented 7 years ago

For some reason the issue was not automatically closed