Ticket #8057 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Remove LoadDetectorInfo from DirectEnergyConversion.py script

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 3.0
Component: Direct Inelastic Keywords:
Cc: Alex.Buts@… Blocked By:
Blocking: Tester: Alex Buts

Description

The algorithm does the following:

  • updates detector positions based on input file positions;
  • sets component parameters for the tube pressure & wall thickness and
  • adjusts X bins by a detector delay time.

This behaviour needs splitting up. The tube pressure, wall thickness should be in the instrument definition (much as the SNS instruments do now), along with the detector delay time. The UpdateInstrumentFromFile algorithm already accepts RAW,ISIS Nexus and others. It simply needs extending to read the block from an ISIS event nexus file.

Change History

comment:1 Changed 7 years ago by Martyn Gigg

  • Summary changed from Remove LoadDetectorInfo from Direct Energy Conversion to Remove LoadDetectorInfo from DirectEnergyConversion.py script

comment:2 Changed 7 years ago by Martyn Gigg

  • Status changed from new to inprogress

Make DetectorEfficiencyCor search recursively for parameters.

Refs #8057

Changeset: 62ffe7bac8f5ec8c43874988bec724fdcb89ea79

comment:3 Changed 7 years ago by Martyn Gigg

Allow ScaleX to take its factor from an instrument parameter.

Improved unit test coverage at the same time as there were no tests for the EventWorkspace case. Refs #8057

Changeset: a53ac3aaea9b134638aced0a05819fdba0c7af1d

comment:4 Changed 7 years ago by Martyn Gigg

Add a performance test for parameter lookup in ParameterMap

Refs #8057

Changeset: fa32ca131e42e54311ab88219b2f203bd728781f

comment:5 Changed 7 years ago by Martyn Gigg

Code cleanup in ParameterMap.cpp.

  • Removed const char methods that are better done by making the constructing

the string once in the calling code.

  • Removed commented out code that polluted the cpp file.
  • Reordered methods that match declaration order.

Refs #8057

Changeset: c8a67317c31189bd0bf598856dc8544d1e20383e

comment:6 Changed 7 years ago by Martyn Gigg

Improve the ParameterMap recursive searching code.

Avoids instantiation of separate shared pointer & custom deleter. Refs #8057

Changeset: 061b18fc2e61f4ee2949da225db2362afcd553cf

comment:7 Changed 7 years ago by Martyn Gigg

UpdateInstrumentFromFile supports .dat files natively.

The header can still be overridden using the AsciiHeader property. Refs #8057

Changeset: 1101288db9bf9e76bd7245cff43eb2fe8a2771bf

comment:8 Changed 7 years ago by Martyn Gigg

Improve code in DetectorEfficiencyCor

  • Define static variables for pressure/thickness parameters
  • Avoid copy on getDetectorIDs
  • Pass shared pointer by reference
  • Use list for accumulating invalid spectra
  • Invalid shape now throws NotFoundError
  • Remove raw file and LoadDetectorInfo usage from unit test. It was adding no benefit over what could be testing with a simple in-memory workspace.

Refs #8057

Changeset: 17c70bae9c5fedaf495f9621685fac57afa75035

comment:9 Changed 7 years ago by Martyn Gigg

Add some debugging statements to GetEi2.

Refs #8057

Changeset: 7c41d2df89dffa78216d708aa4cfd606400548c9

comment:10 Changed 7 years ago by Martyn Gigg

Allow dgreduce to work with an input workspace and no cal file.

This assumes the calibration has already been applied to the input workspace and allows it to be done once. Refs #8057

Changeset: 8f9645724f0ed8b9733a090b4a06c8f35b0453fb

comment:11 Changed 7 years ago by Martyn Gigg

Add pressure/thickness/delay time parameters to definition files.

Their names have been changed to make them more consistent with those used by other direct geometry instruments that already had these parameters in files:

  • 3He(atms)->TubePressure
  • wallT(m)->TubeThickness

The DirectEnergyConversion scripts now apply the calibration straight after loading and pick up the detector parameters from the IDF files, removing the need for the LoadDetectorInfo algorithm.

Refs #8057

Changeset: 4fddadd95dad23805fad677397bd0df3bb1f21b1

