Ticket #5167 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

SliceViewer: overlay a peaks workspace

Reported by: Janik Zikovsky Owned by: Owen Arnold
Priority: major Milestone: Release 2.4
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: #6247, #6248, #6249, #6250 Tester: Stuart Campbell

Description (last modified by Janik Zikovsky) (diff)

Drag/drop (or something else) to add a PeaksWorkspace to a MDWorkspace being viewed.

Some code will have to choose the right dimensions to pick for the peaks, to match the MDWorkspace being viewed (HKL vs Qlab vs QSample)... Right now, I would use the names of the dimensions as a guide.

I think it would be nice to show peaks as circles that come in and out of view as you scroll around. The circles could have different opacity based on whether they are in front of or behind the screen. I'm not sure how to handle the drawing, on top of the QwtPlotSpectrogram. Presumably something like the LineOverlay, with a mostly-transparent widget covering the whole space?

I'm sure people will later want to add things like labels (HKL) and the ability to click on it to get more information.

Attachments

PeakOverlays.png (36.6 KB) - added by Owen Arnold 8 years ago.

Change History

comment:1 Changed 8 years ago by Janik Zikovsky

  • Owner changed from Janik Zikovsky to Owen Arnold
  • Status changed from new to assigned
  • Description modified (diff)

comment:2 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:3 Changed 8 years ago by Owen Arnold

refs #5167 ellipse overlay prototype

Changeset: 9a3d55b3410f4f178cb4f2ae6c7ff42b1b52dc46

comment:4 Changed 8 years ago by Owen Arnold

refs #5167. Open peakws into the sliceviewer

Changeset: bb1c92dab90048093de00a68bfc006cad283d987

comment:5 Changed 8 years ago by Owen Arnold

  • Status changed from assigned to accepted

comment:6 Changed 8 years ago by Russell Taylor

Re #5167. Clear compiler warnings.

Changeset: f62746807e7f1526241f29d84d1590b02456635b

comment:7 Changed 8 years ago by Owen Arnold

refs #5167. Transformations performed correctly

Changeset: 015ff3e2b769c4a01c927899720bd1f35e793451

comment:8 Changed 8 years ago by Owen Arnold

refs #5167. Remove dead code and document.

Changeset: 72cc121fb346ab38609a4ab77ea0ead79436290a

comment:9 Changed 8 years ago by Owen Arnold

refs #5167. MVP style PeakOverlayCreation

Changeset: 59f9df480987be75e5babd7efe80c3f003cbd909

comment:10 Changed 8 years ago by Owen Arnold

refs #5167. MVP method controlling peaks

Changeset: c3395deea7ee0e06ce2ccd97f3620d8b645cd541

comment:11 Changed 8 years ago by Owen Arnold

refs #5167. Fix gcc errors and warnings.

Changeset: ca8f5cd79d643954484f3a12139754ab788f1db4

comment:12 Changed 8 years ago by Owen Arnold

refs #5167. Naming differences in qwt fix.

Changeset: 504579c7cbfe2af58508afc786471bc807eede58

comment:13 Changed 8 years ago by Owen Arnold

refs #5167. Browse peaks through slice.

Changeset: a708692ca49e4f42769ac14db74abd6b5e227986

comment:14 Changed 8 years ago by Owen Arnold

refs #5167. Fix GCC warning.

Changeset: 9080000836db3fc53a12140eaa02b1298894eb58

comment:15 Changed 8 years ago by Owen Arnold

refs #5167. Toggle hide peaks and control opacity better.

Changeset: c7a4a160595524835d5f67f7162a9c6e08b3a5ad

comment:16 Changed 8 years ago by Owen Arnold

refs #5167. Fix warnings

Changeset: 0f915e64b4004112f517ececd5d60d0b3039cdf1

comment:17 Changed 8 years ago by Owen Arnold

refs #5167. Separate classes into headers

