Ticket #7860 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[C2E] New Symmetrise Tab

Reported by: Samuel Jackson Owned by: Dan Nixon
Priority: major Milestone: Release 3.3
Component: Indirect Inelastic Keywords:
Cc: spencer.howells@… Blocked By: #10092
Blocking: #10277, #10278, #10306, #10382, #10391 Tester: Harry Jeffery

Description (last modified by Samuel Jackson) (diff)

New tab interface request from Spencer:

Add a new tab before S(Q,w) to symmetrise to replace the Py alg Symmetrise. Interface:

  1. Usual WS/File input with extension *_red.
  2. Automagically plot in miniPlot.
  3. Parameter boxes for Pivot value (call Xcut in Py alg)and y values for x= +/- pivot.
  4. miniPlot has 2 linked vertical lines at +/- Pivot tied to box value.

Then 1 horizontal line from x=-pivot to 0 and y value at x=-pivot and another from x=0 to pivot and y value for x=pivot. Code as in Py alg.

Attachments

symmetrise_res.nxs (90.3 KB) - added by Dan Nixon 6 years ago.
File for testing

Change History

comment:1 Changed 7 years ago by Samuel Jackson

  • Milestone changed from Backlog to Release 3.2

comment:2 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state

comment:3 Changed 6 years ago by Samuel Jackson

  • Status changed from assigned to inprogress

Refs #7860 Move existing code into python algorithm.

Changeset: 405b5090557cf4029139471f672dca81fefacecc

comment:4 Changed 6 years ago by Samuel Jackson

Refs #7860 Modify algorithm to just take a workspace as input.

Also do some light refactoring at the same time.

Changeset: bf80fa0ce81733b929af4f7d303c1e455f2832e3

comment:5 Changed 6 years ago by Samuel Jackson

Refs #7860 Refactor code with numpy and slicing.

Changeset: 01ee9ecdc780c6023eb8715c89ddaf2f5d9cec35

comment:6 Changed 6 years ago by Samuel Jackson

Refs #7860 Fix PEP8 warnings.

Changeset: 47061039e6ec11c3e0bed5f7b15907673aac48e2

comment:7 Changed 6 years ago by Samuel Jackson

Refs #7860 Further refactoring

Changeset: 71e15db31477226793585e2bbc207fb1d23f73bb

comment:8 Changed 6 years ago by Samuel Jackson

Refs #7860 Remove redundant code from project.

Changeset: 19b887b9004748785eaeef475ab4bf7bdade109c

comment:9 Changed 6 years ago by Samuel Jackson

Refs #7860 Add system tests for algorithm.

Changeset: 2d1f4269500f47c7bc6d08dda4b8f629c010e34c

comment:10 Changed 6 years ago by Samuel Jackson

Refs #7860 Update reference results to be histograms.

Changeset: 192d8ecf657379d75a4924cf46024c2c64960448

comment:11 Changed 6 years ago by Samuel Jackson

  • Milestone changed from Release 3.2 to Backlog

comment:12 Changed 6 years ago by Samuel Jackson

  • Milestone changed from Backlog to Release 3.3

comment:13 Changed 6 years ago by Samuel Jackson

  • Description modified (diff)

comment:14 Changed 6 years ago by Samuel Jackson

  • Owner changed from Samuel Jackson to Dan Nixon

Refactored this code, but I'm not 100% certain it's working as Spencer wants. I would consult with him about it first. Then remaining things are:

  • Add unit test
  • Add GUI tab in Indirect Data Reduction

comment:15 Changed 6 years ago by Dan Nixon

Merge branch 'master' into feature/7860_indirect_symmetrise

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/Symmetrise.py

Refs #7860

Changeset: 028182b106b5b09492ea793c1fd98b34b3241eda

comment:16 Changed 6 years ago by Dan Nixon

Remove WIKI header from Symmetrise.py

Refs #7860

Changeset: 95b576f94a3d0bf4834ebef1cfbd3fea11e1ef82

comment:17 Changed 6 years ago by Dan Nixon

Initial addition of Symmetrise tab

Refs #7860

Changeset: d4290a1a8f366529b58d8f295a6cf6a5d43f4292

comment:18 Changed 6 years ago by Dan Nixon

Added more to Symmetrise tab

Refs #7860

Changeset: 4dae20b9f7711e2ca2c078b694db77fff3860abe

comment:19 Changed 6 years ago by Dan Nixon

Fix Windows compile error

Refs #7860

