Package adams.data.statistics
Class SpectrumStatistic
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.data.statistics.AbstractDataStatistic<Spectrum>
-
- adams.data.statistics.SpectrumStatistic
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,adams.data.spreadsheet.SpreadSheetSupporter
,adams.data.statistics.InformativeStatistic
,Serializable
public class SpectrumStatistic extends adams.data.statistics.AbstractDataStatistic<Spectrum>
Statistical information specific to a spectrum.- Version:
- $Revision: 11831 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATABASE_ID
static String
FIRST_WAVE_NUMBER
static String
LAST_WAVE_NUMBER
static String
MAX_AMPLITUDE
static String
MAX_DELTA_WAVE_NUMBER
static String
MEAN_AMPLITUDE
static String
MEAN_DELTA_WAVE_NUMBER
static String
MEDIAN_AMPLITUDE
static String
MEDIAN_DELTA_WAVE_NUMBER
static String
MIN_AMPLITUDE
static String
MIN_DELTA_WAVE_NUMBER
static String
NUMBER_OF_POINTS
static String
STDEV_AMPLITUDE
static String
STDEV_DELTA_WAVE_NUMBER
static String
SUM_AMPLITUDE
-
Constructor Summary
Constructors Constructor Description SpectrumStatistic()
Initializes the statistic.SpectrumStatistic(Spectrum data)
Initializes the statistic.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculate()
calculates the statistics.void
cleanUp()
Cleans up data structures, frees up memory.Spectrum
getData()
Returns the currently stored spectrum.String
getStatisticDescription()
Returns a description for this statistic, i.e., spectrum ID.String
globalInfo()
Returns a string describing the object.void
setData(Spectrum value)
Sets the data to use as basis for the calculations.-
Methods inherited from class adams.data.statistics.AbstractDataStatistic
add, clear, getStatistic, numberToDouble, statisticNames, toSpreadSheet, toString
-
-
-
-
Field Detail
-
SUM_AMPLITUDE
public static final String SUM_AMPLITUDE
- See Also:
- Constant Field Values
-
MEDIAN_AMPLITUDE
public static final String MEDIAN_AMPLITUDE
- See Also:
- Constant Field Values
-
STDEV_AMPLITUDE
public static final String STDEV_AMPLITUDE
- See Also:
- Constant Field Values
-
MEAN_AMPLITUDE
public static final String MEAN_AMPLITUDE
- See Also:
- Constant Field Values
-
MAX_AMPLITUDE
public static final String MAX_AMPLITUDE
- See Also:
- Constant Field Values
-
MIN_AMPLITUDE
public static final String MIN_AMPLITUDE
- See Also:
- Constant Field Values
-
MEDIAN_DELTA_WAVE_NUMBER
public static final String MEDIAN_DELTA_WAVE_NUMBER
- See Also:
- Constant Field Values
-
STDEV_DELTA_WAVE_NUMBER
public static final String STDEV_DELTA_WAVE_NUMBER
- See Also:
- Constant Field Values
-
MEAN_DELTA_WAVE_NUMBER
public static final String MEAN_DELTA_WAVE_NUMBER
- See Also:
- Constant Field Values
-
MAX_DELTA_WAVE_NUMBER
public static final String MAX_DELTA_WAVE_NUMBER
- See Also:
- Constant Field Values
-
MIN_DELTA_WAVE_NUMBER
public static final String MIN_DELTA_WAVE_NUMBER
- See Also:
- Constant Field Values
-
LAST_WAVE_NUMBER
public static final String LAST_WAVE_NUMBER
- See Also:
- Constant Field Values
-
FIRST_WAVE_NUMBER
public static final String FIRST_WAVE_NUMBER
- See Also:
- Constant Field Values
-
NUMBER_OF_POINTS
public static final String NUMBER_OF_POINTS
- See Also:
- Constant Field Values
-
DATABASE_ID
public static final String DATABASE_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SpectrumStatistic
public SpectrumStatistic()
Initializes the statistic.
-
SpectrumStatistic
public SpectrumStatistic(Spectrum data)
Initializes the statistic.- Parameters:
data
- the spectrum to generate the statistics for
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in classadams.data.statistics.AbstractDataStatistic<Spectrum>
- Returns:
- a description suitable for displaying in the gui
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceadams.core.CleanUpHandler
- Overrides:
cleanUp
in classadams.data.statistics.AbstractDataStatistic<Spectrum>
-
setData
public void setData(Spectrum value)
Sets the data to use as basis for the calculations.- Overrides:
setData
in classadams.data.statistics.AbstractDataStatistic<Spectrum>
- Parameters:
value
- the spectrum to use, can be null
-
getData
public Spectrum getData()
Returns the currently stored spectrum.- Overrides:
getData
in classadams.data.statistics.AbstractDataStatistic<Spectrum>
- Returns:
- the spectrum, can be null
-
getStatisticDescription
public String getStatisticDescription()
Returns a description for this statistic, i.e., spectrum ID.- Returns:
- the description
-
calculate
protected void calculate()
calculates the statistics.- Overrides:
calculate
in classadams.data.statistics.AbstractDataStatistic<Spectrum>
-
-