Skip to content

Commit

Permalink
Re #4303 trying to fix refl algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jan 31, 2012
1 parent 1882f8b commit 56b006d
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from MantidFramework import *
from mantidsimple import *
import os
import numpy
from reduction.instruments.reflectometer import wks_utility

class RefLReduction(PythonAlgorithm):

Expand Down Expand Up @@ -35,6 +32,9 @@ def PyInit(self):
self.declareWorkspaceProperty("OutputWorkspace", "", Direction.Output)

def PyExec(self):
import os
import numpy
from reduction.instruments.reflectometer import wks_utility
tof_binning = self.getProperty("TOFBinning")
if len(tof_binning) != 1 and len(tof_binning) != 3:
raise RuntimeError("Can only specify (width) or (start,width,stop) for binning. Found %d values." % len(tof_binning))
Expand Down Expand Up @@ -64,6 +64,8 @@ def PyExec(self):
if q_binning[0] == 0. and q_binning[1] == 0. and q_binning[2] == 0.:
raise RuntimeError("Failed to specify the q-binning")

print q_binning

#Due to the frame effect, it's sometimes necessary to narrow the range
#over which we add all the pixels along the low resolution
#Parameter
Expand Down Expand Up @@ -185,7 +187,7 @@ def PyExec(self):
sample_to_detector=dSD,
theta=theta,
geo_correction=True,
Qrange=Qrange)
q_binning=q_binning)

ConvertToHistogram(InputWorkspace='IntegratedDataWks1',
OutputWorkspace='IntegratedDataWks')
Expand Down

0 comments on commit 56b006d

Please sign in to comment.