Ticket #8617 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

ReflectometryReductionOneAuto

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 3.1
Component: Reflectometry Keywords:
Cc: Blocked By: #8371, #8520
Blocking: Tester: Karl Palmen

Description

Max feels quite strongly that we ought to have methods to grab existing IDF parameters and feed them into our new algorithms (#8371 ReduceReflectometryOne). This is the existing way that quick works. See quick and quick_explicit #8520.

A python algorithm would be ideal for this. We probably ought to mirror all the properties of ReflectometryReductionOne, but pick up any defaults that aren't specified from the IDF. This will make it possible to implement the new version of the reflectometry gui later, where options may or may not be provided by the user and they are otherwise expected to come from the IDF.

Change History

comment:1 Changed 7 years ago by Owen Arnold

  • Status changed from new to inprogress

refs #8617. New ReflectometryReductionOneAuto algorithm.

Changeset: 01c5a185776c448ce71f92f9e35d9d44c153512a

comment:2 Changed 7 years ago by Owen Arnold

refs #8617. ReflectometryReductionOneAuto refined and tested.

New tests using a base class to avoid duplication. Base class ensures that signature and behaviour of facade algorithm is exactly the same as the base one. In addition, additional tests check that the values supplied to the wrapped algorithm upon execution are what we would expect from the IDF.

Changeset: 1f37f939068cee8240735fa76a356193dbf810e3

comment:3 Changed 7 years ago by Owen Arnold

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

Tester: The following python code should produce two plots. The two curves in each plot should exactly match up. This feature is covered by quite extensive unit tests.

from mantid.simpleapi import *
from isis_reflectometry import quick
reload(quick)

class ReflectometryQuick(object):
  
    def runTest(self):
        defaultInstKey = 'default.instrument'
        defaultInstrument = config[defaultInstKey]
        
        config[defaultInstKey] = 'INTER'
        LoadISISNexus(Filename='13463', OutputWorkspace='13463')
        LoadISISNexus(Filename='13464', OutputWorkspace='13464')
        LoadISISNexus(Filename='13460', OutputWorkspace='13460')
    
        transmissionRuns = '13463'
        runNo = '13460'
        incidentAngle = 0.7
        
        # Use the new auto algorithm providing minimal info
        new_IvsQ1, new_IvsLam1, thetaOut1 = ReflectometryReductionOneAuto(InputWorkspace='13460', FirstTransmissionRun='13463')
        
        # Use the explicit algorithm suppling everything!
        new_IvsQ2, new_IvsLam2, thetaOut2 = ReflectometryReductionOne(InputWorkspace='13460', WavelengthMin=1.0, WavelengthMax=17.0, WavelengthStep=0.05, MonitorBackgroundWavelengthMin=15.0, 
        MonitorBackgroundWavelengthMax=17.0, I0MonitorIndex=2, MonitorIntegrationWavelengthMin=4.0, MonitorIntegrationWavelengthMax=10.0, WorkspaceIndexList=[3,4], FirstTransmissionRun='13463')
        
        plotSpectrum([new_IvsLam1, new_IvsLam2], [0])
        plotSpectrum([new_IvsQ1, new_IvsQ2], [0])
        
        
        
test = ReflectometryQuick()
test.runTest()


comment:4 Changed 7 years ago by Owen Arnold

Revert "refs #8617. ReflectometryReductionOneAuto refined and tested."

This reverts commit 1f37f939068cee8240735fa76a356193dbf810e3.

Changeset: 92a4205528842ed57a7e03af37c86edd58d451c3

comment:5 Changed 7 years ago by Owen Arnold

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:6 Changed 7 years ago by Owen Arnold

  • Status changed from reopened to inprogress

Revert "Revert "refs #8617. ReflectometryReductionOneAuto refined and tested.""

This reverts commit 92a4205528842ed57a7e03af37c86edd58d451c3.

Changeset: 87bc7a52ac4bd40aaa2d40c761c6ff78fa8a56c9

comment:7 Changed 7 years ago by Owen Arnold

Works on all platforms.

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 Karl Palmen

  • Status changed from verify to verifying
  • Tester set to Karl Palmen

comment:10 Changed 7 years ago by Karl Palmen

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Similar situation to test for #8616.

comment:11 Changed 7 years ago by Owen Arnold

There is no problem here (see my comment for #8616). Look closely, there are two identical curves on each plot.

comment:12 Changed 7 years ago by Owen Arnold

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

comment:13 Changed 7 years ago by Karl Palmen

  • Status changed from verify to verifying

comment:14 Changed 7 years ago by Karl Palmen

Test passes on similar technique as applied it #8616.

comment:15 Changed 7 years ago by Karl Palmen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8617_reduction_auto'

Full changeset: a97e8a765a1439cb59cfb686be105f3ee0aec355

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9461

Note: See TracTickets for help on using tickets.