From dd23bb620be888aff972f7323ded44af574106f7 Mon Sep 17 00:00:00 2001
From: Stuart Campbell <campbellsi@ornl.gov>
Date: Fri, 8 Jul 2011 18:54:49 +0000
Subject: [PATCH] Starting afresh, initial skeleton of inelastic reducer. 
 Non-functional - just committing for safety.  refs #2849

---
 .../inelastic/inelastic_reducer.py            | 70 ++++++++++++++++++-
 1 file changed, 69 insertions(+), 1 deletion(-)

diff --git a/Code/Mantid/scripts/reduction/instruments/inelastic/inelastic_reducer.py b/Code/Mantid/scripts/reduction/instruments/inelastic/inelastic_reducer.py
index 557e52ae7d3..3e87bfe5fcf 100644
--- a/Code/Mantid/scripts/reduction/instruments/inelastic/inelastic_reducer.py
+++ b/Code/Mantid/scripts/reduction/instruments/inelastic/inelastic_reducer.py
@@ -8,14 +8,74 @@ from reduction import Reducer
 # It also does minimal type checking to ensure that the object that is passed is valid
 from reduction import validate_step
 from mantidsimple import *
-mtd.initialise()
 
 class InelasticReducer(Reducer):
+    """
+        Inelastic-specific implementation of the Reducer
+    """
     
+    ## Data loader
     _data_loader = None
     
+    ## Apply Ki/Kf correction
+    _kikf_corrector = None
+    
+    ## Detector Efficiency
+    _detector_efficiency_corrector = None
+    
+    ## Background subtraction
+    _background_subtractor = None
+    
+    ## Masking
+    _masker = None
+    
+    ## Save NXSPE file
+    _nxspe_saver = None
+    
+    ## Save Mantid NeXus file
+    _save_mantid_nexus = None
+    
+    ## Save SPE file 
+    _save_spe = None
+    
+    
+    
     def __init__(self):
         super(InelasticReducer, self).__init__()
+    
+    
+    def set_data_loader(self, loader):
+        """
+            Set the algorithm to load the data files
+            @param loader: Workflow algorithm object
+        """ 
+        self._data_loader = loader
+
+    def set_kikf_correction(self, corrector):
+        """
+            Set the step that will apply the Ki/Kf scaling correction
+        """
+        self._kikf_corrector = corrector
+
+
+    def set_detector_efficiency(self, corrector):
+        """
+            Set the step that will apply the detector efficiency correction
+        """
+        self._detector_efficiency_corrector = corrector
+
+
+    def set_background_subtractor(self, subtractor):
+        """
+            Set the step that will apply the Ki/Kf scaling correction
+        """
+        self._background_subtractor = subtractor
+
+    def set_masker(self, masker):
+        """
+            Set the step that will apply the mask
+        """
+
         
     def pre_process(self): 
         """
@@ -24,6 +84,14 @@ class InelasticReducer(Reducer):
         if self._data_loader is not None:
             self.append_step(self._data_loader) 
 
+
+#    def _absolute_norm_steps(self):
+#        """
+#            Creates a list of steps for each data set in the 
+#            processing queue in order to calculate the absolute units.
+#        """
+        
+
 if __name__ == '__main__':  
     # Instantiate the Reducer object
     r = InelasticReducer()
-- 
GitLab