Re: limits in TSpectrum::Search() ?

From: Kazuyoshi Furutaka <furutaka_at_jb3.so-net.ne.jp>
Date: Fri, 6 Jun 2008 20:15:00 +0900


Thanks Rene,
I didn't change the parameter from the default value. I'll play with that parameter...

Regards,
Kazuyoshi

From: Rene Brun <Rene.Brun_at_cern.ch>
Subject: Re: [ROOT] limits in TSpectrum::Search() ? Date: Fri, 6 Jun 2008 12:39:25 +0200

> Your input parameter sigma is far too large. I have changed your code in the following way.
> see lines with //<======
>
> Rene Brun
>
> {
>
> // get the test histogram
> TFile *rfin = TFile::Open("http://www001.upp.so-net.ne.jp/furutaka/test.root","read");
> TH1S *h = (TH1S*)rfin->Get("h");
> h->GetXaxis()->SetRangeUser(15.0,25.0); //<===========
> h->GetXaxis()->SetTitle("");
> h->GetYaxis()->SetTitle("");
> h->Draw();
>
> // TSpectrum
> // Int_t maxpositions, Float_t resolutions=1
> TSpectrum *s = new TSpectrum(500,2);
> s->Search(h,0.01,"",0.2); //<===========
> s->Background(h,20,"same");
>
> Int_t np = s->GetNPeaks();
> cout << "#peaks found " << np << endl;
>
> }
>
> Kazuyoshi Furutaka wrote:
> > Dear all,
> >
> > The day before yesterday I (carelessly) sent a reply with about 440kb of attachments, and it seems that it was undelivered (perhaps due to the size of the attachments).
> >
> > From: Rene Brun <Rene.Brun_at_cern.ch>
> > Subject: Re: [ROOT] limits in TSpectrum::Search() ?
> > Date: Wed, 4 Jun 2008 07:07:00 +0200
> >
> >
> >> Could you post a hist.root file containing your histogram?
> >> Could you indicate your version of ROOT?
> >>
> >
> > I'm using "ROOT 5.19/05 (trunk_at_24044, May 29 2008, 06:46:01 on
> > linux)".
> >
> > I put a root file named "test.root", which can be found at
> > http://www001.upp.so-net.ne.jp/furutaka/test.root
> >
> > A sample script "testFindPeaks.C" is attached to this mail,
> > which read a histogram named "h" in the "test.root" and search
> > for peaks.
> >
> > Yours,
> > Kazuyoshi
> > --
> > Kazuyoshi Furutaka
> > furutaka _dot_ kazuyoshi _at_ jaea _dot_ go _dot_ jp
> >
>
Received on Fri Jun 06 2008 - 13:15:22 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 06 2008 - 17:50:01 CEST