Skip to content
Snippets Groups Projects
Commit dd23bb62 authored by Campbell, Stuart's avatar Campbell, Stuart
Browse files

Starting afresh, initial skeleton of inelastic reducer. Non-functional - just...

Starting afresh, initial skeleton of inelastic reducer.  Non-functional - just committing for safety.  refs #2849
parent 9c5621bd
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment