Ticket #7404 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Move REFreduction to new API

Reported by: Jean Bilheux Owned by: Jean Bilheux
Priority: blocker Milestone: Release 3.0
Component: Reflectometry Keywords:
Cc: Blocked By:
Blocking: #7690 Tester: Mathieu Doucet

Description


Change History

comment:1 Changed 7 years ago by Jean Bilheux

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Mathieu Doucet

  • Priority changed from major to blocker
  • Component changed from Framework to Reflectometry

Propagating the priority level of the original ticket from which this one was created.

comment:3 Changed 7 years ago by Mathieu Doucet

Here is the list of places in reflectometry code that are left with a MantidFramework import after ticket #6577.

  • PythonAPI/RefLReduction.py - in addition, this should be moved to PythonInterface. It should only be in one place.
  • scripts/Interface/reduction_gui/reduction/reflectometer/refl_reduction.py only produces API v1 scripts. It should provide API v2 code by default for release 2.6.
  • Same thing for scripts/Interface/reduction_gui/reduction/reflectometer/refl_sf_calculator.py
  • Same thing for scripts/Interface/reduction_gui/widgets/base_ref_reduction.py
  • scripts/Interface/reduction_gui/widgets/refl_data_simple.py is importing MantidFramework.
  • scripts/Interface/reduction_gui/widgets/refl_reduction.py is importing MantidFramework.
  • scripts/Interface/reduction_gui/widgets/stitcher.py is importing MantidFramework.
  • scripts/reduction/instruments/reflectometer/wks_utility.py is importing MantidFramework. It should also be moved away from scripts/reduction as this reduction framework will disappear with the API v1.
  • PythonAPI/sfCalculator.py should be moved to PythonInterface. It should only be in one place.

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from accepted to assigned

comment:5 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:6 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Release 3.0

comment:7 Changed 7 years ago by Jean Bilheux

  • Status changed from new to inprogress

Moved RefLReduction to new api. Running reduction crash but maybe due to my computer...need to test it somewhere else. This refs #7404

Changeset: 2b474012abcae8317cdd5a5b2f422867be9d9437

comment:8 Changed 7 years ago by Jean Bilheux

Removed old algo. This refs #7404

Changeset: 0c9a7397a9c721839d8d68b820e2d7e80b701b6b

comment:9 Changed 7 years ago by Jean Bilheux

Another step that makes me closer to having code running with new API. This refs #7404

Changeset: 24f5999d3f634605ce423f2298ea70e025c441eb

comment:10 Changed 7 years ago by Martyn Gigg

Move helper file for REFLReduction to new algorithms area.

Fixes windows builds. Refs #7404

Changeset: 299bb448b11e8a9a6f077c3173b9486eacb11156

comment:11 Changed 7 years ago by Martyn Gigg

Copy back the helper file to old location until old alg is removed

Refs #7404

Changeset: bb748dcb14b4e7f9fc74879dc5ad38a9322cda3a

comment:12 Changed 7 years ago by Jean Bilheux

Removed temporary the system test for the SNS liquids reflectometer reduction. This refs #7404

Changeset: 5989298f2a24ae6bd403734ec1fe773fed7786a7

comment:13 Changed 7 years ago by Jean Bilheux

Finally made the reduction working using the new API. This refs #7404

Changeset: de961966f3ce8400aa7a8773bbaae4552bef2c40

comment:14 Changed 7 years ago by Jean Bilheux

Changed reduction and will ask IS to test and run it. This refs #7404

Changeset: 39c11158a334b489110c581c7b1c633941a9a0e6

comment:15 Changed 7 years ago by Gesner Passos

  • Blocking 7690 added

comment:16 Changed 7 years ago by Jean Bilheux

Changed the way the sfCalculator module is called. This refs #7404

Changeset: 6a5dbe6ef3bb2f4d533ef9f8e21ae2238cb8f49b

comment:17 Changed 7 years ago by Jean Bilheux

Removed obsolete files. This refs #7404

Changeset: d36b70657069641caf566cab8384ce225f31c32f

comment:18 Changed 7 years ago by Jean Bilheux

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

comment:19 Changed 7 years ago by Russell Taylor

Jean - your branch under this ticket in the system tests repository simply removes the test. What's the plan here?

comment:20 Changed 7 years ago by Mathieu Doucet

  • Status changed from verify to verifying
  • Tester set to Mathieu Doucet

comment:21 Changed 7 years ago by Mathieu Doucet

  • Status changed from verifying to reopened
  • Resolution fixed deleted

The following issues were found and will be dealt with in ticket #7821:

  • Started the REFL Reduction UI and entered run 70977 in the Data Set Run number field.
  • I then get the following:
    • The Y vs TOF (2D) button doesn't work and generates the following error:
      Traceback (most recent call last):
        File "/home/m2d/git/mantid_branch/Code/Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/base_ref_reduction.py", line 937, in _plot_data_count_vs_tof_2d
          self.ref_det_view = mantidqtpython.MantidQt.RefDetectorViewer.RefMatrixWSImageView(ws_output_base, peak_min, peak_max, back_min, back_max, tof_min, tof_max)
      Exception: unknown
      
    • Clicking the TOF distribution button doesn't do anything (no errors reported either).
    • Unchecking the "Apply normalization" checkbox doesn't work, it still complains that I don't have a normalization run when I hit reduce.
      Error in execution of algorithm RefLReduction:
      RefLReduction: could not find run 0
      Add your data folder to your User Data Directories in the File menu
        at line 628 in '/home/m2d/git/mantid_branch/Code/Mantid/Framework/PythonInterface/plugins/algorithms/RefLReduction.py'
      RuntimeError: RefLReduction: could not find run 0
      Add your data folder to your User Data Directories in the File menu
        at line 628 in '/home/m2d/git/mantid_branch/Code/Mantid/Framework/PythonInterface/plugins/algorithms/RefLReduction.py'
        at line 41 in '<Interface>'
        caused by line 45 in '/home/m2d/mantid_build/branch/bin/mantidsimple.py'
      
Last edited 7 years ago by Mathieu Doucet (previous) (diff)

comment:22 Changed 7 years ago by Mathieu Doucet

  • Status changed from reopened to verify
  • Owner changed from Jean Bilheux to Mathieu Doucet
  • Resolution set to fixed

I loaded files and tried both the REFLReduction and sf_calculator UIs. It's hard to understand how to use those UIs, which limits the amount of testing I can reasonably do. Apart from the major issues above, which appear to be unrelated to the API change (which was the scope of this ticket), the reduction runs and doesn't complain. I assume that this is the expected behavior. I didn't see API v1 code apart from commented lines. Those should be cleaned up.

comment:23 Changed 7 years ago by Mathieu Doucet

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:24 Changed 7 years ago by Mathieu Doucet

Oops. Hit 'fixed' by mistake.

comment:25 Changed 7 years ago by Jean Bilheux

  • Owner changed from Mathieu Doucet to Jean Bilheux
  • Status changed from reopened to verify
  • Resolution set to fixed

comment:26 Changed 7 years ago by Mathieu Doucet

  • Status changed from verify to verifying

comment:27 Changed 7 years ago by Mathieu Doucet

  • Status changed from verifying to closed

comment:28 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8250

Note: See TracTickets for help on using tickets.