Hi,
I am using
ROOT 5.26/00 (trunk_at_31882, Dec 14 2009, 20:18:36 on linuxx8664gcc)
I do many FITSlicesY on many histograms and get something very strange:
after many successful fits the FitSliceY is done and I can see the
result of the fit on my console
but then the aSlices output array contains an empty histograms.
I can plot the result histogram, it exist but is indeed empty.
TObjArray* aSlices=new TObjArray;
if(!aSlices){
printf("problem\n");
}
myfun->SetParameters(nhit/nbins,0.0,0.5,nhit/nbins/1000.,5.);
printf("before fit slice %d %d\n",pixel,ii);
h[ii]->FitSlicesY(myfun, 0, -1, 0, "", aSlices);
printf("before fit %d %d\n",pixel,ii);
slop->SetParameters(0.0,0.0);
int ko=((TH1F*)((*aSlices)[1]))->Fit(slop,"q");
Give this output:
...
FCN=1.60878e-10 FROM MIGRAD STATUS=CONVERGED 339
CALLS 340 TOTAL
EDM=3.21555e-10 STRATEGY= 1 ERR MATRIX
NOT POS-DEF
EXT PARAMETER APPROXIMATE STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 9.88330e+02 4.56812e+01 1.38693e-02
-2.25936e-07
2 p1 -1.73371e-01 2.77901e-02 6.89539e-06
-2.07903e-04
3 p2 4.99374e-01 1.46837e-02 4.49128e-06
-4.41477e-04
4 p3 -1.65957e+01 7.14736e+01 2.32748e-03
5.03670e-06
5 p4 -1.05566e+01 3.13626e+02 1.06632e-02
1.10618e-06
FCN=6.10767 FROM MIGRAD STATUS=CONVERGED 179 CALLS
180 TOTAL
EDM=2.80097e-10 STRATEGY= 1 ERROR MATRIX
UNCERTAINTY 0.8 per cent
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 9.45501e+02 3.50388e+01 2.57237e-03
8.78995e-07
2 p1 -1.98521e-01 1.48610e-02 5.00742e-06
1.38046e-05
3 p2 5.33704e-01 1.24525e-02 -6.23746e-06
8.47966e-04
4 p3 7.43089e-03 4.59031e+02 5.08263e-08 0.00000e
+00
5 p4 1.25666e-02 7.81687e+00 -3.11800e-04
2.65406e-06
The Warning comes from the call int ko=((TH1F*)((*aSlices)[1]))-
>Fit(slop,"q");
in fact (*aSlices)[1] is indeed empty
(*aSlices)[1] should contains the p1 entries that are listed on the
screen.
The h[ii] histo can be seen and is nice, there is no empty slices.
This can be repeated and always has a problem at the same point after 36 FitSlices.
I see in FitSlice code that
if (nentries == 0 || nentries < cut) {delete hp; continue;}
so nentries==0 in every slice will make this behavior
f1->SetParameters(parsave);
hp->Fit(f1,opt.Data());
Int_t npfits = f1->GetNumberFitPoints(); if (npfits > npar && npfits
>= cut)
Now if npfits <= npar in every channel this can also create the problem.
How is f1->GetNumberFitPoints() computed? can it be <= npar (5 in my
case) if the slice has 60 bins?
The fit result indicated CONVERGED for every slice.
THanks
--- Nicolas Produit INTEGRAL Science Data Center Phone: +41 22 379 2140 16, Chemin d'Ecogia Fax: +41 22 379 2133 CH-1290 Versoix www: http://isdc.unige.ch/~produitReceived on Fri Jan 29 2010 - 11:39:46 CET
This archive was generated by hypermail 2.2.0 : Fri Jan 29 2010 - 17:50:01 CET