Changeset: e96cf67c779b9b2a71a5c0101d423bd5b1c4cce9

comment:20 Changed 6 years ago by Dan Nixon

Temp removal of failing usage example

Refs #7860

Changeset: 2fd5ce03af13b68feb1ba5f1a9c038bad2d5d5d1

comment:21 Changed 6 years ago by Dan Nixon

Refactoring, fixed usage example

Refs #7860

Changeset: 1267f5ab25528e7fc20e955c4ded35e1b7e296fa

comment:22 Changed 6 years ago by Dan Nixon

Edited algo to act as intended

Refs #7860

Changeset: a134ee0513b4e13f9f9d9dcb9ce18d354830c8c4

comment:23 Changed 6 years ago by Dan Nixon

Fixed negative and positive edge finding

Refs #7860

Changeset: 9801cb6bcac49639a6188dc94ea57cc4138057b7

comment:24 Changed 6 years ago by Dan Nixon

Refactoring, restrict IDR UI to reduced files/ws

Refs #7860

Changeset: de5e53745c62a4fff2299c9dc1ea2ca502933ce3

comment:25 Changed 6 years ago by Dan Nixon

Refactor, fix issue with some sample workspaces

Some workspaces have differing numbers of array elements for X, Y and E values, just choose the samllest and trim the longer arrays

Refs #7860

Changeset: f695f9a5263be7d63a5d83f40c4d0861c70ff54a

comment:26 Changed 6 years ago by Dan Nixon

Added unit test, improved usage example

Refs #7860

Changeset: 8f76688d74471d3c930450859e3db4ef674ae267

comment:27 Changed 6 years ago by Dan Nixon

Added preview window to IDR:Symmetrise

Refs #7860

Changeset: 97cb4ba78c0ace867633b227f18c9b175a61ef79

comment:28 Changed 6 years ago by Dan Nixon

Added spectra range option, updated UI

Refs #7860

Changeset: 829ff5b887055cea0049f921f10315abe78051c9

comment:29 Changed 6 years ago by Dan Nixon

Fix compile issue with algorithm runner

Refs #7860

Changeset: 58fffdb3b1f8f31cd5b7477a636f501dc5637f86

comment:30 Changed 6 years ago by Dan Nixon

Merge branch 'feature/7860_indirect_symmetrise' into develop

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp

Refs #7860

Changeset: 2e37465a254cb657cb1112a0498d95fea640d131

comment:31 Changed 6 years ago by Dan Nixon

Remove need for algorithm runner for now

Refs #7860

Changeset: 7e2752fd43fa43aa2263d6abcb3be6aebe852860

comment:32 Changed 6 years ago by Dan Nixon

  • Blocked By 10092 added

Batch runner ticket replaces the standard algorithm runner, need Qt signal form either in the UI code.

comment:33 Changed 6 years ago by Dan Nixon

Added X min and max values to algorithm

Refs #7860

Changeset: f273d2357428d5b7e219fb873468d3a1c46ef01e

comment:34 Changed 6 years ago by Dan Nixon

Implemented X range selection, updated docs

Refs #7860

Changeset: 199578322228d8ba60f369ed2e2f2d16316a7cba

comment:35 Changed 6 years ago by Dan Nixon

Made symmetrise work as intended, updated docs

Refs #7860

Changeset: 754fdafff4c339b834c4e2bdf3b8b54e4bcf6c72

comment:36 Changed 6 years ago by Dan Nixon

Small refactoring, small docs change

Refs #7860

Changeset: aabc0c0189575328005e47a711eb86c8850577b0

comment:37 Changed 6 years ago by Dan Nixon

Made range selectors select X range, couple of fixes in alg

Refs #7860

Changeset: 35b8bec01d70839c04261d341e8350fce4f74788

comment:38 Changed 6 years ago by Dan Nixon

Small change to naming convention for symmetrise output

Refs #7860

Changeset: 5411426668626000502c9996db7921ef661a1ca3

comment:39 Changed 6 years ago by Dan Nixon

Merge branch 'feature/10092_sequential_async_algorithm_runner' into feature/7860_indirect_symmetrise

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp

Refs #7860

Changeset: ed27d521126d3643d2de9da576fda568e21fe4dd

comment:40 Changed 6 years ago by Dan Nixon

Switch Symmetrise to the batch algorithm runner

Refs #7860

Changeset: 88a06061c69d27422b3ceefdb3f48985d84fe39b

comment:41 Changed 6 years ago by Dan Nixon

