Package adams.data.spectrumsmoothing
Class SlidingWindow
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.smoothing.AbstractSmoother<T>
-
- adams.data.smoothing.AbstractSlidingWindow<Spectrum>
-
- adams.data.spectrumsmoothing.SlidingWindow
-
- 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<adams.data.smoothing.AbstractSmoother>
,adams.core.SizeOfHandler
,Serializable
,Comparable
public class SlidingWindow extends adams.data.smoothing.AbstractSlidingWindow<Spectrum>
Uses a sliding window for determining the median/average inside the window. This measure is then used as new abundance for the spectrum point in the center of the window. The left and the right ends of the chromatogram are filled with dummy spectrum points to return a chromatogram with the same number of spectrum points.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-window <int> (property: windowSize) The window size for determining the 'smoothed' abundances. default: 20
-measure <MEDIAN|MEAN> (property: measure) The measure to use for calculating the 'smoothed' abundances. default: MEDIAN
- Version:
- $Revision: 2242 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SlidingWindow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Double
getValue(adams.data.container.DataPoint point)
Returns the X-value of the data point.String
globalInfo()
Returns a string describing the object.protected void
updatePoint(adams.data.container.DataPoint point, double value)
Updates the X-value of the data point.-
Methods inherited from class adams.data.smoothing.AbstractSlidingWindow
defineOptions, getMeasure, getWindowSize, measureTipText, processData, setMeasure, setWindowSize, windowSizeTipText
-
Methods inherited from class adams.data.smoothing.AbstractSmoother
checkData, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getSmoothers, reset, shallowCopy, shallowCopy, smooth
-
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
-
getValue
protected Double getValue(adams.data.container.DataPoint point)
Returns the X-value of the data point.- Specified by:
getValue
in classadams.data.smoothing.AbstractSlidingWindow<Spectrum>
- Parameters:
point
- the point to get the X-value from- Returns:
- the X-value
-
updatePoint
protected void updatePoint(adams.data.container.DataPoint point, double value)
Updates the X-value of the data point.- Specified by:
updatePoint
in classadams.data.smoothing.AbstractSlidingWindow<Spectrum>
- Parameters:
point
- the point to updatevalue
- the value to update the point with
-
-