GetConfidenceIntervals/Uncertainties for excluded ranges

Hi experts!
I am trying to subtract a fit from a histo and thus to propagate the uncertainties. Since histo.Add(fun,-1) does not propagatet the uncertainties as fare as i know, i wanted to do it by hand. For this i need the uncertainties on fun.eval(x) for each x.

So fare i have

import numpy

def getConfidenceIntervals(fitResult,xVals,nStride = 1,confLevel = 0.683):
    x = numpy.array(xVals , dtype = float)
    nPoints = len(xVals)
    err = numpy.array([0. for v in xVals] , dtype = float)
    fitResult.GetConfidenceIntervals(nPoints, nStride, nStride, x, err, confLevel, False)
    return err

. The problem is now, that i exclude Ranges for the Function in x (with ROOT.TF1.RejectPoint() in the function) since there are multiple peaks, which i do not want to include in the fit in my original spectrum. In these regions of course i get <0.> as a return. The question is now, how i can estimate an uncertainty for those points.
Hope, my problem got clear :confused: .


sorry, can’t help you with that. You’ll have more luck on the “Stat and Math Tool Support” forum …