Package adams.data.multifilter
Class Average
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.multifilter.AbstractMultiSpectrumFilter
-
- adams.data.multifilter.AbstractFormatsBasedMultiSpectrumFilter
-
- adams.data.multifilter.Average
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.ShallowCopySupporter<AbstractMultiSpectrumFilter>
,adams.core.SizeOfHandler
,Serializable
,Comparable
public class Average extends AbstractFormatsBasedMultiSpectrumFilter
Averages spectra into a single one. Either uses all spectra, if no format is specified, or only the ones that match the specified formats.
Before the spectra are average, the knir.data.filter.StandardiseByInterpolation filter is applied to ensure the spectra can be aligned.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-no-id-update <boolean> (property: dontUpdateID) If enabled, suppresses updating the ID of adams.data.id.IDHandler data containers. default: false
-format <adams.core.base.BaseString> [-format ...] (property: formats) The formats of the spectra to average; use an empty array to average all. default:
-new-format <java.lang.String> (property: newFormat) The new format to use for the averaged spectrum. default: AVG
-standardize <knir.data.filter.StandardiseByInterpolation> (property: standardize) The filter for standardizing the spectra. default: knir.data.filter.StandardiseByInterpolation
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StandardiseByInterpolation
m_Standardize
for aligning the spectra.-
Fields inherited from class adams.data.multifilter.AbstractFormatsBasedMultiSpectrumFilter
m_Formats, m_NewFormat
-
Fields inherited from class adams.data.multifilter.AbstractMultiSpectrumFilter
m_DontUpdateID
-
-
Constructor Summary
Constructors Constructor Description Average()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
formatsTipText()
Returns the tip text for this property.protected String
getDefaultNewFormat()
Returns the default format for the generated spectrum.StandardiseByInterpolation
getStandardize()
Returns the filter to use for standardizing the spectra.String
globalInfo()
Returns a string describing the object.String
newFormatTipText()
Returns the tip text for this property.protected Spectrum
processData(MultiSpectrum data)
Performs the actual filtering.void
setStandardize(StandardiseByInterpolation value)
Sets the filter to use for standardizing the spectra.String
standardizeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.multifilter.AbstractFormatsBasedMultiSpectrumFilter
getFormats, getNewFormat, setFormats, setNewFormat
-
Methods inherited from class adams.data.multifilter.AbstractMultiSpectrumFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, forName, getDontUpdateID, getFilters, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Standardize
protected StandardiseByInterpolation m_Standardize
for aligning the spectra.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractFormatsBasedMultiSpectrumFilter
-
formatsTipText
public String formatsTipText()
Returns the tip text for this property.- Specified by:
formatsTipText
in classAbstractFormatsBasedMultiSpectrumFilter
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultNewFormat
protected String getDefaultNewFormat()
Returns the default format for the generated spectrum.- Specified by:
getDefaultNewFormat
in classAbstractFormatsBasedMultiSpectrumFilter
- Returns:
- the default format
-
newFormatTipText
public String newFormatTipText()
Returns the tip text for this property.- Specified by:
newFormatTipText
in classAbstractFormatsBasedMultiSpectrumFilter
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStandardize
public void setStandardize(StandardiseByInterpolation value)
Sets the filter to use for standardizing the spectra.- Parameters:
value
- the filter
-
getStandardize
public StandardiseByInterpolation getStandardize()
Returns the filter to use for standardizing the spectra.- Returns:
- the filter
-
standardizeTipText
public String standardizeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
processData
protected Spectrum processData(MultiSpectrum data)
Performs the actual filtering.- Specified by:
processData
in classAbstractMultiSpectrumFilter
- Parameters:
data
- the data to filter- Returns:
- the filtered data, null if failed to generate output
-
-