public class TSpectrum extends Object
ftp://root.cern.ch/root/SpectrumDec.ps.gz ftp://root.cern.ch/root/SpectrumSrc.ps.gz ftp://root.cern.ch/root/SpectrumBck.ps.gz The original source documentation as well as examples can be found at http://root.cern.ch/
| Modifier and Type | Field and Description |
|---|---|
protected static int |
fgAverageWindow |
protected static int |
fgIterations |
protected int |
fMaxPeaks |
protected int |
fNPeaks |
protected double[] |
fPosition |
protected double[] |
fPositionX |
protected double[] |
fPositionY |
protected double |
fResolution |
| Constructor and Description |
|---|
TSpectrum()
The TSpectrum() default constructor
|
TSpectrum(int maxpositions,
double resolution) |
| Modifier and Type | Method and Description |
|---|---|
void |
finalize()
TSpectrum desctructor
|
int |
getNPeaks() |
double[] |
getPeakX() |
double[] |
getPeakY() |
static void |
main(String[] argv) |
int |
Search(double[] hinX,
double[] hinY,
double[] houtX,
double[] houtY,
double sigma,
String option,
double threshold)
ONE-DIMENSIONAL PEAK SEARCH FUNCTION This function searches for peaks in source spectrum in hin The number of
found peaks and their positions are written into the members fNpeaks and fPositionX.
|
int |
SearchHighRes(double[] source,
double[] destVector,
int ssize,
double sigma,
double threshold,
boolean backgroundRemove,
int deconIterations,
boolean markov,
int averWindow)
ONE-DIMENSIONAL HIGH-RESOLUTION PEAK SEARCH FUNCTION This function searches for peaks in source spectrum It is
based on deconvolution method.
|
void |
SetAverageWindow(int w) |
void |
SetResolution(double resolution) |
protected static int fgAverageWindow
protected static int fgIterations
protected int fMaxPeaks
protected int fNPeaks
protected double[] fPosition
protected double[] fPositionX
protected double[] fPositionY
protected double fResolution
public TSpectrum()
public TSpectrum(int maxpositions,
double resolution)
maxpositions - maximum number of peaksresolution - determines resolution of the neighboring peaks default value is 1 correspond to 3 sigma
distance between peaks. Higher values allow higher resolution (smaller distance between peaks. May be set
later through SetResolution.)public int getNPeaks()
public double[] getPeakX()
public double[] getPeakY()
public int Search(double[] hinX,
double[] hinY,
double[] houtX,
double[] houtY,
double sigma,
String option,
double threshold)
hinX - histogram x of source spectrumhinY - histogram Y of source spectrumhoutX - out histogram of source spectrumhoutY - out histogram of source spectrumsigma - sigma of searched peaks, for details we refer to manualoption - string options passed to the algorithmsthreshold - (default=0.05) peaks with amplitude less than threshold*highest_peak are discarded. 0 <
threshold <1 By default, the background is removed before deconvolution. Specify the option
"nobackground" to not remove the background. By default the "Markov" chain algorithm is used. Specify the
option "noMarkov" to disable this algorithm Note that by default the source spectrum is replaced by a new
spectrumpublic int SearchHighRes(double[] source,
double[] destVector,
int ssize,
double sigma,
double threshold,
boolean backgroundRemove,
int deconIterations,
boolean markov,
int averWindow)
source - vector of source spectrumdestVector - vector of resulting deconvolved spectrumssize - length of source spectrumsigma - sigma of searched peaks, for details we refer to manualthreshold - threshold value in % for selected peaks, peaks with amplitude less than
threshold*highest_peak/100 are ignored, see manualbackgroundRemove - logical variable, set if the removal of background before deconvolution is desireddeconIterations - number of iterations in deconvolution operationmarkov - logical variable, if it is true, first the source spectrum is replaced by new spectrum calculated
using Markov chains method.averWindow - averaging window of searched peaks, for details we refer to manual (applies only for Markov
method)public void SetAverageWindow(int w)
w - average window of searched peaksSearchHighRes(double[], double[], int, double, double, boolean, int, boolean, int)public void SetResolution(double resolution)
resolution - determines resolution of the neighboring peaks default value is 1 correspond to 3 sigma
distance between peaks. Higher values allow higher resolution (smaller distance between peaks. May be set
later through SetResolution.public static void main(String[] argv)
Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.