Skip to content

Commit

Permalink
better logging visibility from gui perspective, re #12610
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Aug 17, 2015
1 parent ba49bfc commit 44d6b14
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Code/Mantid/scripts/Engineering/EnggUtils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pylint: disable=invalid-name
#pylint: disable=too-many-arguments
# R0913: Too many arguments - strictly for write_GSAS_iparam_file()
# R0913: Too many arguments - strictly for write_ENGINX_GSAS_iparam_file()
from mantid.api import *
import mantid.simpleapi as sapi

Expand Down Expand Up @@ -148,6 +148,8 @@ def getDetIDsForBank(bank):
'Grouping', 'ENGINX_Grouping.xml')

alg = AlgorithmManager.create('LoadDetectorsGroupingFile')
alg.initialize()
alg.setLogging(False)
alg.setProperty('InputFile', groupingFilePath)
alg.setProperty('OutputWorkspace', '__EnginXGrouping')
alg.execute()
Expand Down Expand Up @@ -181,7 +183,7 @@ def generateOutputParTable(name, difc, zero):
tbl.addColumn('double', 'zero')
tbl.addRow([float(difc), float(zero)])

def applyVanadiumCorrections(self, ws, indices, vanWS, vanIntegWS, vanCurvesWS):
def applyVanadiumCorrections(parent, ws, indices, vanWS, vanIntegWS, vanCurvesWS):
"""
Apply the EnggVanadiumCorrections algorithm on the workspace given, by using the algorithm
EnggVanadiumCorrections
Expand All @@ -199,7 +201,7 @@ def applyVanadiumCorrections(self, ws, indices, vanWS, vanIntegWS, vanCurvesWS):
(vanWS.getNumberHistograms(),len(indices)))
elif vanIntegWS and vanCurvesWS:
# filter only indices from vanIntegWS (crop the table)
tbl = sapi.CreateEmptyTableWorkspace()
tbl = sapi.CreateEmptyTableWorkspace(OutputWorkspace="__vanadium_integration_ws")
tbl.addColumn('double', 'Spectra Integration')
for i in indices:
tbl.addRow([vanIntegWS.cell(i,0)])
Expand All @@ -209,7 +211,7 @@ def applyVanadiumCorrections(self, ws, indices, vanWS, vanIntegWS, vanCurvesWS):
# sapi.EnggVanadiumCorrections(Workspace=ws, VanadiumWorkspace=vanWS,
# IntegrationWorkspace=vanIntegWS,
# CurvesWorkspace=vanCurvesWS)
alg = self.createChildAlgorithm('EnggVanadiumCorrections')
alg = parent.createChildAlgorithm('EnggVanadiumCorrections')
if ws:
alg.setProperty('Workspace', ws)
if vanWS:
Expand Down

0 comments on commit 44d6b14

Please sign in to comment.