Merge branch 'feature/7860_indirect_symmetrise' into develop

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp

Refs #7860

Changeset: 3529623105d2d10ee377294f8ce8f47b3b50ed0e

comment:42 Changed 6 years ago by Dan Nixon

Update unit test for last Symmetrise property change

Refs #7860

Changeset: 11ead26b73690d8cf3af2d51b1f3ad660d244c90

comment:43 Changed 6 years ago by Dan Nixon

FIx usage example for Symmetrise

Refs #7860

Changeset: 4171d9ece618d0b59fe02e46c65443e640624186

comment:44 Changed 6 years ago by Dan Nixon

Made Symmetrise crop to XMax

Refs #7860

Changeset: 7efc8f600cbac7c69f1b860979a8268edbb5be0f

comment:45 Changed 6 years ago by Dan Nixon

Small Symmetrise improvements, added validation checks to unit test

Refs #7860

Changeset: 79a58fb91fa1e3372d0786c466080142ca8375e3

comment:46 Changed 6 years ago by Dan Nixon

Give a more useful default E range

Refs #7860

Changeset: 650c0d4dc8545f3a6833f83bc63037abfe6f9191

comment:47 Changed 6 years ago by Dan Nixon

Fix a problem with Numpy types

Refs #7860

Changeset: e7499732a0bfb6dc4cadb7a031ac484f6cadcee3

comment:48 Changed 6 years ago by Dan Nixon

Fia failing unit tets

Refs #7860

Changeset: 5cf3dd682feb1123defa486d27dc81b226a2633f

comment:49 Changed 6 years ago by Dan Nixon

Second attempt at fixing the numpy type issue

Refs #7860

Changeset: 9becaa9b34ee4ab52bf5d8a97812dd7d6181ab44

comment:50 Changed 6 years ago by Dan Nixon

Corrected another numpy type issue

Refs #7860

Changeset: bbfab11a3701c931c5fc7046a8100d471f7a8754

comment:51 Changed 6 years ago by Dan Nixon

To test:

  • Ensure unit test is passing on all platforms
  • Open Indirect > Data Reduction > Symmetrise
  • Load either irs53665_graphite002_red.nxs or the attached dummy file
  • Try running the preview with several different EMin and EMax values, the input validation should keep abs(EMin) < abs(EMax) on both the range selectors and property trees.
  • Try changing the preview range using the X Range property
  • Ensure that the resulting workspace is symmetrical in curve shape and X range
Last edited 6 years ago by Dan Nixon (previous) (diff)

Changed 6 years ago by Dan Nixon

File for testing

comment:52 Changed 6 years ago by Dan Nixon

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

comment:53 Changed 6 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:54 Changed 6 years ago by Roman Tolchenov

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I noticed the following:

  • Entering negative values for EMin or EMax makes some vertical lines on the plot disappear.
  • EMax can be manually set smaller than EMin.
  • EMin and EMax shouldn't be allowed to take 0 values
  • Setting Spectrum No <= 0 or > max gives an unhandled exception.
  • X Range is allowed to be negative.

comment:55 Changed 6 years ago by Dan Nixon

  • Status changed from reopened to inprogress

Improved validation on Symmetrise algorithm

Refs #7860

Changeset: 5666d5af1bafafcd21cabe162973c36a38908982

comment:56 Changed 6 years ago by Dan Nixon

Added verification to manual ERange adjustment

Refs #7860

Changeset: e7d99d3e44392bbaf0359bc7cfb8d3055dc4c135

comment:57 Changed 6 years ago by Dan Nixon

Restrict XRange to be a positive value

Refs #7860

Changeset: 184069aad8f63c5d1f530e52ce0df61c0b0fb854

comment:58 Changed 6 years ago by Dan Nixon

Added better validation of EMin and EMax

Refs #7860

Changeset: 0ea7c4f2c2b09075c5654225e1ad5f64036916b3

comment:59 Changed 6 years ago by Dan Nixon

Additions to testing for algorithm:

  • Attempt to set an invalid spectra range (note the range is in spectra number, not spectra index)
  • Try setting various invalid ranges

