Ticket #10829 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Fix bugs in Tragectory calculations in MD normalization for direct geometry

Reported by: Alex Buts Owned by: Andrei Savici
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #9105, #10830 Tester: Alex Buts

Description (last modified by Alex Buts) (diff)

Build LET event workspace using script attached and data files available in system tests Data directory (it will fail with current reduction but usable event workspace LET1_spe will be produced

Then run script below to produce normalization workspace and do normalization.

The picture provided clearly shows that the trajectories calculations is wrong

SetUB(Workspace='LET1_spe', a=2.73, b=2.73, c=2.73)
SetGoniometer(Workspace='LET1_spe', Goniometers='Universal', Axis0='psi,0,1,0,1')
AddSampleLog(Workspace='LET1_spe', LogName='Psi', LogText='20', LogType='Number')
ConvertToMD(InputWorkspace='LET1_spe', QDimensions='Q3D', Q3DFrames='HKL', QConversionScales='HKL', OutputWorkspace='mdWs1', MinValues='-0.1,-0.1,-0.1,-5', MaxValues='1,0.05,0.05,10', SplitInto='20', MaxRecursionDepth=1)
MDNormDirectSC(InputWorkspace='mdWs1', AlignedDim0='[H,0,0],-0.1,1,20', AlignedDim1='[0,K,0],-0.1,0.05,20', AlignedDim2='[0,0,L],-0.1,0.05,20', AlignedDim3='DeltaE,-5,10,20', OutputWorkspace='mdWs1a', OutputNormalizationWorkspace='mdWs1Norm')

DivideMD(LHSWorkspace='mdWs1a', RHSWorkspace='mdWs1Norm', OutputWorkspace='mdWs1b')


Attachments

LET_Events.py (6.4 KB) - added by Alex Buts 6 years ago.
LET shortReduction
one2one_103.map (720.0 KB) - added by Alex Buts 6 years ago.
map file for LET reduction
NormErrors.png (69.0 KB) - added by Alex Buts 6 years ago.
Errors in trajectories

Change History

comment:1 Changed 6 years ago by Alex Buts

  • Description modified (diff)

Changed 6 years ago by Alex Buts

LET shortReduction

Changed 6 years ago by Alex Buts

map file for LET reduction

comment:2 Changed 6 years ago by Alex Buts

  • Description modified (diff)

Changed 6 years ago by Alex Buts

Errors in trajectories

comment:3 Changed 6 years ago by Alex Buts

  • Blocking 10830 added

comment:4 Changed 6 years ago by Andrei Savici

Seems to be a small confusion in the process. Will put a big note in the algorithm help

comment:5 Changed 6 years ago by Andrei Savici

More warnings in the help file. Refs #10829

Changeset: 550c3ef90f8c1971fd26daa04a400f971959acc1

comment:6 Changed 6 years ago by Andrei Savici

  • Status changed from new to assigned

comment:7 Changed 6 years ago by Andrei Savici

  • Status changed from assigned to inprogress

Usage example for MDNormDirectSC. Refs #10829

Also enabled the parallel processing. Refs #10830

Changeset: e9e0dd6659761abae296e5ed10a8f99928625887

comment:8 Changed 6 years ago by Andrei Savici

Usage example. Refs #10829

The MDNorm concept page will be expanded as part of ticket #9105

Changeset: f981f5ee946b5bea67cacb7cd42cd9bcad1c85d9

comment:9 Changed 6 years ago by Andrei Savici

  • Blocking 9105 added

comment:9 Changed 6 years ago by Andrei Savici

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Blocking 9105 removed

Normalization is calculated correctly for event workspaces only if the vent workspace is cropped and binned to the same interval. The normalization is using the limits from Rebin to calculate minimum and maximum final energy. However, if the event workspace is not cropped to the same interval, one might have MD events where the normalization is calculated to be 0. Maybe ConvertToMD for events should automatically ignore the events that fall outside the binning range.

Not too much to test. Check if the explanation makes sense, maybe play with the usage example. A note about same limits for cropping and binning should be in the help file.

comment:10 Changed 6 years ago by Andrei Savici

  • Blocking 9105 added

comment:12 Changed 6 years ago by Andrei Savici

cont_nonzero not found on older numpy version. Refs #10829

Changeset: 890003d4fe4af7081cc85d109580d411c3383036

comment:13 Changed 6 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:14 Changed 6 years ago by Alex Buts

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/10829_MDNormDirectSC_help'

Full changeset: 08f4c050566677dcdc2d25c12c38b49eb1b600f2

comment:15 Changed 6 years ago by Alex Buts

I have briefly looked through the changes and they are all positive. I am also reasonably satisfied with the explanation on why event workspace normalization behaves weird (We can fixing this later modifying e.g. ConvertToMD)

I still need to run more tests to be sure that new normalization is correct (or some IS will certainly do that)

But as experimental algorithm this all certainly belongs to the release 3.3

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11671

Note: See TracTickets for help on using tickets.