Ticket #10820 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

MD plotting issue

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Roman Tolchenov

Description

Reported by Jon Taylor via Mantid Help. Generating a LinePlot and converting it to a MatrixWorkspace via ConvertMDHistoWorkspaceToMatrixWorkspace is producing the wrong form of plot.

The two plots generated with the following script should be identical.

LoadMD(Filename='/Users/spu92482/Documents/mantid/systemtests/Data/SEQ_MDEW.nxs', OutputWorkspace='orig')
BinMD(InputWorkspace='orig', AxisAligned='0', BasisVector0='X,units,0,-0,0.84049,0.541827', BasisVector1='Y,units,0,-0,-0.541827,0.84049', BasisVector2='2,units,1,-0,-0,0', BasisVector3='3,units,0,1,-0,0', Translation='0,-0.25,-0.897805,17.1698', OutputExtents='0,0.261172,-0.1,0.1,-0.1,0.1,-0.1,0.1', OutputBins='100,1,1,1', OutputWorkspace='orig_line')
converted = ConvertMDHistoToMatrixWorkspace('orig_line')
plotSpectrum(converted, 0)
plotMD('orig_line')

Attachments

Unknown.png (171.6 KB) - added by Owen Arnold 6 years ago.

Change History

Changed 6 years ago by Owen Arnold

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #10820. Fix with unit tests in place

Still need to check axis labelling.

Changeset: 3572e2cfbdf3df1d85712a4243f9ffac9271e667

comment:3 Changed 6 years ago by Owen Arnold

refs #10820. Axis labelling introduced and tested.

I've put in a switch to recover the original behaviour.

Changeset: f20ff02377bdc513528468dfbf5dad0021444da2

comment:4 Changed 6 years ago by Owen Arnold

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

This is being verified as pull request #112.

comment:5 Changed 6 years ago by Owen Arnold

Please don't merge this into master yet.

comment:6 Changed 6 years ago by Owen Arnold

refs #10820. Fix unitialized warning

Changeset: 8e04a8acb8114ca4844e5813b0939de3c708267b

comment:7 Changed 6 years ago by Owen Arnold

test this please

comment:8 Changed 6 years ago by Owen Arnold

test this please

comment:9 Changed 6 years ago by Owen Arnold

refs #10820. Use original dim name

The problem at the moment is that if you execute plotMD, and what should be the equivalent (ConvertToMatrixWorkspace followed by plotSpectrum), the x-axis labels are different. plotMD takes the input from the original workspace, which is better, where as the latter approach is providing arbitrary labels. If the transform to the original is possible, and the original workspace has been provided, then that is where the dimension information is now taken from. Unit tests adapted to show this.

Changeset: 00c5508fe5fbc1c15c8bda038e381c5458df7a0a

comment:10 Changed 6 years ago by Owen Arnold

test this please

comment:11 Changed 6 years ago by Owen Arnold

This has been fixed now. The determination of the x-axis to use when creating MatrixWorkspaces uses the same logic as is used in plotMD.

The original issue highlighted by the script has been fixed now.

comment:12 Changed 6 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:13 Changed 6 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge pull request #112 from mantidproject/bugfix/10820_fix_convert

Bugfix/10820 fix convert

Full changeset: 52ef927f1099336979e0ab05a0d6c3e68d9f1383

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11662

Note: See TracTickets for help on using tickets.