Ticket #3967 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

RemoveLowResTOF/DiffractionFocussing PG3_4868

Reported by: Peter Peterson Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Vickie Lynch

Description

Use the following script and compare the three results.

LoadEventNexus(Filename=r'/SNS/PG3/IPTS-2767/0/4868/NeXus/PG3_4868_event.nxs',OutputWorkspace='PG3_4868',Precount='1')
FilterBadPulses(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868')
RemovePromptPulse(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Width='50')
CompressEvents(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Tolerance='0.01')
SortEvents(InputWorkspace='PG3_4868')
CropWorkspace(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',XMin='12500',XMax='29166.669999999998')
LoadCalFile(InputWorkspace='PG3_4868',CalFilename=r'/SNS/PG3/2011_2_11A_CAL/PG3_FERNS_d4832_2011_08_24.cal',WorkspaceName='PG3')
MaskDetectors(Workspace='PG3_4868',MaskedWorkspace='PG3_mask')
AlignDetectors(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',OffsetsWorkspace='PG3_offsets')
ConvertUnits(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Target='TOF')
UnwrapSNS(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',LRef='62',Tmin='12500',Tmax='29166.669999999998')
ConvertUnits(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868_nolowres',Target='dSpacing')
Rebin(InputWorkspace='PG3_4868_nolowres',OutputWorkspace='PG3_4868_nolowres',Params='0.43,-0.0004,3.8')
DiffractionFocussing(InputWorkspace='PG3_4868_nolowres',OutputWorkspace='PG3_4868_nolowres',GroupingWorkspace='PG3_group',PreserveEvents='0')
RemoveLowResTOF(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',ReferenceDIFC='15000',Tmin='12500')
ConvertUnits(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Target='dSpacing')
Rebin(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Params='0.43,-0.0004,3.8')
DiffractionFocussing(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868_histo',GroupingWorkspace='PG3_group',PreserveEvents='0')
DiffractionFocussing(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868_event',GroupingWorkspace='PG3_group',PreserveEvents='1')
SortEvents(InputWorkspace='PG3_4868_event')

PG3_4868_event and PG3_4868_histo should be identical. PG3_4868_nolowres is included for helping diagnosing the issue which appears to be something wrong with the event branch of RemoveLowResTOF and the MRU.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Owner set to Janik Zikovsky
  • Status changed from new to accepted

comment:2 Changed 9 years ago by Janik Zikovsky

"""This is some bizarre behavior for a particular run with DiffractionFocussing. 
Check out the difference of the two spectra produced by the script below. 
BTW: you can't plot them on top of each other. I'm still trying to understand
what is happening for this particular run, but if you can find it before me I promise not to complain. """

LoadEventNexus(Filename=r'PG3_4868_event.nxs',OutputWorkspace='PG3_4868',Precount='1')
FilterBadPulses(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868')
RemovePromptPulse(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Width='50')
CompressEvents(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Tolerance='0.01')
SortEvents(InputWorkspace='PG3_4868')
CropWorkspace(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',XMin='12500',XMax='29166.669999999998')
LoadCalFile(InputWorkspace='PG3_4868',CalFilename=r'PG3_FERNS_d4832_2011_08_24.cal',WorkspaceName='PG3')
MaskDetectors(Workspace='PG3_4868',MaskedWorkspace='PG3_mask')
#SaveNexus('PG3_4868', 'pg3_1_initial.nxs');

AlignDetectors(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',OffsetsWorkspace='PG3_offsets')
#SaveNexus('PG3_4868', 'pg3_2_aligned.nxs');

ConvertUnits(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Target='TOF')
#SaveNexus('PG3_4868', 'pg3_3_converted.nxs');

UnwrapSNS(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',LRef='62',Tmin='12500',Tmax='29166.669999999998')
Rebin('PG3_4868', Params='0, 30e4, 30e4', OutputWorkspace='PG3_4868')
#SaveNexus('PG3_4868', 'pg3_4_unwrapped.nxs');

ConvertUnits(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868_nolowres',Target='dSpacing')
#SaveNexus('PG3_4868_nolowres', 'pg3_5_nolowres_converted.nxs');

Rebin(InputWorkspace='PG3_4868_nolowres',OutputWorkspace='PG3_4868_nolowres',Params='0.43,-0.0004,3.8')
DiffractionFocussing(InputWorkspace='PG3_4868_nolowres',OutputWorkspace='PG3_4868_nolowres',GroupingWorkspace='PG3_group',PreserveEvents='0')

RemoveLowResTOF(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',ReferenceDIFC='15000',Tmin='12500')
#SaveNexus('PG3_4868', 'pg3_6_lowres.nxs'); # This is sorted correctly

ConvertUnits(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Target='dSpacing')
#SaveNexus('PG3_4868', 'pg3_7_lowres_converted.nxs'); #This is in reverse sort order

Rebin(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868',Params='0.43,-0.0004,3.8')
DiffractionFocussing(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868_histo',GroupingWorkspace='PG3_group',PreserveEvents='0')
DiffractionFocussing(InputWorkspace='PG3_4868',OutputWorkspace='PG3_4868_event',GroupingWorkspace='PG3_group',PreserveEvents='1')
SortEvents(InputWorkspace='PG3_4868_event')

The extra Rebin call fixes the UnwrapSNS bin boundaries

comment:3 Changed 9 years ago by Janik Zikovsky

In [15298]:

Refs #3967: ConvertUnits dies if the input X bins are inconsistent. Don't 'unsort' an event list that is sorted by pulse time.

comment:4 Changed 9 years ago by Peter Peterson

In [15311]:

Added a bit more information to the exception thrown. Refs #3967.

comment:5 Changed 9 years ago by Peter Peterson

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

In [15312]:

The actual problem was in UnwrapSNS when there is only one bin. This has a quick check for that. Fixes #3967.

comment:6 Changed 9 years ago by Vickie Lynch

  • Status changed from verify to verifying
  • Tester set to Vickie Lynch

comment:7 Changed 9 years ago by Vickie Lynch

  • Status changed from verifying to closed

Just ran this script and histo and event output look identical.

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4814

Note: See TracTickets for help on using tickets.