Hi,
Could anyone comment on the following problem. I fit three gaussians and an exponential background to a dataset (see attached diagram). The drawn fit looks good, but the parameters do not make sense (negative Sigma, params 6 and 8). Also if you take the integral of one of the gaussian peaks the number is very large, coming close to the actual number of entries for the whole tree. For example the integral of the first peak is ~277000, but the number of entries in the tree is only 430920. Perhaps I am not understanding something. Can anyone explain this?
In your code, there are several errors, in particular the array par not defined. I have adapted your code to get a good fit.
Note that the two solutions for the standard deviation are mathematically correct, given the way you define your function. You can force the fit
to select only a positive value by expressing a parameter range.
Well, the date of post is so old, but ı am curious about it?
Is that order correct in your code? You define the mine function first as the total function, then fit it into the histogram of the data. Then, you define the individual functions of gauss1,2,3, and line as background.
Blue lined gaussians, are they the net count areas? Are they the total function of mine or the gaussians individually?