Hello,
I wrote a macro to fit some peaks
The macro fits the ranges of the plot by a function, then I defined a totalFit function that is the sum of the functions used in each subrange.
@yus helped me to solve a bug here (Problems defining a multifit - #9 by faca87)
Here an example (maybe I’ve to improve the initial parameter, but for the moment it’s ok this plot)
I’ve one more question.
As you can see in the following figure,
they plotted the full spectrum that is the sum of S1+S2+S3+ S4+S5+S6 (small plots). To plot the full spectrum they rebinned in 28 days (as it is written in the caption).
I tried to rebin in this way:
int bindays=28;
int nbins = static_cast((x2 - x1) / bindays);
…
mg->GetXaxis()->SetNdivisions(nbins);
But I don’t see a decreasing in the number of points as in the figure of the article
multiflares.cpp (8.1 KB)