Changeset: 2766c0fbae99740d493105c659d19dc4ac5d4b03

comment:18 Changed 8 years ago by Owen Arnold

refs #5167. change filenames to reflect classes

Changeset: 63c2691d07071563e7354451ab146f84e43142a6

comment:19 Changed 8 years ago by Owen Arnold

refs #5167. Fix warning

Changeset: f6cf5c06cb3a8175d82fb49077b7b6bed284d988

comment:20 Changed 8 years ago by Owen Arnold

refs #5167. Fix warning

Changeset: 3ed87e68ba6c038f1cda81f8083a09cd40a5da3a

comment:21 Changed 8 years ago by Owen Arnold

refs #5167. Show peaks as plane-cut spheres

Changeset: efd9fcad2834bb4d843b86d70d0a4c74c03009fb

comment:22 Changed 8 years ago by Owen Arnold

refs #5167. Improve and test factories.

Changeset: 5b135d97bb44dddf52cbcc7edd53edf9e463ed14

comment:23 Changed 8 years ago by Owen Arnold

refs #5167. Fix gcc error.

Changeset: 201ed30ad1d4c9e4b97afa3030b46ad1c5d64563

comment:24 Changed 8 years ago by Owen Arnold

refs #5167. Fix gcc error.

Changeset: 93fabe8cd54c2816754279c4ca1dfc1692d0c7f5

comment:25 Changed 8 years ago by Owen Arnold

refs #5167. Mocks should now work under gcc

Changeset: 63553b4dc0978e6464672eabc33970cb4a2722bb

comment:26 Changed 8 years ago by Russell Taylor

Re #5167. Temporary fix for crash when showing 2D workspace.

Changeset: 4a3753aeffac79305a27e77a7338054d4c40a529

comment:27 Changed 8 years ago by Owen Arnold

refs #5167. Normalise by largest intensity.

Changeset: 8dafc8a5115e2b57bf2418312dae9ce7720797dc

comment:28 Changed 8 years ago by Owen Arnold

refs #5167 ellipse overlay prototype

Changeset: 9a3d55b3410f4f178cb4f2ae6c7ff42b1b52dc46

comment:29 Changed 8 years ago by Owen Arnold

refs #5167. Open peakws into the sliceviewer

Changeset: bb1c92dab90048093de00a68bfc006cad283d987

comment:30 Changed 8 years ago by Russell Taylor

Re #5167. Clear compiler warnings.

Changeset: f62746807e7f1526241f29d84d1590b02456635b

comment:31 Changed 8 years ago by Owen Arnold

refs #5167. Transformations performed correctly

Changeset: 015ff3e2b769c4a01c927899720bd1f35e793451

comment:32 Changed 8 years ago by Owen Arnold

refs #5167. Remove dead code and document.

Changeset: 72cc121fb346ab38609a4ab77ea0ead79436290a

comment:33 Changed 8 years ago by Owen Arnold

refs #5167. MVP style PeakOverlayCreation

Changeset: 59f9df480987be75e5babd7efe80c3f003cbd909

comment:34 Changed 8 years ago by Owen Arnold

refs #5167. MVP method controlling peaks

Changeset: c3395deea7ee0e06ce2ccd97f3620d8b645cd541

comment:35 Changed 8 years ago by Owen Arnold

refs #5167. Fix gcc errors and warnings.

Changeset: ca8f5cd79d643954484f3a12139754ab788f1db4

comment:36 Changed 8 years ago by Owen Arnold

refs #5167. Naming differences in qwt fix.

Changeset: 504579c7cbfe2af58508afc786471bc807eede58

comment:37 Changed 8 years ago by Owen Arnold

refs #5167. Browse peaks through slice.

Changeset: a708692ca49e4f42769ac14db74abd6b5e227986

comment:38 Changed 8 years ago by Owen Arnold

refs #5167. Fix GCC warning.

Changeset: 9080000836db3fc53a12140eaa02b1298894eb58

