Ticket #8733 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Refl_gui Improvements - Polarisation Corrections

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

Description

The polarisation correction's combobox doesn't do anything at present. It needs connecting to the appropriate part of quick.

Change History

comment:1 Changed 7 years ago by Keith Brown

It appears i might have to alter quick a bit.

The plan is the connect the index of the combobox directly to quick. So the enum will have to change from 3 being none to 0 being none, that way it will be classed as false for any boolean checks.

comment:2 Changed 7 years ago by Owen Arnold

  • Owner changed from Keith Brown to Owen Arnold

comment:3 Changed 7 years ago by Owen Arnold

Tester: This code has been provided last minute by a user, we haven't had much option other than to just insert it into their existing scripts, and they know that it will be up to them to verify the data produced by these optional routines.

Here's the suggested testing procedure.

Check that the right code is being called in quick. Running this should log and print to the console Performing PNR correction

from isis_reflectometry import quick
reload(quick)
run_1 = Load('POLREF00008481.nxs')
run_2 = Load('POLREF00008481.nxs')

runs = GroupWorkspaces(InputWorkspaces='run_1, run_2')

out = quick.quick(run=runs, theta=0.4, detector_component_name='lineardetector', polcorr=1, correct_positions=False  )

Running this should log and print to the console Performing PA correction

from isis_reflectometry import quick
reload(quick)
run_1 = Load('POLREF00008481.nxs')
run_2 = Load('POLREF00008481.nxs')
run_3 = Load('POLREF00008481.nxs')
run_4 = Load('POLREF00008481.nxs')

runs = GroupWorkspaces(InputWorkspaces='run_1, run_2, run_3, run_4')

mytemp = SumSpectra(InputWorkspace=runs, StartWorkspaceIndex=3, EndWorkspaceIndex=644)

out = quick.quick(run=runs, theta=0.4, detector_component_name='lineardetector', polcorr=2, correct_positions=False  )

All of the calls to quick below, should report No Polarisation correction requested.

from isis_reflectometry import quick
reload(quick)
run = Load('POLREF00008481.nxs')

out = quick.quick(run=run, theta=0.4, detector_component_name='lineardetector', polcorr=3, correct_positions=False  )
out = quick.quick(run=run, theta=0.4, detector_component_name='lineardetector', polcorr=False, correct_positions=False  )
out = quick.quick(run=run, theta=0.4, detector_component_name='lineardetector', polcorr=0, correct_positions=False  )

comment:4 Changed 7 years ago by Owen Arnold

  • Status changed from new to inprogress

refs #8733. Intermediate changes made. Quick working.

Working well in Quick, but not via the GUI. This is because the GUI uses hard-coded names which make life really really hard! So i'm trying to work around this for now. Not complete yet.

The Parameter file does not get picked up for the newer POLREF IDF, so I am having to add a new one that will be picked up. I have a ticket open where we will completely replace the IDFs, at that point, I can delete this parameter file.

Changeset: ff81622e180dda8f78a09cbd6d956ed3409971e3

comment:5 Changed 7 years ago by Owen Arnold

refs #8733. Polarisation corrections hooked in.

This still isn't up to the standard that I would like, but given time constraints, I'm only going to be able to do a little refactoring around these changes.

Changeset: 198fbbe13f392f74d016519f25e7d869f5d3327d

comment:6 Changed 7 years ago by Owen Arnold

refs #8733. Extract to methods.

I have very limited time for refactoring this, and we are going to kill this gui completely anyway in the next release.

Changeset: 68a69276c8289b57b80ec42dc041c1e1cf47f71f

comment:7 Changed 7 years ago by Owen Arnold

refs #8733. Merge master in and fix conflicts on branch.

Merge branch 'master' into feature/8733_polarisation_correction_gui

Conflicts:

Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py Code/Mantid/scripts/Reflectometry/isis_reflectometry/quick.py

Changeset: bcfe764f46a3d90ec2fb119d36dd6de0ae4cf970

comment:8 Changed 7 years ago by Owen Arnold

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

comment:9 Changed 7 years ago by Keith Brown

  • Status changed from verify to verifying
  • Tester set to Keith Brown

comment:10 Changed 7 years ago by Owen Arnold

  • Blocking 8788 added

comment:11 Changed 7 years ago by Owen Arnold

  • Blocking 8788 removed

(In #8788) Not sure what change in master has cased this, but no longer getting errors running the script example.

comment:12 Changed 7 years ago by Owen Arnold

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Fixes need to be made to this.

comment:13 Changed 7 years ago by Owen Arnold

  • Status changed from reopened to inprogress

refs #8733. fix naming error.

Changeset: 0ecab363db2c8f959e1d6cc00cbce5ae4fd3689b

comment:14 Changed 7 years ago by Owen Arnold

refs #8733. Check existance before deletion.

When we have group workspaces, if the parent group workspace is deleted first, then it will also remove the children. If that happens, the names previously fetched (which also include the childeren) may be invalid. Checking each workspace before deletion will avoid the invalid delete.

Changeset: 5f5e2652c284af0e56c300ef28d0e17d2b9eea20

comment:15 Changed 7 years ago by Owen Arnold

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

Tester. Try passing one of the sub workspaces from 'CSP85423.nxs' through the reflectometry gui. Use 1 for angle and 0.01 for dq/q. Should complete to the point of plotting.

comment:16 Changed 7 years ago by Keith Brown

  • Status changed from verify to verifying

comment:17 Changed 7 years ago by Keith Brown

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8733_polarisation_correction_gui'

Full changeset: 0bf9b940ba480ba3596a69ecc915c5e14f5e09b2

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9577

Note: See TracTickets for help on using tickets.