diff --git a/Framework/PythonInterface/plugins/functions/BivariateGaussian.py b/Framework/PythonInterface/plugins/functions/BivariateGaussian.py index 5c7dacab4dddd07b06f4941903b6a0988b15dc1b..8ed1a3562d62a94415e1b4d9a5735d8a47bb0261 100644 --- a/Framework/PythonInterface/plugins/functions/BivariateGaussian.py +++ b/Framework/PythonInterface/plugins/functions/BivariateGaussian.py @@ -127,8 +127,8 @@ class BivariateGaussian(IFunction1D): self.log().information('Setting constraints on mbvg; reversing bounds') self.addConstraints("{:4.4e} < A < {:4.4e}".format(boundsDict[param][1], boundsDict[param][0])) except ValueError: - self.log().warning('Cannot set parameter {:s} for mbvg. Valid choices are ' + - '(\'A\', \'MuX\', \'MuY\', \'SigX\', \'SigY\', \'SigP\', \'Bg\')'.format(param)) + self.log().warning("Cannot set parameter {:s} for mbvg. Valid choices are " + + "('A', 'MuX', 'MuY', 'SigX', 'SigY', 'SigP', 'Bg')".format(param)) def function2D(self, t): """ diff --git a/scripts/SCD_Reduction/BVGFitTools.py b/scripts/SCD_Reduction/BVGFitTools.py index 9af6a46289299146ccf8321b1ccef3be563f89a7..6ef80a224bf358edbdb3054c601a99a41e7875fe 100644 --- a/scripts/SCD_Reduction/BVGFitTools.py +++ b/scripts/SCD_Reduction/BVGFitTools.py @@ -193,7 +193,6 @@ def fitScaling(n_events, box, YTOF, YBVG, goodIDX=None, neigh_length_m=3): YRET = A1 * YJOINT + A0 chiSqRed = fitResultsScaling[1] - #logger.information( '{:2.2f} is chiSqRed'.format(chiSq)) return YRET, chiSqRed, A1 @@ -469,7 +468,6 @@ def doBVGFit(box, nTheta=200, nPhi=200, zBG=1.96, fracBoxToHistogram=1.0, goodID m.setAttributeValue('nX', h.shape[0]) m.setAttributeValue('nY', h.shape[1]) m.setConstraints(boundsDict) - # logger.information('before: ' + str(m)) # Do the fit bvgWS = CreateWorkspace(OutputWorkspace='bvgWS', DataX=pos.ravel( ), DataY=H.ravel(), DataE=np.sqrt(H.ravel())) @@ -477,7 +475,6 @@ def doBVGFit(box, nTheta=200, nPhi=200, zBG=1.96, fracBoxToHistogram=1.0, goodID fitResults = Fit(Function=m, InputWorkspace='bvgWS', Output='bvgfit', Minimizer='Levenberg-MarquardtMD') - #logger.information('after' + str(m)) elif forceParams is not None: p0 = np.zeros(7) p0[0] = np.max(h) @@ -528,7 +525,6 @@ def doBVGFit(box, nTheta=200, nPhi=200, zBG=1.96, fracBoxToHistogram=1.0, goodID m.setAttributeValue('nX', h.shape[0]) m.setAttributeValue('nY', h.shape[1]) m.setConstraints(boundsDict) - #logger.information('before: ' + str(m)) # Do the fit #plt.figure(18); plt.clf(); plt.imshow(m.function2D(pos)); plt.title('BVG Initial guess') @@ -537,7 +533,6 @@ def doBVGFit(box, nTheta=200, nPhi=200, zBG=1.96, fracBoxToHistogram=1.0, goodID fitResults = Fit(Function=fitFun, InputWorkspace=bvgWS, Output='bvgfit', Minimizer='Levenberg-MarquardtMD') - #system.logger('after: ' + str(m)) # Recover the result m = BivariateGaussian.BivariateGaussian() m.init() diff --git a/scripts/SCD_Reduction/ICCFitTools.py b/scripts/SCD_Reduction/ICCFitTools.py index 65baf382a30e6146dc3af12b7c31506e43cf3c0d..35a129db301c4d30842b84bab8dc88012985ab84 100644 --- a/scripts/SCD_Reduction/ICCFitTools.py +++ b/scripts/SCD_Reduction/ICCFitTools.py @@ -290,11 +290,8 @@ def getOptimizedGoodIDX(n_events, padeCoefficients, zBG=1.96, neigh_length_m=3, break except KeyboardInterrupt: sys.exit() - #logger.information( '\n'.join([str(v) - # for v in zip(chiSqList[:i+1], ISIGList[:i+1], IList[:i+1])])) use_ppl = np.argmin(np.abs(chiSqList[:i+1]-1.0)) pp_lambda = pp_lambda_toCheck[use_ppl] - #logger.information('USING PP_LAMBDA', pp_lambda, 'WITH CHISQ:', chiSqList[use_ppl]) goodIDX, _ = getBGRemovedIndices(n_events, pp_lambda=pp_lambda) chiSq, h, intens, sigma = getQuickTOFWS(box, peak, padeCoefficients, goodIDX=goodIDX, qMask=qMask, pp_lambda=pp_lambda, minppl_frac=minppl_frac, maxppl_frac=maxppl_frac,