Skip to content

Commit

Permalink
Changed the way the theta is calculated. Using now thi instead of ths…
Browse files Browse the repository at this point in the history
…. This refs #4303
  • Loading branch information
JeanBilheux committed Jun 5, 2012
1 parent 3e09a7e commit a7b8149
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def PyExec(self):

from mantidsimple import mtd

bDebug = False
bDebug = True
if bDebug:
print '====== Running in mode DEBUGGING ======='

Expand Down Expand Up @@ -163,7 +163,7 @@ def PyExec(self):
incidentMedium = self.getProperty("IncidentMediumSelected")
slitsWidthFlag = self.getProperty("SlitsWidthFlag")

# Pick a good workspace n ame
# Pick a good workspace name
ws_name = "refl%d" % run_numbers[0]
ws_event_data = ws_name+"_evt"

Expand Down Expand Up @@ -220,12 +220,12 @@ def PyExec(self):
# Get metadata
mt_run = mtd[ws_event_data].getRun()
##get angles value
ths_value = mt_run.getProperty('ths').value[0]
ths_units = mt_run.getProperty('ths').units
thi_value = mt_run.getProperty('thi').value[0]
thi_units = mt_run.getProperty('thi').units
tthd_value = mt_run.getProperty('tthd').value[0]
tthd_units = mt_run.getProperty('tthd').units
ths_rad = wks_utility.angleUnitConversion(value=ths_value,
from_units=ths_units,
thi_rad = wks_utility.angleUnitConversion(value=thi_value,
from_units=thi_units,
to_units='rad')
tthd_rad = wks_utility.angleUnitConversion(value=tthd_value,
from_units=tthd_units,
Expand Down Expand Up @@ -831,7 +831,7 @@ def PyExec(self):

#now we can convert to Q

theta = tthd_rad - ths_rad
theta = math.fabs(tthd_rad - thi_rad)
AngleOffset_deg = float(self.getProperty("AngleOffset"))
AngleOffset_rad = (AngleOffset_deg * math.pi) / 180.
theta += AngleOffset_rad
Expand Down

0 comments on commit a7b8149

Please sign in to comment.