Ticket #8949 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Long log issue

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: major Milestone: Release 3.2
Component: SANS Keywords:
Cc: richard.heenan@… Blocked By:
Blocking: Tester: Jay Rainey

Description

  • Load file SANS2D13347
  • Open Sample logs
  • Execute this script
import ISISCommandInterface as ici
ici.SANS2D()
ici.MaskFile('MaskSANS2DReductionGUI.txt')
ici.AssignSample('13347')
print ' FRONT_DET_Z, FRONT_DET_X, FRONT_DET_ROT, REAR_DET_Z, REAR_DET_X'
print ici.ReductionSingleton().instrument.getDetValues(mtd['13347_sans_nxs'])

You will see that the logs that we consider are the first one rather than the last one, which is wrong. Because the last one is the one used to acquire data.

Change History

comment:1 Changed 7 years ago by Gesner Passos

This should fix:

diff --git a/Code/Mantid/scripts/SANS/isis_instrument.py b/Code/Mantid/scripts/SANS/isis_instrument.py
index 4a7eca5..a41153a 100644
--- a/Code/Mantid/scripts/SANS/isis_instrument.py
+++ b/Code/Mantid/scripts/SANS/isis_instrument.py
@@ -763,7 +763,7 @@ class SANS2D(ISISInstrument):
         for name in ('Front_Det_Z', 'Front_Det_X', 'Front_Det_Rot',
                      'Rear_Det_Z','Rear_Det_X'):
             try:
-                var = run_info.get(name).value[0]
+                var = run_info.get(name).value[-1]
                 values[ind] = float(var)
             except:
                 pass # ignore, because we do have a default value 

comment:2 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress

re #8949: Correct the issue of long logs in SANS2D

Changeset: 3f18e75bdb7409b0946e00c72326d34fbb8e56c0

comment:3 Changed 7 years ago by Gesner Passos

Tester:

The description explains how to see the issue. It should have been removed.

comment:4 Changed 7 years ago by Gesner Passos

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

comment:5 Changed 7 years ago by Jay Rainey

  • Status changed from verify to verifying
  • Tester set to Jay Rainey

comment:6 Changed 7 years ago by Jay Rainey

  • Status changed from verifying to closed

Simple ticket to test. I ran the provided script to see the problem, and again after to see it resolved. The last log value is now used.

comment:7 Changed 7 years ago by Jay Rainey

Merge remote-tracking branch 'origin/bugfix/8949_long_log'

Full changeset: 7e7f35eb9f8f3f7883e9b69918f9ee712bc96fbf

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9792

Note: See TracTickets for help on using tickets.