Skip to content

Commit

Permalink
SF status is now reported in final workspace. This refs #11267
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Mar 5, 2015
1 parent 5f6dcf8 commit 3019c5b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
Expand Up @@ -92,6 +92,28 @@ def PyExec(self):
# retrieve settings from GUI
print '-> Retrieving settings from GUI'

#print 'RunNumbers: ' + str(self.getProperty("RunNumbers").value)
#print 'NormalizationRunNumber: ' + str(self.getProperty("NormalizationRunNumber").value)
#print 'SignalPeakPixelRange: ' + str(self.getProperty("SignalPeakPixelRange").value)
#print 'SubtractSignalBackground: ' + str(self.getProperty("SubtractSignalBackground").value)
#print 'SignalBackgroundPixelRange: ' + str(self.getProperty("SignalBackgroundPixelRange").value)
#print "NormFlag: " + str(self.getProperty("NormFlag").value)
#print "NormPeakPixelRange: " + str(self.getProperty("NormPeakPixelRange").value)
#print "NormBackgroundPixelRange: " + str(self.getProperty("NormBackgroundPixelRange").value)
#print "SubtractNormBackground: " + str(self.getProperty("SubtractNormBackground").value)
#print "LowResDataAxisPixelRangeFlag: " + str(self.getProperty("LowResDataAxisPixelRangeFlag").value)
#print "LowResDataAxisPixelRange: " + str(self.getProperty("LowResDataAxisPixelRange").value)
#print "LowResNormAxisPixelRangeFlag: " + str(self.getProperty("LowResNormAxisPixelRangeFlag").value)
#print "LowResNormAxisPixelRange: " + str(self.getProperty("LowResNormAxisPixelRange").value)
#print "TOFRange: " + str(self.getProperty("TOFRange").value)
#print "IncidentMediumSelected: " + str(self.getProperty("incidentMediumSelected").value)
#print "GeometryCorrectionFlag: " + str(self.getProperty("GeometryCorrectionFlag").value)
#print "QMin: " + str(self.getProperty("QMin").value)
#print "QStep: " + str(self.getProperty("QStep").value)
#print "ScalingFactorFile: " + str(self.getProperty("ScalingFactorFile").value)
#print "SlitsWidthFlag: " + str(self.getProperty("SlitsWidthFlag").value)
#print "OutputWorkspace: " + str(self.getProperty("OutputWorkspace").value)

# DATA
dataRunNumbers = self.getProperty("RunNumbers").value
dataPeakRange = self.getProperty("SignalPeakPixelRange").value
Expand Down Expand Up @@ -297,7 +319,7 @@ def PyExec(self):
# final_data_y_error_axis)

# apply Scaling factor
[tof_axis_full, y_axis, y_error_axis] = wks_utility.applyScalingFactor(tof_axis_full,
[tof_axis_full, y_axis, y_error_axis, isSFfound] = wks_utility.applyScalingFactor(tof_axis_full,
final_data_y_axis,
final_data_y_error_axis,
incidentMedium,
Expand Down Expand Up @@ -375,8 +397,10 @@ def PyExec(self):
final_y_error_axis,
name_output_ws,
ws_event_data)
AddSampleLog(Workspace=name_output_ws,
LogName='isSFfound',
LOgText=str(isSFfound))

self.setProperty('OutputWorkspace', mtd[name_output_ws])


AlgorithmFactory.subscribe(RefLReduction)
Expand Up @@ -1419,6 +1419,8 @@ def applyScalingFactor(tof_axis,
function that apply scaling factor to data using sfCalculator.txt
file created by the sfCalculator procedure
"""
isSFfound = False

#sf_file = 'NaN'
if os.path.isfile(sf_file):

Expand Down Expand Up @@ -1512,7 +1514,7 @@ def applyScalingFactor(tof_axis,
a, b,
a_error, b_error)

return [tof_axis, y_data, y_data_error]
return [tof_axis, y_data, y_data_error, True]

else:

Expand All @@ -1527,8 +1529,9 @@ def applyScalingFactor(tof_axis,
y_data_error,
a, b,
a_error, b_error)
isSFfound = True

return [tof_axis, y_data, y_data_error]
return [tof_axis, y_data, y_data_error, isSFfound]

else:

Expand Down

0 comments on commit 3019c5b

Please sign in to comment.