Skip to content

Commit

Permalink
Fixed bug in value of slits height and width loaded from the config f…
Browse files Browse the repository at this point in the history
…ile name. This refs #4303
  • Loading branch information
JeanBilheux committed Jun 8, 2012
1 parent 2fd6f57 commit 91c3264
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def from_xml_element(self, instrument_dom):

#s1h, s2h, s1w, s2w
self.s1h = BaseScriptElement.getStringElement(instrument_dom, "s1h")
self.s2h = BaseScriptElement.getStringElement(instrument_dom, "s1w")
self.s1w = BaseScriptElement.getStringElement(instrument_dom, "s2h")
self.s2h = BaseScriptElement.getStringElement(instrument_dom, "s2h")
self.s1w = BaseScriptElement.getStringElement(instrument_dom, "s1w")
self.s2w = BaseScriptElement.getStringElement(instrument_dom, "s2w")

#scaling factor file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def getSh(self,mt, top_tag, bottom_tag):
mt_run = mt.getRun()
st = mt_run.getProperty(top_tag).value
sb = mt_run.getProperty(bottom_tag).value
sh = float(sb[0]) - float(st[0])
sh = math.fabs(float(sb[0]) - float(st[0]))
units = mt_run.getProperty(top_tag).units
return sh, units

Expand Down Expand Up @@ -518,7 +518,7 @@ def getSw(self,mt, left_tag, right_tag):
mt_run = mt.getRun()
sl = mt_run.getProperty(left_tag).value
sr = mt_run.getProperty(right_tag).value
sw = float(sl[0]) - float(sr[0])
sw = math.fabs(float(sl[0]) - float(sr[0])
units = mt_run.getProperty(left_tag).units
return sw, units

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def getSh(mt, top_tag, bottom_tag):
mt_run = mt.getRun()
st = mt_run.getProperty(top_tag).value
sb = mt_run.getProperty(bottom_tag).value
sh = float(sb[0]) - float(st[0])
sh = math.fabs(float(sb[0]) - float(st[0]))
units = mt_run.getProperty(top_tag).units
return sh, units

Expand Down Expand Up @@ -90,7 +90,7 @@ def getSw(mt, left_tag, right_tag):
mt_run = mt.getRun()
sl = mt_run.getProperty(left_tag).value
sr = mt_run.getProperty(right_tag).value
sw = float(sl[0]) - float(sr[0])
sw = math.fabs(float(sl[0]) - float(sr[0]))
units = mt_run.getProperty(left_tag).units
return sw, units

Expand Down

0 comments on commit 91c3264

Please sign in to comment.