Ticket #8633 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Refl_gui Improvements - New save window

Reported by: Keith Brown Owned by: Keith Brown
Priority: critical Milestone: Release 3.1
Component: Reflectometry Keywords:
Cc: Blocked By:
Blocking: #7377, #8584 Tester: Owen Arnold

Description

Max has made a new save window that does more than the old one. For now it's being included in it's current state.

A separate ticket will be made to convert it to a ui file and corresponding functionality file. This ticket is literally getting it tied into the gui.

Change History

comment:1 Changed 7 years ago by Keith Brown

  • Status changed from new to inprogress

Refs #8633. Save dialog inplace

Max's save dialog is now in placecas is. Converting it to a porper UI and making some improvements will be done in another ticket

To Tester

Make sure this save works for all formats

Changeset: fb44afc8d429bb153341c8a7562cae13e5e6e977

comment:2 Changed 7 years ago by Keith Brown

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

comment:3 Changed 7 years ago by Keith Brown

In order to test this you'll need to load a tbl file into the gui and process it, then use File -> Save Workspaces to run max's save functions.

comment:4 Changed 7 years ago by Keith Brown

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:5 Changed 7 years ago by Keith Brown

  • Status changed from reopened to inprogress

Refs #8633. Changed search to use xml and a fixed cycle depth

The search now uses xml again and is fixed to 1 cycle into the past (although this will be fixed to a spinbox in another ticket to allow the user to set how many cycles into the past they want to search)

Changeset: 8328f140d06a78b7b24d3a1c48e168881b7e2fdb

comment:6 Changed 7 years ago by Keith Brown

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

committed to wrong ticket. previous commit should reference #8560

comment:7 Changed 7 years ago by Keith Brown

Originally wrongly committed against #8560, should have been committed against this ticket

Refs #8560. Updated for the new API

The provided file used the old API. The code has been updated to use the new API.

The file also needed some global functions defined in it too

Changeset: 90aae6526aa6caa6349a993cc04ccb75a0d479d8

Last edited 7 years ago by Keith Brown (previous) (diff)

comment:8 Changed 7 years ago by Keith Brown

  • Blocking 8584 added

comment:9 Changed 7 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:10 Changed 7 years ago by Owen Arnold

I get the following error when opening the save dialog:

  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py", line 46, in on_buttonProcess_clicked
    self.process()
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py", line 254, in process
    [theta, qmin, qmax] = self.dorun(runno[i], row, i)
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py", line 344, in dorun
    [wlam, wq, th] = quick(runno, trans=transrun, theta=angle)
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Reflectometry/isis_reflectometry/quick.py", line 60, in quick
    run_ws = ConvertToWavelength.to_workspace(run)
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Reflectometry/isis_reflectometry/convert_to_wavelength.py", line 28, in to_workspace
    workspace = msi.Load(Filename=candidate)
  File "/Users/spu92482/mantidbuild/bin/mantid/simpleapi.py", line 91, in Load
    algm.setProperty('Filename', filename) # Must be set first
ValueError: Invalid value for property Filename (list of str lists) "13470": Unable to find file matching the string "INTER00013470", even after appending suggested file extensions.
Division by zero: the RHS workspace is a single-valued workspace with value zero.
Division by zero: the RHS workspace is a single-valued workspace with value zero.
Division by zero: the RHS workspace is a single-valued workspace with value zero.
Traceback (most recent call last):
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py", line 60, in on_actionSave_Workspaces_triggered
    self.saveWorkspaces()
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py", line 466, in saveWorkspaces
    u.setupUi(Dialog)
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_save.py", line 194, in setupUi
    self.populateList()
  File "/Users/spu92482/Documents/mantid_testing/mantid/Code/Mantid/scripts/Interface/ui/reflectometer/refl_save.py", line 238, in populateList
    tree1=xml.parse(r'\\isis\inst$\NDX'+currentInstrument+'\Instrument\logs\journal\journal_main.xml')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1177, in parse
    tree.parse(source, parser)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 646, in parse
    source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '\\\\isis\\inst$\\NDXINTER\\Instrument\\logs\\journal\\journal_main.xml'

Probably due to hardcoded windows paths. using the settings module for this type of functionality instead.

comment:11 Changed 7 years ago by Keith Brown

Refs #8633. Removed windows paths. Now uses settings.xml

The fail was becasue there had been hard coded paths put in, and they were windows paths to boot.

The function now relys on a settings.xml file

Changeset: c61adbc7a6b32c07a8d4fdc5e464e52e8820aec2

comment:12 Changed 7 years ago by Keith Brown

Refs #8633. Updated to use the new API and fail gracefully

There is now a 'directory exists' check on the directory given to the textbox.

Added the procedures script, as the save was reliant on it.

Updated the save and procedures scripts to use the new api

Changeset: 2ec83fe813f07d116b81c3f479a19c9b3cc7312c

comment:13 Changed 7 years ago by Keith Brown

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:14 Changed 7 years ago by Keith Brown

  • Status changed from reopened to inprogress

comment:15 Changed 7 years ago by Keith Brown

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

comment:16 Changed 7 years ago by Owen Arnold

  • Status changed from verify to verifying

comment:17 Changed 7 years ago by Owen Arnold

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8633_Refl_gui_new_save_window'

Full changeset: db0317c05036071f338946894b11b073a38178c1

comment:18 Changed 7 years ago by Owen Arnold

This was existing functionality that Keith had had to quickly refactor and reintroduce. Saving seems to complete on all the target formats.

comment:19 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9477

Note: See TracTickets for help on using tickets.