Ticket #9319 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Avoid creating matrix for color fill plots of workspaces

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 3.2
Component: GUI Keywords:
Cc: Blocked By:
Blocking: #8923 Tester: Jay Rainey

Description (last modified by Martyn Gigg) (diff)

Creating a colour fill plot from a workspace currently requires a MantidMatrix to be created first.

We have already successfully avoided this for the spectrum plots and the SliceViewer has a custom QwtRasterData source that understands workspace sources. We should use the same source or share as much code as possible with the QwtRasterDataMD.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Blocking

comment:2 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned
  • Description modified (diff)
  • Summary changed from Avoid creating tables/matrices for color fill & bin plots to Avoid creating matrix for color fill plots of workspaces

comment:20 Changed 6 years ago by Martyn Gigg

Move QwtRasterDataMD to QtAPI so it can be reused elsewhere.

Refs #9319

Changeset: d260dbb029b2e628d36898ed888120940262b041

comment:21 Changed 6 years ago by Martyn Gigg

Add SignalRange class for determining IMDWorkspace signal ranges.

Refs #9319

Changeset: e3c38e03ffc8634c3688c05049a160fb41853c1f

comment:22 Changed 6 years ago by Martyn Gigg

Allow SignalRange to work with MDImplicitFunction

Refs #9319

Changeset: 9f4e8bfc6b2628d01b9fa5ca5fa56d846b105c86

comment:23 Changed 6 years ago by Martyn Gigg

Use SignalRange class in SliceViewer.

Refs #9319

Changeset: e2bfea4664bcfa52cc22225944fb27d9e6c57d82

comment:24 Changed 6 years ago by Martyn Gigg

First cut at re-using QwtRasterData for standard colour-fill plots

Refs #9319

Changeset: 140790ba8fc67925df1497516720ef5e8870487c

comment:25 Changed 6 years ago by Martyn Gigg

Add methods to axis classes to find the index of a given value.

Refs #9319

Changeset: 7f8d0a0b1dd8f8e6efbc406565e2229bf55d5d19

comment:26 Changed 6 years ago by Martyn Gigg

Use Axis::indexOfValue methods in MatrixWorkspace.

Removes the requirement for ugly casts. It also fixes a bug with looking up the index from a spectrum axis where it was assuming that the spectrum number mapped directly to the index. This fixes the SliceViewer so that it now displays ragged workspaces correctly. Refs #9319

Changeset: 3e57ec1a043a920877f8069503e72813719337c3

comment:27 Changed 6 years ago by Martyn Gigg

Add a specialised QwtRasterData for views with only 2 dimensions

It also doesn't use any overlays. Refs #9319

Changeset: cf192e7b77decf69fa80fb9a363fb4be8542a3a6

comment:28 Changed 6 years ago by Martyn Gigg

Observe ADS delete & clear notifications in Spectrogram objects.

This only applies to those created directly from a workspace. Refs #9319

Changeset: b407ebb354f5a3c026b26a1a005f7438898e09dc

comment:29 Changed 6 years ago by Martyn Gigg

Observe replace notifications for the spectrogram objects.

Refs #9319

Changeset: f098ede08daa57bd570ed5132b9367269a2ae013

comment:30 Changed 6 years ago by Martyn Gigg

A couple of performance tweaks for graphing in general.

Graph::updateScale was calling replot then QwtPlotZoomer::setZoomBase, which also calls replot so we turn of the replot in setZoomBase. The ScaleEngine was creating the helper classes on the heap for no good reason so removing that removes many calls to new/delete. Refs #9319

Changeset: ff21f099a2012f2ea20f970d034ce9a3a3ee7123

comment:31 Changed 6 years ago by Martyn Gigg

Be smarter about finding the index from a value on a SpectraAxis

We know that the values tend to be quite close so start searching close to the given value and then loop over everything if necessary. Refs #9319

Changeset: 183c75835e1c3fdc64db3fa65bde808f452bd1cc

comment:32 Changed 6 years ago by Martyn Gigg

Use cached spectrum map lookup for MatrixWorkspace raster

This restores reasonable performance during initial drawing and resizing. Refs #9319

Changeset: c02166eed1c8ef2ae73c4ce7fa8169bedc316b5a

comment:33 Changed 6 years ago by Martyn Gigg

Use workspace directly when creating colorfill plot from matrix.

Refs #9319

Changeset: 81cd0926d4c3bb0ff8b7cd4fd1f7db232654b530

comment:34 Changed 6 years ago by Martyn Gigg

Implement a Python plot2D command for colourfill-type plots

This avoids having to create a matrix first. Refs #9319

Changeset: b96f7d8374043f9b5e66d2f16d6af8ece7fe0d64

comment:35 Changed 6 years ago by Martyn Gigg

Use the correct plot2D default in python.

Refs #9319

Changeset: 3f2ecc866d793e95c1c9a0340b719ded8216bf34

comment:36 Changed 6 years ago by Martyn Gigg

Use PlotAxis classes for formatting new spectrogram

Refs #9319

Changeset: 73f922a032391e3588977f9549a8259d16eecafa

comment:37 Changed 6 years ago by Martyn Gigg

Update mock MDIterator due to recent additions

Refs #9319

Changeset: 01572c5f89f81a26ffe35e8f5a6ff02d39b3c514

comment:38 Changed 6 years ago by Martyn Gigg

Merge branch 'feature/9319_no_table_colorfill_plots' into develop

Conflicts:

Code/Mantid/MantidQt/API/test/SignalRangeTest.h

Refs #9319

Changeset: 3064c843a9dcd76ab6e8cdc1076245d9076caaa9

comment:22 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Fix DLL export declarations.

Refs #9319

Changeset: 28474abd227c0eb8bcf637bb4d9282652ee037d8

comment:23 Changed 6 years ago by Martyn Gigg

Fix SignalRangeTest on MSVC

Refs #9319

Changeset: 3d159da3308ed433810f53b7483d7b98a1fdee10

comment:24 Changed 6 years ago by Martyn Gigg

Fix MantidPlot2DTest on windows.

Avoids confirmation dialog. Refs #9319

Changeset: bf4bd55ce836580c72f3be00296ace628d08fb74

comment:25 Changed 6 years ago by Martyn Gigg

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

Branch: feature/9319_no_table_colorfill_plots

Tester: This will require a 2D workspace to test. A good example is one of the direct geometry reduced files in the system tests reference directory, e.g. MARIReduction.nxs. Load the file and check that creating a colorfill plot works and does not create an intermediate matrix anymore. Check that

  • deleting the workspace closes the plot
  • replacing the workspace updates the contents of the plot
  • type mtd.clear() in the ipython console and the plot should close

A new command, plot2D has been introduced for plotting from python. It is described here: http://www.mantidproject.org/MantidPlot:_Image_and_Contour_Line_Plots_(Spectrograms), in the section Creating Colour Map or Contour Plots from Workspaces. Try out the commands and make sure they work as intended.

comment:26 Changed 6 years ago by Jay Rainey

  • Status changed from verify to verifying
  • Tester set to Jay Rainey

comment:27 Changed 6 years ago by Jay Rainey

I opened Mantid 3.2 to verify the issues prior to testing. I built the branch locally to verify the changes made address the issues noted in comment:25 & the description, which they do.

I ran the new commands added to the wiki and the Customisation section to verify they work as intended. They do.

No issues with build servers. Code changes and tests written are good.

comment:28 Changed 6 years ago by Jay Rainey

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9319_no_table_colorfill_plots'

Full changeset: f7f3dacf82fa5940ba1cd81cc8c4f4f694a0b430

comment:29 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10162

Note: See TracTickets for help on using tickets.