Skip to content

Commit

Permalink
Fix the defect. Refs #6956.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Apr 29, 2013
1 parent 147f92a commit 2ea4dc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def constructPythonScript(self, paramdict):

if filterdict["FilterType"] == "ByTime":
# Filter by time
script += "%sInterval = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LengthOfTimeInterval"])
script += "%sTimeInterval = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LengthOfTimeInterval"])
script += "%sUnitOfTime = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["UnitOfTime"])
script += "%sLogName = '%s',\n" % (DiffractionReductionScripter.WIDTH, "")

Expand All @@ -158,7 +158,14 @@ def constructPythonScript(self, paramdict):
script += "%sFilterLogValueByChangingDirection = '%s',\n" % (DiffractionReductionScripter.WIDTH,
filterdict["FilterLogValueByChangingDirection"])
if filterdict["LogValueInterval"] != "":
script += "%sInterval = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LogValueInterval"])
# Filter by log value interval
script += "%sLogValueInterval = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LogValueInterval"])
#if filterdict["LogName"] == "":
# # No log value. Then filter by time interval
# script += "%sTimeInterval = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LogValueInterval"])
#else:
# # Found log value interval
# script += "%sLogValueInterval = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LogValueInterval"])
script += "%sLogBoundary = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["LogBoundary"])
if filterdict["TimeTolerance"] != "":
script += "%sTimeTolerance = '%s',\n" % (DiffractionReductionScripter.WIDTH, filterdict["TimeTolerance"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,15 +333,14 @@ def _plot_log_clicked(self):
return

# Construct workspace
output = api.GetTimeSeriesLogInformation(InputWorkspace = str(self._metaws),
output = api.ExportTimeSeriesLog(InputWorkspace = str(self._metaws),
OutputWorkspace = str(logname),
Function = "Export Log",
LogName = str(logname),
IsEventWorkspace = False)
api.DeleteWorkspace(Workspace="PercentStat")
#api.DeleteWorkspace(Workspace="PercentStat")

try:
logws = output[0]
logws = output
except IndexError:
msg4 = str("Error! Workspace %s is unable to convert log %s to workspace. " % (str(self._metaws), str(logname)))
self._content.info_text_browser.setText(str(msg1+msg4))
Expand Down

0 comments on commit 2ea4dc1

Please sign in to comment.