Ticket #4511 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

LineViewer: bug plotting X coordinates of line in a MDHistoWS

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: scu@… Blocked By:
Blocking: Tester: Stuart Campbell

Description (last modified by Janik Zikovsky) (diff)

Refs #4504, #4509, #4510.

  • Make a MDEventWorkspace
  • Bin to a MDHistoWorkspace but swap the axes around (e.g. Y->X etc.)
  • Do a line in LineViewer. The X coordinate dimension shown is wrong because it goes back to the original (e.g. MDEvent) workspace dimensions.

The solution

  • Plot in the coordinates of the MDHistoWorkspace, not the original MDEventWorkspace.
  • Maybe later, change the output X axis label to something like [h, 2h, 0] to give the equation of the line. Not right now though.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

Refs #4504, Refs #4511: code demonstrating the bug in #4511

Changeset: c174d18c9902356364487798137f04f435e1a157

comment:2 Changed 9 years ago by Janik Zikovsky

Refs #4504, Refs #4511: code demonstrating the bug in #4511

Changeset: c174d18c9902356364487798137f04f435e1a157

comment:3 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted
  • Description modified (diff)

comment:4 Changed 9 years ago by Janik Zikovsky

  • Milestone changed from Iteration 33 to Iteration 32

comment:5 Changed 9 years ago by Janik Zikovsky

Refs #4703, Refs #4511 BinMD records the intermediate WS

and the coordinate transformations to it when binning a MDHistoWorkspace

Changeset: d20ad6550c3f2580b17eab844de8598aeaf35aef

comment:6 Changed 9 years ago by Janik Zikovsky

Refs #4511 CoordTransform clone method

Changeset: e0ec05caf5a3da283297e741b88563355e66723a

comment:7 Changed 9 years ago by Janik Zikovsky

Refs #4511 allow using a transformation in plotting MDWorkspace

Refs #4510

Changeset: 5cb9e462c86cf366467b130a19e148383b7d2520

comment:8 Changed 9 years ago by Janik Zikovsky

Refs #4511 fixed bug when swapping axes

The wrong coordinate transformation was being calculated. Tests happened to pass because the transformation in the previous tests were too simple

Changeset: c4055dba04c54b293799578732053a544c23de55

comment:9 Changed 9 years ago by Janik Zikovsky

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

Note to testers: not all axes swapping caused the bug. The following example did and should be fixed now:

CreateMDWorkspace(Dimensions='3',Extents='0,10,0,10,0,10',Names='A,B,C',Units='m,m,m',SplitInto='2',MaxRecursionDepth='20',OutputWorkspace='ws_3d')
FakeMDEventData("ws_3d",  UniformParams="1e6")
FakeMDEventData("ws_3d",  PeakParams="3e4, 6,7,8, 1.0")

BinMD(InputWorkspace='ws_3d',AlignedDimX='B, 3, 10, 30',AlignedDimY='C, 2, 10, 30',AlignedDimZ='A, 1, 10, 30',ForceOrthogonal='0',OutputWorkspace='swapped')

You should be able to do a proper line slice in the LineViewer viewing "swapped", with all possible combinations of "x" axis to plot. E.g. SliceViewer is showing dimensions B+C, you should be able to project the line plot along the B or the C dimension with no trouble.

comment:10 Changed 9 years ago by Stuart Campbell

  • Status changed from verify to verifying
  • Tester set to Stuart Campbell

comment:11 Changed 9 years ago by Stuart Campbell

  • Status changed from verifying to closed

The above script seems to work ok.

comment:12 Changed 9 years ago by Janik Zikovsky

Refs #4703, Refs #4511 BinMD records the intermediate WS

and the coordinate transformations to it when binning a MDHistoWorkspace

Changeset: d20ad6550c3f2580b17eab844de8598aeaf35aef

comment:13 Changed 9 years ago by Janik Zikovsky

Refs #4511 CoordTransform clone method

Changeset: e0ec05caf5a3da283297e741b88563355e66723a

comment:14 Changed 9 years ago by Janik Zikovsky

Refs #4511 allow using a transformation in plotting MDWorkspace

Refs #4510

Changeset: 5cb9e462c86cf366467b130a19e148383b7d2520

comment:15 Changed 9 years ago by Janik Zikovsky

Refs #4511 fixed bug when swapping axes

The wrong coordinate transformation was being calculated. Tests happened to pass because the transformation in the previous tests were too simple

Changeset: c4055dba04c54b293799578732053a544c23de55

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5358

Note: See TracTickets for help on using tickets.