Additions to testing for UI:

  • Try to set a negative X Range, it should set to the absolute value of whatever is entered
  • Set EMax to 1 and EMin to -0.2, EMin should be reset to -0.2 (absolute value of what was entered since value is still a valid range)
  • Set EMax to 1 and EMin to -1.2, EMin should be reset to 0.5 (abs(value) is still invalid so default to half of EMax
  • Set EMin to 0.5 and EMax to -0.8, EMax should be reset to 0.8
  • Set EMin to 0.5 and EMax to -0.2, EMax should be reset to 1
  • Try setting the Spectrum No to an invalid value (e.g. for IRIS data 2 or 54), it should default to the minimum spectra if entered value is lower and the the max spectra if higher.

comment:60 Changed 6 years ago by Dan Nixon

Add preview spectra validation

Refs #7860

Changeset: dedb36ae4b17d6a1d2f8ae7f815da7292f0e0192

comment:61 Changed 6 years ago by Dan Nixon

Fixed default spectra range issue, added more unit tests

Refs #7860

Changeset: bdecbc8f291bf5d99080117c514be2548aa7fbad

comment:62 Changed 6 years ago by Dan Nixon

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

comment:63 Changed 6 years ago by Dan Nixon

  • Blocking 10277 added

comment:64 Changed 6 years ago by Dan Nixon

Allow XMin to be zero

Refs #7860

Changeset: f7b5dc47002e8ced4790ca023482072b38640295

comment:65 Changed 6 years ago by Dan Nixon

  • Blocking 10382 added

comment:66 Changed 6 years ago by Dan Nixon

  • Blocking 10278 added

comment:67 Changed 6 years ago by Dan Nixon

  • Status changed from verify to reopened
  • Resolution fixed deleted

There be merge conflicts here.

comment:68 Changed 6 years ago by Dan Nixon

  • Status changed from reopened to inprogress

Merge branch 'master' into feature/7860_indirect_symmetrise

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/Symmetrise.py Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReduction.ui Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp Code/Mantid/scripts/Inelastic/IndirectSymm.py

Refs #7860

Changeset: 927ad0fb3836da731e1cee4665b4274ffe9b3974

comment:69 Changed 6 years ago by Dan Nixon

Copy X unit properly

Refs #7860

Changeset: 6a3bd52e77a41774dd999c44e438ffb5a6b0601f

comment:70 Changed 6 years ago by Dan Nixon

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

comment:71 Changed 6 years ago by Dan Nixon

Testing instructions are in comments 51 and 59.

comment:72 Changed 6 years ago by Dan Nixon

  • Blocking 10391 added

comment:73 Changed 6 years ago by Dan Nixon

  • Blocking 10306 added

comment:74 Changed 6 years ago by Roman Tolchenov

  • Status changed from verify to verifying

comment:75 Changed 6 years ago by Roman Tolchenov

  • Status changed from verifying to reopened
  • Resolution fixed deleted

EMin and EMax are allowed to take values outside the valid range. EMin,EMax == 0.55, 0.6 with irs53665_graphite002_red.nxs make the algorithm fail with an unclear error message.

comment:76 Changed 6 years ago by Dan Nixon

  • Status changed from reopened to inprogress

Better X range checking

Refs #7860

Changeset: bdeb6a25f216082747c2c70ccdae8e8bb1b09524

comment:77 Changed 6 years ago by Dan Nixon

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

comment:78 Changed 6 years ago by Harry Jeffery

  • Status changed from verify to verifying
  • Tester changed from Roman Tolchenov to Harry Jeffery

comment:79 Changed 6 years ago by Harry Jeffery

  • Status changed from verifying to closed

comment:80 Changed 6 years ago by Dan Nixon

Merge branch 'master' into feature/7860_indirect_symmetrise

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/Symmetrise.py

Refs #7860

Full changeset: 028182b106b5b09492ea793c1fd98b34b3241eda

comment:81 Changed 6 years ago by Dan Nixon

Merge branch 'feature/10092_sequential_async_algorithm_runner' into feature/7860_indirect_symmetrise

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp

Refs #7860

Full changeset: ed27d521126d3643d2de9da576fda568e21fe4dd

comment:82 Changed 6 years ago by Dan Nixon

Merge branch 'master' into feature/7860_indirect_symmetrise

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/Symmetrise.py Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReduction.ui Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp Code/Mantid/scripts/Inelastic/IndirectSymm.py

Refs #7860

Full changeset: 927ad0fb3836da731e1cee4665b4274ffe9b3974

comment:83 Changed 6 years ago by Harry Jeffery

Merge remote-tracking branch 'origin/feature/7860_indirect_symmetrise'

Full changeset: c5f9954aa6fdbf28789b085b5b41b05f9ac5adf4

comment:84 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8705

Note: See TracTickets for help on using tickets.