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 | Class and Description |
|---|---|
static class |
TSpectrum.Direction |
static class |
TSpectrum.FilterOrder |
static class |
TSpectrum.SmoothWindow |
| Modifier and Type | Field and Description |
|---|---|
protected int |
fgAverageWindow |
protected int |
fgIterations |
protected int |
fMaxPeaks |
protected double |
fResolution |
| Constructor and Description |
|---|
TSpectrum()
The TSpectrum() default constructor
|
TSpectrum(int maxpositions,
double resolution) |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
background(double[] source,
double[] destination,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.FilterOrder filterOrder,
TSpectrum.SmoothWindow smoothing,
boolean compton)
ONE-DIMENSIONAL BACKGROUND ESTIMATION FUNCTION - GENERAL FUNCTION This function calculates background spectrum
from source spectrum.
|
static double[] |
deconvolution(double[] source,
double[] response,
double[] destination,
int length,
int numberIterations,
int numberRepetitions,
double boost)
ONE-DIMENSIONAL DECONVOLUTION FUNCTION This function calculates deconvolution from source spectrum according to
response spectrum using Gold algorithm The result is placed in the vector pointed by destination pointer.
|
static double[] |
deconvolutionRL(double[] source,
double[] response,
double[] destination,
int length,
int numberIterations,
int numberRepetitions,
double boost)
ONE-DIMENSIONAL DECONVOLUTION FUNCTION This function calculates deconvolution from source spectrum according to
response spectrum using Richardson-Lucy algorithm The result is placed in the vector pointed by destination pointer.
|
protected static void |
filterBackgroundOrder2(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing) |
protected static void |
filterBackgroundOrder4(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing) |
protected static void |
filterBackgroundOrder6(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing) |
protected static void |
filterBackgroundOrder8(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing) |
static List<DoublePoint> |
search(double[] sourceX,
double[] sourceY,
double[] destVector,
int length,
int nMaxPeaks,
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 |
setDeconIterations(int n) |
void |
setResolution(double resolution) |
static double[] |
smoothMarkov(double[] source,
double[] destination,
int length,
int averWindow)
ONE-DIMENSIONAL MARKOV SPECTRUM SMOOTHING FUNCTION This function calculates smoothed spectrum from source
spectrum based on Markov chain method.
|
static double[] |
unfolding(double[] source,
double[][] respMatrix,
double[] destination,
int lengthx,
int lengthy,
int numberIterations,
int numberRepetitions,
double boost)
ONE-DIMENSIONAL UNFOLDING FUNCTION This function unfolds source spectrum according to response matrix columns.
|
protected int fgAverageWindow
protected int fgIterations
protected int fMaxPeaks
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 void setAverageWindow(int w)
w - average window of searched peakssearch(double[], double[], double[], int, int, double, double, boolean, int, boolean, int)public void setDeconIterations(int n)
n - max number of decon iterations in deconvolution operationsearch(double[], double[], double[], int, 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 double[] background(double[] source,
double[] destination,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.FilterOrder filterOrder,
TSpectrum.SmoothWindow smoothing,
boolean compton)
source - vector of source spectrumdestination - where to copy the filtered backgroundlength - length of the spectrum vectornumberIterations - maximal width of clipping window,direction - direction of change of clipping window - possible values=kBackIncreasingWindow
kBackDecreasingWindowfilterOrder - order of clipping filter, -possible values=kBackOrder2 kBackOrder4 kBackOrder6 kBackOrder8smoothing - logical variable whether the smoothing operation in the estimation of background will be
included resp. smoothing windowcompton - logical variable whether the estimation of Compton edge will be included - possible values=kFALSE
kTRUEpublic static double[] deconvolution(double[] source,
double[] response,
double[] destination,
int length,
int numberIterations,
int numberRepetitions,
double boost)
source - vector of source spectrumresponse - vector of response spectrumdestination - vector of response spectrumlength - length of source and response spectranumberIterations - for details we refer to the reference given belownumberRepetitions - for repeated boosted deconvolution @boost, boosting coefficient M. Morhac, J. Kliman, V.
Matousek, M. Veselsk, I. Turzo.: Efficient one- and two-dimensional Gold deconvolution and its application
to gamma-ray spectra decomposition. NIM, A401 (1997) 385-408.boost - ???public static double[] deconvolutionRL(double[] source,
double[] response,
double[] destination,
int length,
int numberIterations,
int numberRepetitions,
double boost)
source - vector of source spectrumresponse - vector of response spectrumdestination - vectorlength - length of source and response spectranumberIterations - for details we refer to the reference given abovenumberRepetitions - for repeated boosted deconvolutionboost - boosting coefficientprotected static void filterBackgroundOrder2(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing)
protected static void filterBackgroundOrder4(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing)
protected static void filterBackgroundOrder6(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing)
protected static void filterBackgroundOrder8(double[] workingSpace,
int length,
int numberIterations,
TSpectrum.Direction direction,
TSpectrum.SmoothWindow smoothing)
public static List<DoublePoint> search(double[] sourceX, double[] sourceY, double[] destVector, int length, int nMaxPeaks, double sigma, double threshold, boolean backgroundRemove, int deconIterations, boolean markov, int averWindow)
sourceX - vector of source spectrumsourceY - vector of source spectrumdestVector - vector of resulting deconvolved spectrumlength - length of source spectrumnMaxPeaks - maximum number of peaks to search for (upper bound)sigma - 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 static double[] smoothMarkov(double[] source,
double[] destination,
int length,
int averWindow)
source - array of source spectrumdestination - array where to store the filtered backgroundlength - length of source arrayaverWindow - width of averaging smoothing windowpublic static double[] unfolding(double[] source,
double[][] respMatrix,
double[] destination,
int lengthx,
int lengthy,
int numberIterations,
int numberRepetitions,
double boost)
source - vector of source spectrumrespMatrix - matrix of response spectradestination - vector of unfolded source spectrumlengthx - length of source spectrum and # of columns of response matrixlengthy - length of destination spectrum and # of rows of response matrixnumberIterations - Note!!! lengthx must be >= lengthynumberRepetitions - repetition countboost - boosting coefficientCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.