Package adams.data.baseline
Class TimeseriesSavitzkyGolayBased
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.baseline.AbstractBaselineCorrection<T>
-
- adams.data.baseline.AbstractSavitzkyGolayBased<Timeseries>
-
- adams.data.baseline.TimeseriesSavitzkyGolayBased
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractBaselineCorrection>
,SizeOfHandler
,Serializable
,Comparable
public class TimeseriesSavitzkyGolayBased extends AbstractSavitzkyGolayBased<Timeseries>
A baseline correction scheme that uses SavitzkyGolay smoothing to determine the baseline.
For more information see:
A. Savitzky, Marcel J.E. Golay (1964). Smoothing and Differentiation of Data by Simplified Least Squares Procedures. Analytical Chemistry. 36:1627-1639.
William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery (1992). Savitzky-Golay Smoothing Filters.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-polynomial <int> (property: polynomialOrder) The polynomial order to use, must be at least 2. default: 2 minimum: 2
-left <int> (property: numPointsLeft) The number of points left of a data point, >= 0. default: 3 minimum: 0
-right <int> (property: numPointsRight) The number of points right of a data point, >= 0. default: 3 minimum: 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.baseline.AbstractBaselineCorrection
AbstractBaselineCorrection.BaselineCorrectionJob<T extends DataContainer>
-
-
Field Summary
-
Fields inherited from class adams.data.baseline.AbstractSavitzkyGolayBased
m_Filter
-
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 TimeseriesSavitzkyGolayBased()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSavitzkyGolay
getFilter()
Returns a new instance of a SavitzkyGolay filter.protected DataPoint
getOriginalPoint(DataPoint newPoint, Timeseries original)
Retrieves the data point from the original signal that corresponds to the provided new one.protected DataPoint
subtract(DataPoint old, DataPoint baseline)
Subtracts the baseline from the old data point and creates a new data point.-
Methods inherited from class adams.data.baseline.AbstractSavitzkyGolayBased
defineOptions, getNumPointsLeft, getNumPointsRight, getPolynomialOrder, getTechnicalInformation, globalInfo, initialize, numPointsLeftTipText, numPointsRightTipText, polynomialOrderTipText, processData, setNumPointsLeft, setNumPointsRight, setPolynomialOrder
-
Methods inherited from class adams.data.baseline.AbstractBaselineCorrection
checkData, cleanUp, compareTo, correct, doCorrect, equals, forCommandLine, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
-
-
-
Method Detail
-
getFilter
protected AbstractSavitzkyGolay getFilter()
Returns a new instance of a SavitzkyGolay filter.- Specified by:
getFilter
in classAbstractSavitzkyGolayBased<Timeseries>
- Returns:
- the filter
-
getOriginalPoint
protected DataPoint getOriginalPoint(DataPoint newPoint, Timeseries original)
Retrieves the data point from the original signal that corresponds to the provided new one.- Specified by:
getOriginalPoint
in classAbstractSavitzkyGolayBased<Timeseries>
- Parameters:
newPoint
- the point to obtain the corresponding one fororiginal
- the original signal- Returns:
- the corresponding data point, null if not found
-
subtract
protected DataPoint subtract(DataPoint old, DataPoint baseline)
Subtracts the baseline from the old data point and creates a new data point.- Specified by:
subtract
in classAbstractSavitzkyGolayBased<Timeseries>
- Parameters:
old
- the old data point to subtract the baseline frombaseline
- the baseline value to subtract- Returns:
- the new corrected data point
-
-