comment:39 Changed 8 years ago by Owen Arnold

refs #5167. Toggle hide peaks and control opacity better.

Changeset: c7a4a160595524835d5f67f7162a9c6e08b3a5ad

comment:40 Changed 8 years ago by Owen Arnold

refs #5167. Fix warnings

Changeset: 0f915e64b4004112f517ececd5d60d0b3039cdf1

comment:41 Changed 8 years ago by Owen Arnold

refs #5167. Separate classes into headers

Changeset: 2766c0fbae99740d493105c659d19dc4ac5d4b03

comment:42 Changed 8 years ago by Owen Arnold

refs #5167. change filenames to reflect classes

Changeset: 63c2691d07071563e7354451ab146f84e43142a6

comment:43 Changed 8 years ago by Owen Arnold

refs #5167. Fix warning

Changeset: f6cf5c06cb3a8175d82fb49077b7b6bed284d988

comment:44 Changed 8 years ago by Owen Arnold

refs #5167. Fix warning

Changeset: 3ed87e68ba6c038f1cda81f8083a09cd40a5da3a

comment:45 Changed 8 years ago by Owen Arnold

refs #5167. Show peaks as plane-cut spheres

Changeset: efd9fcad2834bb4d843b86d70d0a4c74c03009fb

comment:46 Changed 8 years ago by Owen Arnold

refs #5167. Improve and test factories.

Changeset: 5b135d97bb44dddf52cbcc7edd53edf9e463ed14

comment:47 Changed 8 years ago by Owen Arnold

refs #5167. Fix gcc error.

Changeset: 201ed30ad1d4c9e4b97afa3030b46ad1c5d64563

comment:48 Changed 8 years ago by Owen Arnold

refs #5167. Fix gcc error.

Changeset: 93fabe8cd54c2816754279c4ca1dfc1692d0c7f5

comment:49 Changed 8 years ago by Owen Arnold

refs #5167. Mocks should now work under gcc

Changeset: 63553b4dc0978e6464672eabc33970cb4a2722bb

comment:50 Changed 8 years ago by Russell Taylor

Re #5167. Temporary fix for crash when showing 2D workspace.

Changeset: 4a3753aeffac79305a27e77a7338054d4c40a529

comment:51 Changed 8 years ago by Owen Arnold

refs #5167. Disable features.

Changeset: 5af025dd4e6aa2e3753eef24eb9227f1cf23dd65

comment:52 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

moved to Release 2.4

comment:53 Changed 8 years ago by Owen Arnold

refs #5167. Normalise by largest intensity.

Changeset: 8dafc8a5115e2b57bf2418312dae9ce7720797dc

comment:54 Changed 8 years ago by Owen Arnold

refs #5167. Disable features.

Changeset: 5af025dd4e6aa2e3753eef24eb9227f1cf23dd65

comment:55 Changed 8 years ago by Owen Arnold

  • Blocking 6247 added

comment:56 Changed 8 years ago by Owen Arnold

  • Blocking 6248 added

comment:57 Changed 8 years ago by Owen Arnold

  • Blocking 6249 added

comment:58 Changed 8 years ago by Owen Arnold

  • Blocking 6250 added

comment:59 Changed 8 years ago by Owen Arnold

refs #5167. Fix warning.

Changeset: f7db5d0e0d72e398ae57e88c8275871e3f1e78fb

comment:60 Changed 8 years ago by Owen Arnold

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

This is up and running. The following tickets have been created to cover immediate future needs

#6247

#6248

#6249

#6250

This ticket is proving the concept, with the minimum set of functionality we know that we need. I'm closing the ticket now. Future development for specific enhancements and new features will occur against the tickets above.

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

comment:61 Changed 8 years ago by Owen Arnold

To The Tester

