Skip to content

Commit

Permalink
re #8505: Creation of the SliceEvent step.
Browse files Browse the repository at this point in the history
  • Loading branch information
gesnerpassos committed Nov 28, 2013
1 parent b3d25d1 commit 6f4e9ad
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Code/Mantid/scripts/SANS/isis_reduction_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
sanslog = sans_reduction_steps.sanslog

from mantid.simpleapi import *
from mantid.api import WorkspaceGroup, Workspace
from mantid.api import WorkspaceGroup, Workspace, IEventWorkspace
from SANSUtility import (GetInstrumentDetails, MaskByBinRange,
isEventWorkspace, fromEvent2Histogram,
getFilePathFromWorkspace, getWorkspaceReference)
Expand Down Expand Up @@ -1588,6 +1588,20 @@ def set_range(self, w_low = None, w_high = None):
def __str__(self):
return ' Wavelength range: ' + self.get_rebin()

class SliceEvent(ReductionStep):

def __init__(self):
super(SliceEvent, self).__init__()

def execute(self, reducer, workspace):
ws_pointer = getWorkspaceReference(workspace)

# it applies only for event workspace
if not isinstance(ws_pointer, IEventWorkspace):
return

hist = fromEvent2Histogram(ws_pointer)

class UserFile(ReductionStep):
"""
Reads an ISIS SANS mask file of the format described here mantidproject.org/SANS_User_File_Commands
Expand Down

0 comments on commit 6f4e9ad

Please sign in to comment.