comment:12 Changed 7 years ago by Martyn Gigg

Update ISIS direct inelastic system test results.

Minor changes due to precision of new instrument parameters. Refs #8057

Changeset: 537a3de9dd2b5faab538b34d911e18744b5699e6

comment:13 Changed 7 years ago by Martyn Gigg

Add NULL component pointer check to ParameterMap::get

Refs #8057

Changeset: 74c23e103c26de6cdbc1203063f3b7a6b968526e

comment:14 Changed 7 years ago by Martyn Gigg

Fix test for existing workspace in dgreduce.py

Refs #8057

Changeset: d0d1510ff3e96a888e23625b29061d49fb305c7c

comment:15 Changed 7 years ago by Alex Buts

  • Cc Alex.Buts@… added

comment:16 Changed 7 years ago by Martyn Gigg

Allow dgreduce to apply calibration to pre-loaded workspace.

Refs #8057

Changeset: 43fb1b8b54d51f1b6466775f28db21c5cc55cd19

comment:17 Changed 7 years ago by Martyn Gigg

Put back calibration argument in LETReduction test.

Refs #8057

Changeset: dbd7b2cba96d93aaab018e59502ec4856c6c8d03

comment:18 Changed 7 years ago by Martyn Gigg

UpdateInstrumentFromFile now accepts ISIS Event Nexus files.

Refs #8057

Changeset: 6ca216ac85d64d46855fb547e82c47ec87bdbbe9

comment:19 Changed 7 years ago by Martyn Gigg

Add a Combine option to ScaleX

This allows a factor from an instrument parameter to be combined with an overall input factor from the algorithm property. This can be useful for combining two ScaleX operations together to only loop over the data once. Refs #8057

Changeset: f29e043bc2bfe2cceeb7a8d2512c5fb6fd9cc4a5

comment:20 Changed 7 years ago by Martyn Gigg

Combine the detector delay offset into the monitor offset.

Refs #8057

Changeset: ba7e1e5884249a4ca15155a7e49aec3d07f7b3c6

comment:21 Changed 7 years ago by Martyn Gigg

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

Branch: feature/8057_remove_loaddetectorinfo_dec in BOTH code and systemtests repositories

Tester: The first thing to check is that LoadDetectorInfo has been deleted from the DirectEnergyConversion scripts. I have not touched DgsReduction as I feel that we may as well do that when we attempt the to it next release.

Things that have changed:

  • MARI,MERLIN,MAPS,LET instrument definitions now all have parameters for delay time, wall thickness & tube pressure. Their names match those used by the SNS instruments
  • The ScaleX algorithm has been updated to combine offsetting the X values using the delay time & shifting due to putting the monitor at t=0
  • The calibration has been shifted to be applied at the point the files are either loaded or the existing workspace pulled from the ADS in Inelastic/CommonFunctions.py. This should allow the calibration to be applied once outside the reducer and then not applied again. by setting the reducer calib argument to None.

The system test results shifted by ~1e-7 which is why new reference results were needed. The result of moving the location of the pressure/wall thickness parameters has reduced the size of the ParameterMap significantly and resulted in smaller processed files.

comment:22 Changed 7 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:23 Changed 7 years ago by Alex Buts

  • Status changed from verifying to closed

Merge branch 'feature/8057_remove_loaddetectorinfo_dec'

Full changeset: 7bff58ace35899aee71a7301d14c435a843f541a

comment:24 Changed 7 years ago by Alex Buts

Merge remote-tracking branch 'origin/feature/8057_remove_loaddetectorinfo_dec'

Full changeset: 669e10311c09454ee1d8ec3be6269c2f0d1f29cf

comment:25 Changed 7 years ago by Alex Buts

Change to system tests reference results causes substantial concern, but I can not find anything wrong with the changes. Moreover, it looks like the initial reduction was not working correctly, at least in the situations where the relative change values exceeds 1e-4.

Rob (LET) agrees that changes are acceptable. Still have to discuss it with Jon and Russell. MERLIN's changes fall within 10-4 relative error limit.

comment:26 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Direct Inelastic

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8902

Note: See TracTickets for help on using tickets.