In order to test this properly you will need a MDWorkspace in HKL and a PeaksWorkspace generated via IntegratePeaksMD. Running the system test Diffraction_Workflow_Test.py will generate the inputs you need. Once this has run, use TOPAZ_3132_HKL and TOPAZ_3132_peaksLattice as the input workspaces.

Basic Test:

  • Right click the MD workspace and open in the SliceViewer.
  • You should notice that their is a button on-top of the SliceViewer with a yellow star, which should be enabled.
  • Click the button and from the dialog that opens choose the peaks workspace you generated.
  • Zoom in on the data and scan through it using the L slider, you should see Green Spherical peaks come in and out of focus according to your position.

Tips:

  • If you are having trouble finding the peaks, I suggest rebinning the MDWorkspace using BinMD to hone-in on a region of interest, and to increase the binning to make it easier to find the peaks.

Other Tests to Try:

  • Try swapping the X-Y plotted dimension, and you should find that the peaks overlay adapts to the new dimension mapping.
  • Try toggling the PeaksOverlay button after you have displayed some peaks.
  • Try loading an MDWorkspace that does not have HKL dimensions, and see that the PeaksOverlay button is disabled.
  • Try using the PeaksOverlays from the view menu rather than the PeaksOverlay button.

I've attached an output of the sort of overlay you can expect to see.

Changed 8 years ago by Owen Arnold

comment:62 Changed 8 years ago by Owen Arnold

refs #5167. Adapt to restrict to HKL only.

Changeset: 9da58a500cd13bffa3d5e7c1ef088289d824780b

comment:63 Changed 8 years ago by Owen Arnold

refs #5167. Works for default dimension mapping/

Changeset: 3599233e5335c794f2d2431b391deaf524c9c0ea

comment:64 Changed 8 years ago by Owen Arnold

refs #5167. Use PeaksTransform.

Changeset: 74ff1d7a0956279fd751aaa002726cd8904ba051

comment:65 Changed 8 years ago by Owen Arnold

refs #5167. Fix display update issues.

Fix issue where peaks dont display until slider is moved. Fix issue where the correct slider to use is unknown. Fix issue where the peakstransform is not getting updated with the new plot axis Fix issue where the peak shape is fixed circular based on one axis range.

Changeset: a7866b451fed8456610a2105f2cb9e9c09f0ccb3

comment:66 Changed 8 years ago by Owen Arnold

refs #5167. Refactor to simplify.

Remove PeakOverlayFactoryBase class. Most of the logic had already been stripped out of this type. Also added a test for the NullPeaksPresenter since object of this type should be neutral in existance, yielding no noticable affect on the system whatsoever.

Changeset: 49acde57f958e36bc70fcb4d4f23d1b500537f97

comment:67 Changed 8 years ago by Owen Arnold

refs #5167. Disable features automatically.

Do not allow the user to have access to these features unless everything has been setup properly.

Changeset: 610fa9415cda6a625031513de5f4d633c7a9c65e

comment:68 Changed 8 years ago by Owen Arnold

refs #5167. Blind optimisation.

I havent done any benchmarking, but there are functions being run that dont always need to get run. Ive cached some variables rather than recalculate the results too. Would have been better to benchmark first, but Ill do some proper optimisation under another ticket at a later date.

Changeset: 453b6ed9d41e644d0a1b23829d3b96d9fd1620b7

comment:69 Changed 8 years ago by Owen Arnold

refs #5167. Fix error in exception usage.

Changeset: 302f1b4e8a29e92b35b7b419c5b9dead8c10a564

comment:70 Changed 8 years ago by Owen Arnold

refs #5167. Fix warning.

Changeset: f7db5d0e0d72e398ae57e88c8275871e3f1e78fb

comment:71 Changed 8 years ago by Stuart Campbell

  • Status changed from verify to verifying
  • Tester set to Stuart Campbell

comment:72 Changed 8 years ago by Stuart Campbell

  • Status changed from verifying to closed

Seems to work ok.

comment:73 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6013

Note: See TracTickets for help on using tickets.