Package adams.data.spectrum
Class Amplitudes
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.spectrum.AbstractSpectrumFeatureGenerator
-
- adams.data.spectrum.Amplitudes
-
- 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<AbstractSpectrumFeatureGenerator>
,adams.core.SizeOfHandler
,Serializable
,Comparable
public class Amplitudes extends AbstractSpectrumFeatureGenerator
Simple feature generator that just outputs all the amplitudes of a spectrum.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-converter <adams.data.featureconverter.AbstractFeatureConverter> (property: converter) The feature converter to use to produce the output data. default: adams.data.featureconverter.SpreadSheetFeatureConverter -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.SpreadSheet
-add-database-id <boolean> (property: addDatabaseID) If enabled, the database ID of the container gets added to the data. default: false
-add-id <boolean> (property: addID) If enabled, the ID of the container gets added to the data. default: false
-field <knir.data.sampledata.Field> [-field ...] (property: fields) The fields to add to the output. default:
-notes <adams.core.base.BaseString> [-notes ...] (property: notes) The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION' . default:
-add-wave-number <boolean> (property: addWaveNumber) If enabled, the wave number gets added as well, preceding the amplitude. default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_AddWaveNumber
whether to include the wavenumbers.-
Fields inherited from class adams.data.spectrum.AbstractSpectrumFeatureGenerator
m_AddDatabaseID, m_AddID, m_Converter, m_Fields, m_Notes
-
-
Constructor Summary
Constructors Constructor Description Amplitudes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
addWaveNumberTipText()
Returns the tip text for this property.adams.data.featureconverter.HeaderDefinition
createHeader(Spectrum spectrum)
Creates the header from a template spectrum.void
defineOptions()
Adds options to the internal list of options.List<Object>[]
generateRows(Spectrum spectrum)
Performs the actual feature genration.boolean
getAddWaveNumber()
Returns whether to add the wave numbers as well (preceding the amplitude).String
globalInfo()
Returns a string describing the object.void
setAddWaveNumber(boolean value)
Sets whether to add the wave numbers as well (preceding the amplitude).-
Methods inherited from class adams.data.spectrum.AbstractSpectrumFeatureGenerator
addDatabaseIDTipText, addIDTipText, checkData, cleanUp, compareTo, converterTipText, destroy, equals, fieldsTipText, generate, getAddDatabaseID, getAddID, getConverter, getDatasetFormat, getFields, getNotes, getRowFormat, notesTipText, postProcessHeader, postProcessRow, postProcessRows, reset, setAddDatabaseID, setAddID, setConverter, setFields, setNotes, 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
-
-
-
-
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 classAbstractSpectrumFeatureGenerator
-
setAddWaveNumber
public void setAddWaveNumber(boolean value)
Sets whether to add the wave numbers as well (preceding the amplitude).- Parameters:
value
- true if to add wave numbers
-
getAddWaveNumber
public boolean getAddWaveNumber()
Returns whether to add the wave numbers as well (preceding the amplitude).- Returns:
- true if to add wave numbers
-
addWaveNumberTipText
public String addWaveNumberTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
createHeader
public adams.data.featureconverter.HeaderDefinition createHeader(Spectrum spectrum)
Creates the header from a template spectrum.- Specified by:
createHeader
in classAbstractSpectrumFeatureGenerator
- Parameters:
spectrum
- the spectrum to act as a template- Returns:
- the generated header
-
generateRows
public List<Object>[] generateRows(Spectrum spectrum)
Performs the actual feature genration.- Specified by:
generateRows
in classAbstractSpectrumFeatureGenerator
- Parameters:
spectrum
- the spectrum to process- Returns:
- the generated features
-
-