Package adams.data.multifilter
Class Fusion
- 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.Fusion
-
- 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 Fusion extends AbstractFormatsBasedMultiSpectrumFilter
Fuses the sub-spectra specified by the format option, by placing them side-by-side using the format option as the order.
-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 fuse. default:
-new-format <java.lang.String> (property: newFormat) The new format to use for the fused spectrum; use '@' to create an automatic format string generated from all the format strings. default: @
-wave-number-start <adams.core.base.BaseFloat> [-wave-number-start ...] (property: waveNumberStarts) The starting wave numbers for the sub-spectra; -1 indicates to use next available one. default:
-wave-number-step-size <adams.core.base.BaseFloat> [-wave-number-step-size ...] (property: waveNumberStepSizes) The wave number step sizes for each sub-spectrum. default:
-new-format-separator <java.lang.String> (property: newFormatSeparator) The separator to use when automatically generating a format string. default: -
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_NewFormatSeparator
the separator to use when automatically creating new format string.protected adams.core.base.BaseFloat[]
m_WaveNumberStarts
the starting points for the wave numbers in the merged spectrum (use -1 for the next available one).protected adams.core.base.BaseFloat[]
m_WaveNumberStepSizes
the step sizes for the wave numbers.-
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 Fusion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkData(MultiSpectrum data)
Makes sure that the wave number starts/step sizes have the same length as the format array.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.String
getNewFormatSeparator()
Returns the separator to use when automatically generating a new format string.adams.core.base.BaseFloat[]
getWaveNumberStarts()
Returns the starting wave number for each sub-spectrum.adams.core.base.BaseFloat[]
getWaveNumberStepSizes()
Returns the wave number step sizes for each sub-spectrum.String
globalInfo()
Returns a string describing the object.String
newFormatSeparatorTipText()
Returns the tip text for this property.String
newFormatTipText()
Returns the tip text for this property.protected Spectrum
processData(MultiSpectrum data)
Performs the actual filtering.void
setNewFormatSeparator(String value)
Sets the separator to use when automatically generating a new format string.void
setWaveNumberStarts(adams.core.base.BaseFloat[] value)
Sets the starting wave number for each sub-spectrum.void
setWaveNumberStepSizes(adams.core.base.BaseFloat[] value)
Sets the wave number step sizes for each sub-spectrum.String
waveNumberStartsTipText()
Returns the tip text for this property.String
waveNumberStepSizesTipText()
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
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_WaveNumberStarts
protected adams.core.base.BaseFloat[] m_WaveNumberStarts
the starting points for the wave numbers in the merged spectrum (use -1 for the next available one).
-
m_WaveNumberStepSizes
protected adams.core.base.BaseFloat[] m_WaveNumberStepSizes
the step sizes for the wave numbers.
-
m_NewFormatSeparator
protected String m_NewFormatSeparator
the separator to use when automatically creating new format string.
-
-
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.
-
setWaveNumberStarts
public void setWaveNumberStarts(adams.core.base.BaseFloat[] value)
Sets the starting wave number for each sub-spectrum.- Parameters:
value
- the starts; use -1 to use next available one
-
getWaveNumberStarts
public adams.core.base.BaseFloat[] getWaveNumberStarts()
Returns the starting wave number for each sub-spectrum.- Returns:
- the starts; -1 if to use next available one
-
waveNumberStartsTipText
public String waveNumberStartsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWaveNumberStepSizes
public void setWaveNumberStepSizes(adams.core.base.BaseFloat[] value)
Sets the wave number step sizes for each sub-spectrum.- Parameters:
value
- the step sizes
-
getWaveNumberStepSizes
public adams.core.base.BaseFloat[] getWaveNumberStepSizes()
Returns the wave number step sizes for each sub-spectrum.- Returns:
- the step sizes
-
waveNumberStepSizesTipText
public String waveNumberStepSizesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNewFormatSeparator
public void setNewFormatSeparator(String value)
Sets the separator to use when automatically generating a new format string.- Parameters:
value
- the new format separator
-
getNewFormatSeparator
public String getNewFormatSeparator()
Returns the separator to use when automatically generating a new format string.- Returns:
- the new format separator
-
newFormatSeparatorTipText
public String newFormatSeparatorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
checkData
protected void checkData(MultiSpectrum data)
Makes sure that the wave number starts/step sizes have the same length as the format array.- Overrides:
checkData
in classAbstractMultiSpectrumFilter
- Parameters:
data
- the data to filter
-
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
-
-