Skip to content

Commit

Permalink
re #8435: Ensure geometry correction gets the correct information
Browse files Browse the repository at this point in the history
  • Loading branch information
gesnerpassos committed Nov 14, 2013
1 parent 4ead550 commit eb0beb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Code/Mantid/scripts/SANS/isis_reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ def _init_steps(self):
self.to_Q = isis_reduction_steps.ConvertToQISIS(
self.prep_normalize)
self._background_subtracter = isis_reduction_steps.CanSubtraction()
self.geometry_correcter = sans_reduction_steps.SampleGeomCor(
self._sample_run.geometry)
self.geometry_correcter = sans_reduction_steps.SampleGeomCor()
# self._zero_error_flags=isis_reduction_steps.ReplaceErrors()
self._rem_nans = sans_reduction_steps.StripEndNans()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,23 +750,12 @@ class SampleGeomCor(ReductionStep):
ORNL only divides by thickness, in the absolute scaling step
"""
def __init__(self, geometry):
"""
Takes a reference to the sample geometry
@param geometry: A GetSampleGeom object to load the sample dimensions from
@raise TypeError: if an object of the wrong type is passed to it
"""
super(SampleGeomCor, self).__init__()

if issubclass(geometry.__class__, GetSampleGeom):
self.geo = geometry
else:
raise TypeError, 'Sample geometry correction requires a GetSampleGeom object'

def execute(self, reducer, workspace):
"""
Divide the counts by the volume of the sample
"""
self.geo = reducer._sample_run.geometry
assert( issubclass(self.geo.__class__, GetSampleGeom))

try:
if self.geo.shape == 'cylinder-axis-up':
Expand Down

0 comments on commit eb0beb1

Please sign in to comment.