Skip to content

Commit

Permalink
SANS command: allow DET/CORR/FRONT/RADIUS x. re #5060
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders-Markvardsen committed Apr 5, 2012
1 parent cc6bd8d commit d591459
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Code/Mantid/scripts/SANS/isis_reduction_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1866,10 +1866,25 @@ def _read_mon_line(self, details, reducer):
return 'Unable to parse monitor line: '

def _readDetectorCorrections(self, details, reducer):
values = details.split()
det_name = values[0]
det_axis = values[1]
shift = float(values[2])
"""
Handle user commands of the type DET/CORR/FRONT/RADIUS x
@param details: the contents of the line after DET/CORR
@param reducer: the object that contains all the settings
"""
if details[0]=='/':
details = details.lstrip('/')
values = details.split()
if '/' in values[0]:
# assume notation is e.g. FRONT/RADIUS x
values2 = values[0].split('/')
det_name = values2[0]
det_axis = values2[1]
shift = float(values[1])
else:
# assume notation is e.g. FRONT RADIUS x
det_name = values[0]
det_axis = values[1]
shift = float(values[2])

detector = reducer.instrument.getDetector(det_name)
if det_axis == 'X':
Expand Down

0 comments on commit d591459

Please sign in to comment.