Ticket #10944 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Plotting Bug from CutMD

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Harry Jeffery

Description

Here's the issue as reported by Russell

#Set things up
hkl = LoadMD(Filename='C:\Russell\Software\Mantid\VATES\VATESdemoSSC15\Templates\FeDataset.nxs' ,FileBackEnd=1)
 
#Create projections (equivalent of proj in Horace):
projection = CreateEmptyTableWorkspace()
projection.addColumn("double", "u")
projection.addColumn("double", "v")
projection.addColumn("double", "w")
projection.addColumn("double", "offsets")
projection.addColumn("str", "type")
projection.addRow([1, 1, 0, 0, "r"])
projection.addRow([1, -1, 0, 0, "r"]) 
projection.addRow([0, 0, 1, 0, "r"]) 
 
 
#QE slice and look at it in the sliceviewer
horace_style = CutMD(hkl,projection, [-3,0.05,3], [0.9,1.1], [-0.1,0.1], [0,4,300], NoPix=True, CheckAxes=False)
sv=plotSlice(horace_style)
sv.setNormalization(2)#set norm to number of events
sv.setXYDim(0,3)#Choose the correct plot axes (0th and 3rd in Python!)
sv.setColorScaleMin(0)#set colour scale limits
sv.setColorScaleMax(1)
sv.setXYLimits(-2,2,0,200)
 
#If you try to make a 1d cut along (1,1,0), integrating in energy, direct in line mode in the sliceviewer, something weird happens to the integration box – it becomes a trapezium… Nevertheless, if you manage to make the 1d cut this way, and then plotMD, the result has the correct x-axis of (H,H,0).
 
#1d Q cut direct
horace_1d=CutMD(hkl,projection, [-2,0.05,2], [0.9,1.1], [-0.1,0.1], [33,40], NoPix=True, CheckAxes=True)
pm=plotMD(horace_1d,error_bars=1,normalization=mantid.api.MDNormalization.NumEventsNormalization)
 
#The plotMD here has axes of (H,0,0), with the “correct” (H,H,0) not available as an option.

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #10944. Enhance QueryMDWorkspace.

To help diagnose the problem it's useful to look at coordinates of boxes without the transform applied according to any original workspace.

Changeset: 462a7ef0a0ee9d7ae398cbbed126f45c1b0d26f5

comment:3 Changed 6 years ago by Owen Arnold

refs #10944. Allow MDGeometry to clear transforms and workspaces.

The main change here is to what CutMD can do. It Clears BOTH the transforms and the original workspaces off the output workspace.

1) This fixes the issue with the labeling when plotMD is run, because there is no original workspace to try to take dimension information from.

2) However, the plots generated from CutMD from the SliceViewer are now garbage. This could because the line cuts (BinMD) are operating over a Histogram workspace already (CutMD created with NoPix=True), but is something I will need to get to the root of.

Changeset: 48f6daaf0af7f0eeb89b1b7fc83cd5df39928dc8

comment:4 Changed 6 years ago by Owen Arnold

refs #10944. Do not silently fail on BinMD of pure histos.

Changeset: 1cd42718df025dff5cec7066feaed1830eda8e28

comment:5 Changed 6 years ago by Owen Arnold

  • Summary changed from Plotting Bug to Plotting Bug from CutMD

comment:6 Changed 6 years ago by Owen Arnold

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

This is being verified as pull request #551.

comment:7 Changed 6 years ago by Owen Arnold

refs #10944. CoordTransform is const.

Changeset: 9320011df8fc5550ededf14f1450a8a15e77c227

comment:8 Changed 6 years ago by Owen Arnold

refs #10944. CoordTransform is const (more instances).

Changeset: 8fc14551f072ac20e276c299e8f4f1649ca46e73

comment:9 Changed 6 years ago by Owen Arnold

refs #10944. CoordTransform is const (yet more instances).

Changeset: 5d63d671210a58c82e93e1838cfe8b81123ac070

comment:10 Changed 5 years ago by Harry Jeffery

  • Status changed from verify to verifying
  • Tester set to Harry Jeffery

comment:11 Changed 5 years ago by Harry Jeffery

  • Status changed from verifying to closed

Merge pull request #551 from mantidproject/10944_plotmd

Original Workspace Issues affecting PlotMD

Full changeset: 3085c1f1b5dacc9cf3c6d41d366982a4e485b16c

comment:12 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11783

Note: See TracTickets for help on using tickets.