Ticket #11340 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

LineViewer MatrixWorkspace axis-change then cut

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

Description (last modified by Nick Draper) (diff)

If you view a MatrixWorkspace in the Slice viewer, such as one generated by SofQ3, and you switch the axis around in the LineViewer, and then try to take a line cut, the results come out wrong. It works if you leave the dimension mapping unchanged.

1 day. Not sure what the cause of this is, but don't imagine it would take longer than that to fix.

Attachments

Screen Shot 2015-04-15 at 15.05.30.png (100.0 KB) - added by Owen Arnold 5 years ago.

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Owner changed from Anyone to Owen Arnold
  • Status changed from new to assigned
  • Description modified (diff)
  • Milestone changed from Backlog to Release 3.4

comment:2 Changed 6 years ago by Nick Draper

  • Keywords VATES-vis added; VATES removed

comment:3 Changed 5 years ago by Owen Arnold

To reproduce run this.

# create sample inelastic workspace for MARI instrument containing 1 at all spectra values
ws=CreateSimulationWorkspace(Instrument='MAR',BinParams='-10,1,10')
# convert workspace into MD workspace
ws=SofQWPolygon(InputWorkspace=ws,QAxisBinning='-3,0.1,3',Emode='Direct',EFixed=12)

svw = plotSlice(ws)

1) Line plot problem. See screenshot with x axis wrongly selected as q-1

  • Swap around the X and Y axis in the SliceViewer via the buttons at the top.
  • Use the line mode to draw a vertical line
  • Plot looks OK, but the axis labels in the miniplot of the SliceViewer is wrong.
  • Do 'plot spectrum' in MantidPlot on ws_line and you get the same issue.

2) Scripting problem. Following on from above, you should be able to switch the axis of the SliceViewer in code as below, but this isn't working for MatrixWorkspaces for some reason.

xname = ws.getDimension(0).getName()
yname = ws.getDimension(1).getName()
svw.setXYDim(yname, xname)

Last edited 5 years ago by Owen Arnold (previous) (diff)

Changed 5 years ago by Owen Arnold

comment:4 Changed 5 years ago by Owen Arnold

  • Owner changed from Owen Arnold to Harry Jeffery

comment:5 Changed 5 years ago by Harry Jeffery

  • Status changed from assigned to inprogress

comment:6 Changed 5 years ago by Harry Jeffery

Refs #11340 Refactor showFull

This does not change any of the logic or behaviour.

Changeset: e2fbb384ca0c18b78dcf35bf53274fc56497aa56

comment:7 Changed 5 years ago by Harry Jeffery

Refs #11340 Fix detection to swap ends

Changeset: a7be774d4515f896b33539af42d47828aa1fd14f

comment:8 Changed 5 years ago by Harry Jeffery

Refs #11340 Clang Format LineViewer.cpp

Changeset: 9e92c40c076f2a5352b2350eded29c4036a7adb6

comment:9 Changed 5 years ago by Harry Jeffery

Refs #11340 Clang Format SliceViewerWindow.cpp

Changeset: c8091efbdc0c4ea7648f8f0650f550308a199153

comment:10 Changed 5 years ago by Harry Jeffery

Refs #11340 Fix transposition bug in sliceviewer

Changeset: 2479de7f9abc8fd5495caf5c54569d707130a5e3

comment:11 Changed 5 years ago by Harry Jeffery

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

This is being verified as pull request #617.

comment:12 Changed 5 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:13 Changed 5 years ago by Owen Arnold

  • Status changed from verifying to closed

Merge pull request #617 from mantidproject/11340_fix_axis_bug_in_lineviewer

Fix axis transposition bug in SliceViewer

Full changeset: 57914fe56ad98d95df672e650f80d53e5a74791e

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 12179

Note: See TracTickets for help on using tickets.