Skip to content

Commit

Permalink
Added angle offset (angle offset error is not used right now but will…
Browse files Browse the repository at this point in the history
… be once we know for sure that everything works). This refs #4303
  • Loading branch information
JeanBilheux committed Feb 3, 2012
1 parent 1470c6d commit 4047eed
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def PyInit(self):
Description="Positive is linear bins, negative is logarithmic")
self.declareProperty("QMin", 0.001, Description="Minimum Q-value")
self.declareProperty("QStep", 0.001, Description="Step-size in Q. Enter a negative value to get a log scale.")
self.declareProperty("AngleOffset", "", Description="Angle offset (rad)")
self.declareProperty("AngleOffsetError", "", Description="Angle offset error (rad)")
# Output workspace to put the transmission histo into
self.declareWorkspaceProperty("OutputWorkspace", "", Direction.Output)

Expand Down Expand Up @@ -159,11 +161,6 @@ def PyExec(self):
dSD = dPS_array[maxY / 2, maxX / 2]
# Distance source->center of detector
dMD = dSD + dSM
dMD = 14.9509998143 #REMOVE_ME


print 'dMD: '
print dMD

# Background subtraction
BackfromYpixel = data_back[0]
Expand All @@ -173,6 +170,9 @@ def PyExec(self):
# background range (along the y-axis) and of only the pixel
# of interest along the x-axis (to avoid the frame effect)
theta = tthd_rad - ths_rad
AngleOffset = self.getProperty("AngleOffset")
if (AngleOffset != ""):
theta += float(AngleOffset)

if dMD is not None and theta is not None:
# _tof_axis = mtd[ws_histo_data].readX(0)
Expand All @@ -193,8 +193,6 @@ def PyExec(self):
_q_axis[t] = _Q*1e-10
q_max = max(_q_axis)

print _q_axis

wks_utility.createIntegratedWorkspace(mtd[ws_histo_data],
"IntegratedDataWks1",
fromXpixel=Xrange[0],
Expand Down

0 comments on commit 4047eed

Please sign in to comment.