Ticket #7957 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Log10 option on LineViewer plot

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 3.0
Component: GUI Keywords:
Cc: saviciat@… Blocked By:
Blocking: Tester: Andrei Savici

Description

LineViewer on slice viewer should have an option to have Log10 Y-scaling.

Attachments

log.png (142.0 KB) - added by Andrei Savici 7 years ago.
With Log Option
nolog.png (139.7 KB) - added by Andrei Savici 7 years ago.
No Log Option
Screen Shot 2013-10-09 at 10.40.38.png (307.7 KB) - added by Owen Arnold 7 years ago.

Change History

comment:1 Changed 7 years ago by Owen Arnold

  • Status changed from new to inprogress

comment:2 Changed 7 years ago by Owen Arnold

git refs #7957. Log scaling option added.

Needed changes to the curve data type, and a specialisation of the qwtplotcurve type.

Changeset: e157d1487768864d8b440168c015dfee567ffa35

comment:3 Changed 7 years ago by Owen Arnold

refs #7957. Add log scaling feature.

Changeset: 0d49ebb5d33de98321b4e79bc53193a0b9d7bd17

comment:4 Changed 7 years ago by Owen Arnold

Revert "refs #7957. Add log scaling feature."

This reverts commit 0d49ebb5d33de98321b4e79bc53193a0b9d7bd17.

Changeset: a588b297a0d001ef12bcd74703003f7ec9c083ad

comment:5 Changed 7 years ago by Owen Arnold

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

It would be much better if the tester was familiar with the SliceViewer functionality.

Tester, after plotting a Slice, open the LineViewer, and make a line. Below the preview plot, there is an option to switch on/off log scaling.

Here's some data to get you started.

ws = CreateMDWorkspace(Dimensions='3',EventType='MDEvent',Extents='-10,10,-10,10,-10,10',Names='Q_lab_x,Q_lab_y,Q_lab_z',Units='A,B,C')
FakeMDEventData(InputWorkspace='ws',UniformParams='1000',PeakParams='100000,0,0,0,1')
SliceMD(InputWorkspace='ws',AlignedDim0='Q_lab_x,-10,10,100',AlignedDim1='Q_lab_y,-10,10,100',AlignedDim2='Q_lab_z,-10,10,100',OutputWorkspace='binned')
  • Check that no errors are generated
  • Check that the plot is what you expect
  • Export the plot using 'Apply' and plot the MDWorkspace generated separately. Compare that plot to the one in the SliceViewer. Switch both to log scale and compare again.

comment:6 Changed 7 years ago by Owen Arnold

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:7 Changed 7 years ago by Nick Draper

  • Milestone changed from Backlog to Release 3.0

moved to Release 3.0 as these all seem to be active

comment:8 Changed 7 years ago by Owen Arnold

  • Status changed from reopened to inprogress

Revert "Revert "refs #7957. Add log scaling feature.""

This reverts commit a588b297a0d001ef12bcd74703003f7ec9c083ad.

Changeset: 13b71c65e7c27446178063195e559f231ab1e097

comment:9 Changed 7 years ago by Owen Arnold

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

comment:10 Changed 7 years ago by Russell Taylor

  • Status changed from verify to reopened
  • Resolution fixed deleted

I had to remove the last merge into develop because it broke the RHEL6 builds - in the version of QwtPlot on that platform QwtScaleDiv does not have the lowerBound & upperBound methods.

comment:11 Changed 7 years ago by Owen Arnold

  • Status changed from reopened to inprogress

refs #7957. Use older Qwt features for RHEL6.

Use range feature of Qwt to get the interval as the last implementation did not work cross-platform. Also fix the LineCurve type such that zeros can be ignored when in log scale.

Changeset: 5fd9e3534b32a4400316e7c4fbdce195f4c66cd7

comment:12 Changed 7 years ago by Owen Arnold

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

comment:13 Changed 7 years ago by Owen Arnold

refs #7957. Further fixes for old qwtplot versions.

Changeset: 08bd4ae1454e50685ee23ef880fdea847a036c42

comment:14 Changed 7 years ago by Owen Arnold

refs #7957. Fix compiler warnings.

Changeset: 13ae91bba4f90ef995271d19ee66da791020db6f

comment:15 Changed 7 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

Changed 7 years ago by Andrei Savici

With Log Option

Changed 7 years ago by Andrei Savici

No Log Option

comment:16 Changed 7 years ago by Andrei Savici

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Running on Ubuntu 12.10. This ticket completely messes up the line viewer. See attached images. The x axis is always between 0 and 1. I might be interested in different ranges for x.

comment:17 Changed 7 years ago by Andrei Savici

Here is what I used:

DgsReduction(SampleInputFile='CNCS_7860_event.nxs',IncidentEnergyGuess='3',OutputWorkspace='reduced2')
ConvertToMD(InputWorkspace='reduced2',OutputWorkspace='MD',QDimensions='|Q|',QConversionScales='HKL',MinValues='0,-3',MaxValues='3,3')

Start slice viewer, dynamically rebin with the default values, then draw a vertical line

Changed 7 years ago by Owen Arnold

comment:18 Changed 7 years ago by Owen Arnold

Andrei, not entirely sure how you got into this state as it seems to work when I tried with your data (see attachment). One thing that I note from your log.png ticket is that the Start Delta E box at the top of the right viewer is reporting the same start position as the x-axis of the plot, however the selected region achieved graphically in the line viewer is not. This could be down to a bug somewhere else in the LineViewer.

comment:19 Changed 7 years ago by Owen Arnold

It turns out that I can reproduce this, but I need to change the start/end positions of the line before it starts setting the x-axis incorrectly.

comment:20 Changed 7 years ago by Owen Arnold

Apologies for the delay with the fix here. Detoured by fixing #8104

comment:21 Changed 7 years ago by Owen Arnold

  • Status changed from reopened to inprogress

refs #7957. Fix works for Proper plot calc from slice.

The fix does not cover the preview plot. For some reason the Preview plot ends up with a 0,1,0,1 bounding box.. This will require some further investigation.

Changeset: 85af6fb29522b0613962b84835d55b27c800b358

comment:22 Changed 7 years ago by Owen Arnold

refs #7957. Remove custom CurveData

QwtPlotCurve can be used and does the right thing. Fix AutoScaleAxis usage.

Changeset: 2205f8fc86b9dec213fd3474c1e6148ddcf37075

comment:23 Changed 7 years ago by Owen Arnold

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

Retest according to both test python scripts and previous test

comment:24 Changed 7 years ago by Andrei Savici

  • Status changed from verify to verifying

comment:25 Changed 7 years ago by Andrei Savici

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7957_log_scale'

Full changeset: 2d73e1a5b98f0926220356f00ecd981b1fb33246

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8802

Note: See TracTickets for help on using tickets.