Package adams.data.filter
Class RemoveNoise<T extends DataContainer & Mergeable>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<T>
-
- adams.data.filter.RemoveNoise<T>
-
- Type Parameters:
T
- the data to process
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
,SizeOfHandler
,Filter<T>
,Serializable
,Comparable
public class RemoveNoise<T extends DataContainer & Mergeable> extends AbstractFilter<T>
A filter that removes noise from the data with a user-supplied noise level algorithm.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-denoiser <gcms.data.noise.AbstractDenoiser [options]> (property: denoiser) The denoiser algorithm to use for removing the noise from the data. default: gcms.data.noise.MedianHeightDifference -factor-sd 2.0 -thr2 -1.0 -savitzky "gcms.data.filter.SavitzkyGolay -polynomial 2 -derivative 0 -left 3 -right 3 -optimize 15" -derivative "gcms.data.filter.Derivative -order 2 -scaling -1.0"
-invert (property: invert) If set to true, non-noise will be removed instead of noise.
Default options for gcms.data.noise.MedianHeightDifference (-denoiser/denoiser):-D (property: debug) If set to true, scheme may output additional info to the console.
-zero (property: zeroNoise) If set to true, the abundances of noisy points will be set to zero instead of being completely removed from the data.
-factor-sd <double> (property: thresholdSdFactor) The factor to multiply the height median (thr_sd) with in order to obtain the threshold below signals are considered being noise. default: 2
-thr2 <double> (property: threshold2) A user-supplied threshold (= thr_2) that is applied to the abundances of the original input data, use -1 to disable. default: -1.0
-savitzky <gcms.data.filter.AbstractFilter [options]> (property: savitzkyGolay) The Savitzky-Golay filter setup to use in smoothing the data beforehand. default: gcms.data.filter.SavitzkyGolay -polynomial 2 -derivative 0 -left 3 -right 3 -optimize 15
-derivative <gcms.data.filter.AbstractFilter [options]> (property: derivative) The Derivative filter to use (always uses 2nd derivative). default: gcms.data.filter.Derivative -order 2 -scaling -1.0
-regions (property: recordRegions) If set to true, the elution regions will be recorded as well.
Default options for gcms.data.filter.SavitzkyGolay (-savitzky/savitzkyGolay):
-D (property: debug) If set to true, scheme may output additional info to the console.
-polynomial <int> (property: polynomialOrder) The polynomial order to use, must be at least 2. default: 2
-derivative <int> (property: derivativeOrder) The order of the derivative to use, >= 0. default: 1
-left <int> (property: numPointsLeft) The number of points left of a data point, >= 0. default: 3
-right <int> (property: numPointsRight) The number of points right of a data point, >= 0. default: 3
-optimize <int> (property: optimizeWindowSize) The maximum window size to optimize (odd, positive number); uses the Durbin-Watson statistic to determine the best window size, ie, number of points left and right of the points being smoothed; the data must be oscillating around zero, ie, passed through the Derivative filter. default: -1
Default options for gcms.data.filter.Derivative (-derivative/derivative):
-D (property: debug) If set to true, scheme may output additional info to the console.
-order <int> (property: order) The order of the derivative to calculate. default: 1
-scaling <double> (property: scalingRange) The range to scale the abundances to after each derivation step; use 0 to turn off and -1 to set it to the input range. default: 0.0
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDenoiser
m_Denoiser
the noise level algorithm.protected boolean
m_Invert
indicates whether to invert behavior, i.e., to remove non-noise instead of noise.-
Fields inherited from class adams.data.filter.AbstractFilter
m_DontUpdateID
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RemoveNoise()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
denoiserTipText()
Returns the tip text for this property.AbstractDenoiser
getDenoiser()
Returns the current denoiser algorithm.boolean
getInvert()
Returns whether non-noise is removed (= true) or the actual noise.String
globalInfo()
Returns a string describing the object.String
invertTipText()
Returns the tip text for this property.protected T
processData(T data)
Performs the actual filtering.void
setDenoiser(AbstractDenoiser value)
Sets the denoiser algorithm.void
setInvert(boolean value)
Sets whether the behavior should be inverted, i.e., removing non-noise.-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, 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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Denoiser
protected AbstractDenoiser m_Denoiser
the noise level algorithm.
-
m_Invert
protected boolean m_Invert
indicates whether to invert behavior, i.e., to remove non-noise instead of noise.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractFilter<T extends DataContainer & Mergeable>
-
setDenoiser
public void setDenoiser(AbstractDenoiser value)
Sets the denoiser algorithm.- Parameters:
value
- the algorithm
-
getDenoiser
public AbstractDenoiser getDenoiser()
Returns the current denoiser algorithm.- Returns:
- the algorithm
-
denoiserTipText
public String denoiserTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setInvert
public void setInvert(boolean value)
Sets whether the behavior should be inverted, i.e., removing non-noise.- Parameters:
value
- true if non-noise should be removed
-
getInvert
public boolean getInvert()
Returns whether non-noise is removed (= true) or the actual noise.- Returns:
- true if non-noise is removed
-
invertTipText
public String invertTipText()
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 T processData(T data)
Performs the actual filtering.- Specified by:
processData
in classAbstractFilter<T extends DataContainer & Mergeable>
- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
-