Ticket #9402 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Avoid creating matrix for bin 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: Russell Taylor

Description

Creating a bin plot from a workspace currently requires a table to be created first.

We currently have MantidMatrixCurve & MantidQwtMatrixWorkspaceData for spectrum plots to avoid creating tables. We need to make them support plotting in either direction.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Martyn Gigg

  • Blocking 8923 added

comment:3 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

First cut at using same functions for spectra/bin plots

They'll use a switch that will just change the data source type. Refs #9402

Changeset: 92fc00ba480ce52ffcd278e301faaf0e2b21cd80

comment:4 Changed 6 years ago by Martyn Gigg

Rename MantidQwtMatrixWorkspaceData to QwtWorkspaceSpectrumData

It more accurately describes what it does. Refs #9402

Changeset: 3c9b2bc5e26b2fdad1f8ad00a33e7e75ddccf7bd

comment:5 Changed 6 years ago by Martyn Gigg

Use different data classes for bin/spectrum plotting.

Refs #9402

Changeset: 22895f585042aac4b98b73428c172eea083ef844

comment:6 Changed 6 years ago by Martyn Gigg

Fix legend item naming to take into account spectrum/bin type.

Refs #9402

Changeset: 00e830ca081765031f698a9ffad8fb98013a5f99

comment:7 Changed 6 years ago by Martyn Gigg

Flip python plotBin to use new internal plot1D command.

The MantidUI::plotBin function is now not required. Refs #9402

Changeset: 469863fb9e2cf650d76b59dfe73020ca7e530a44

comment:8 Changed 6 years ago by Martyn Gigg

Missed data class tests when moving files around.

Refs #9402

Changeset: bad92f8c7768f4d0debfda13092e7cbd93927ba1

comment:9 Changed 6 years ago by Martyn Gigg

Fix doxygen warnings.

Refs #9402

Changeset: 678129568d9b0774055d85a821c51068b1df98c8

comment:10 Changed 6 years ago by Martyn Gigg

Put back data class assignment operators.

The QwtData base class declares a protected assignment operator but MSVC isn't happy with leaving the compiler to define one so we have to implement one ourselves. Refs #9402

Changeset: 0bf15bac0c6bd9ecee81ebfeecc407fd888f2e09

comment:11 Changed 6 years ago by Martyn Gigg

Add a test for the new QwtWorkspaceBinData class

Refs #9402

Changeset: dee610e834217086bbd42894ea49a17b28bbe791

comment:12 Changed 6 years ago by Martyn Gigg

Avoid table when creating bin plot from matrix.

Refs #9402

Changeset: d92799e0d3562d85320cb4513d136e902000abc6

comment:13 Changed 6 years ago by Martyn Gigg

Fix bug with axis labelling for bin plots.

Refs #9402

Changeset: f265715aef7a8e79e9e05303af9d15d3e40624aa

comment:14 Changed 6 years ago by Martyn Gigg

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

Branch: feature/9402_bin_plots_no_table

Tester: The code surrounding creating spectrum/bin plots from workspaces has been refactored since the only real difference in the two plot types is which axis forms the X axis. This difference can be handled by simply have two separate data sources: one for spectrum plots and one for bin plots.

The refactoring means that as well as testing bin plotting the spectrum plotting should also be tested, both from the right-click menu for the workspaces and using the plotSpectrum command.

The plotBin command has been improved and now functions in a very similar manner to plotSpectrum. It can plot multiple curves without have to create tables and merge other curves onto a single plot.

comment:15 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:16 Changed 6 years ago by Martyn Gigg

  • Status changed from reopened to inprogress

comment:17 Changed 6 years ago by Martyn Gigg

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

comment:18 Changed 6 years ago by Russell Taylor

  • Status changed from verify to reopened
  • Resolution fixed deleted

By my reckoning, MantidUI::createGraphFromSelectedColumns is no longer called anywhere - could you remove it please?

comment:19 Changed 6 years ago by Martyn Gigg

  • Status changed from reopened to inprogress

Remove unused function.

Refs #9402

Changeset: 480510b9537de3fade2fc61c1dfe01695be9067f

comment:20 Changed 6 years ago by Martyn Gigg

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

You're right, it was only called by the old bin plotting stuff. It's gone now.

comment:21 Changed 6 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:22 Changed 6 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Attempting to plot any bin index that's greater than the number of histograms in a workspace fails with the message "NNNN is an invalid spectrum index for workspace ws - not plotted".

comment:23 Changed 6 years ago by Martyn Gigg

  • Status changed from reopened to inprogress

Leave spectrum/bin index checking to respective Data class.

Refs #9402

Changeset: 9c1f1ae9647dd08d221224a4e13d593e4f3cb536

comment:24 Changed 6 years ago by Martyn Gigg

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

That should fix the exception problem.

comment:25 Changed 6 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:26 Changed 6 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/9402_bin_plots_no_table'

Full changeset: 765ae154e0579c85633bd2ad916ebd3d9e77de94

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10245

Note: See TracTickets for help on using tickets.