Skip to content

Commit

Permalink
refs #10530. Use child progress reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Nov 28, 2014
1 parent 1cc17a9 commit 687da62
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -266,12 +266,13 @@ def PyExec(self):

projection_labels = self.__make_labels(projection)


prog = Progress(self, 0, 1, to_cut.getBoxController().getTotalNumMDBoxes())
cut_alg_name = "BinMD" if nopix else "SliceMD"
'''
Actually perform the binning operation
'''
cut_alg_name = "BinMD" if nopix else "SliceMD"
cut_alg = AlgorithmManager.Instance().create(cut_alg_name)
cut_alg.setChild(True)
cut_alg = self.createChildAlgorithm(name=cut_alg_name, startProgress=0, endProgress=1.0)
cut_alg.initialize()
cut_alg.setProperty("InputWorkspace", to_cut)
cut_alg.setPropertyValue("OutputWorkspace", "sliced")
Expand All @@ -294,6 +295,7 @@ def PyExec(self):

slice = cut_alg.getProperty("OutputWorkspace").value


# Attach the w-matrix (projection matrix)
if slice.getNumExperimentInfo() > 0:
u, v, w = projection
Expand All @@ -303,4 +305,5 @@ def PyExec(self):

self.setProperty("OutputWorkspace", slice)


AlgorithmFactory.subscribe(CutMD)

0 comments on commit 687da62

Please sign in to comment.