Ticket #8789 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Matching Spectra in ReflectometryReductionOne

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 3.1
Component: Reflectometry Keywords:
Cc: Blocked By:
Blocking: Tester: Karl Palmen

Description

ReflectometryReductionOne has the ability to accept Transmission Workspaces for normalisation. The current behaviour is that the spectrum numbers are taken from the numerator workspace, and used to find and crop the correct spectra out of the denominator (transmission) workspace. If spectrum numbers cannot be found that match up, the algorithm exits without completing.

The behaviour requested by Tim Charlton is that we have an optional less-severe penalty for having mismatched spectrum numbers and allow the division to proceed on the basis of workspace index matching. This would be an optional switch, which would be On by default, and would still log a warning message that users could heed.

Switch would be something like 'StrictSpectrumChecking'. Users would have to actively disable it.

The code this will affect is in ReflectometryReductionOne, where createWorkspaceIndexListFromDetectorWorkspace is used.

Change History

comment:1 Changed 7 years ago by Owen Arnold

  • Status changed from new to inprogress
  • Priority changed from major to blocker

comment:2 Changed 7 years ago by Owen Arnold

refs #8789. New strict spectrum checking option.

Warn if turned off. Fail if turned on (default). Unit tests extended and updated for this feature.

Changeset: 8095434a103f43484ca723e3946c13e45adc6c6a

comment:3 Changed 7 years ago by Owen Arnold

Tester:

The following shows this working. With StrictSpectrumChecking=False, a warning is emitted indicating that the spectrum numbers between the transmission run and the detector run do not match up.

config['default.instrument'] = 'INTER'
trans1 = LoadISISNexus(Filename='13463', OutputWorkspace='13463')
trans2 = LoadISISNexus(Filename='13464', OutputWorkspace='13464')
run = LoadISISNexus(Filename='13460', OutputWorkspace='13460')
 
incidentAngle = 0.7

 
transmission = CreateTransmissionWorkspaceAuto(Params=[1.5, 0.02, 17],
                                           StartOverlap=10.0, 
                                           EndOverlap=12.0, 
                                           FirstTransmissionRun=trans1, 
                                           SecondTransmissionRun=trans2,
                                           ProcessingInstructions='1,2' # Deliberately doing someing bad here!
                                           )
                                           
                           
 
qOut, lamOut, thetaOut = ReflectometryReductionOneAuto(InputWorkspace=run, ThetaIn=incidentAngle, FirstTransmissionRun=transmission, StrictSpectrumChecking=False)
 

Now run the same script with the StrictSpectrumChecking=True. You should get a runtime error indicating that spectrum numbers do not match up.

Now run the same code, but delete the StrictSpectrumChecking option altogether. You should get the same behaviour as having it equal to True.

comment:4 Changed 7 years ago by Owen Arnold

refs #8789. Improve documentation.

Changeset: 2d6f6c0ba751da5f34b4e8a4086d54c8eb0beed8

comment:5 Changed 7 years ago by Owen Arnold

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

comment:6 Changed 7 years ago by Karl Palmen

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

comment:7 Changed 7 years ago by Karl Palmen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8789_spectra_matching_option'

Full changeset: 9f8ac1798b6d4522b19573ed0b2f1ee9beb7b69d

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9633

Note: See TracTickets for help on using tickets.