Ticket #2737 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

ConvertUnits from d-space to momentum transfer is broken for event workspaces

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: major Milestone: Iteration 28
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description

This is a fun one:

# Set up the data in d-spacing                                                                                           
LoadEventNexus("/SNS/PG3/IPTS-1582/0/2581/NeXus/PG3_2581_event.nxs", "PG3_2581", CompressTolerance=.01)
ws = mtd["PG3_2581"]
calib_fname="/SNS/PG3/2011_2_11A_CAL/PG3_FERNS_2656_2011_03_20.cal"
AlignDetectors(ws, ws, calibfile)
DiffractionFocussing(ws, ws, calibfile)
CompressEvents(ws, ws, Tolerance=.00000001)
NormaliseByCurrent(ws, ws)
Rebin(ws, ws, Params=(.1,-.0004,5))

# Make a copy that is a histogram                                                                                        
ConvertToMatrixWorkspace(ws, str(ws) + "_h")
hist = mtd[str(ws)+"_h"]

# Convert both to momentum transfer                                                                                      
ConvertUnits(ws, ws, Target="MomentumTransfer")
ConvertUnits(hist, hist, Target="MomentumTransfer")

PG3_2581_h has the right answer. The one for the event list not only has the wrong aswer, rebinning the data will delete the events in the list.

Change History

comment:1 Changed 10 years ago by Peter Peterson

  • Owner set to Peter Peterson
  • Status changed from new to accepted
  • type changed from enhancement to defect

comment:2 Changed 10 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

(In [10401]) Got the convertQuickly doing the right thing for events now. Fixes #2737.

comment:3 Changed 9 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:4 Changed 9 years ago by Andrei Savici

  • Status changed from verifying to closed

I assumed calibfile and calib_fname are the same. Then it's ok

comment:5 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3584

Note: See TracTickets for help on using tickets.