Package adams.data.baseline
Class AbstractSavitzkyGolayBased<T extends DataContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.baseline.AbstractBaselineCorrection<T>
-
- adams.data.baseline.AbstractSavitzkyGolayBased<T>
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractBaselineCorrection>
,SizeOfHandler
,Serializable
,Comparable
- Direct Known Subclasses:
TimeseriesSavitzkyGolayBased
public abstract class AbstractSavitzkyGolayBased<T extends DataContainer> extends AbstractBaselineCorrection<T>
Ancestor for SavitzkyGolay-based baseline correction schemes.- 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 Modifier and Type Field Description protected AbstractSavitzkyGolay
m_Filter
the filter to use.-
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 AbstractSavitzkyGolayBased()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected abstract AbstractSavitzkyGolay
getFilter()
Returns a new instance of a SavitzkyGolay filter.int
getNumPointsLeft()
Returns the number of points to the left of a data point.int
getNumPointsRight()
Returns the number of points to the right of a data point.protected abstract DataPoint
getOriginalPoint(DataPoint newPoint, T original)
Retrieves the data point from the original signal that corresponds to the provided new one.int
getPolynomialOrder()
Returns the polynominal order.TechnicalInformation
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.String
numPointsLeftTipText()
Returns the tip text for this property.String
numPointsRightTipText()
Returns the tip text for this property.String
polynomialOrderTipText()
Returns the tip text for this property.protected T
processData(T data)
Performs the actual correcting.void
setNumPointsLeft(int value)
Sets the number of points to the left of a data point.void
setNumPointsRight(int value)
Sets the number of points to the right of a data point.void
setPolynomialOrder(int value)
Sets the polynomial order.protected abstract 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.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
-
-
-
-
Field Detail
-
m_Filter
protected AbstractSavitzkyGolay m_Filter
the filter to use.
-
-
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 classAbstractOptionHandler
-
getTechnicalInformation
public TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- Returns:
- the technical information about this class
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractOptionHandler
-
getFilter
protected abstract AbstractSavitzkyGolay getFilter()
Returns a new instance of a SavitzkyGolay filter.- Returns:
- the filter
-
setPolynomialOrder
public void setPolynomialOrder(int value)
Sets the polynomial order.- Parameters:
value
- the order
-
getPolynomialOrder
public int getPolynomialOrder()
Returns the polynominal order.- Returns:
- the order
-
polynomialOrderTipText
public String polynomialOrderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNumPointsLeft
public void setNumPointsLeft(int value)
Sets the number of points to the left of a data point.- Parameters:
value
- the number of points
-
getNumPointsLeft
public int getNumPointsLeft()
Returns the number of points to the left of a data point.- Returns:
- the number of points
-
numPointsLeftTipText
public String numPointsLeftTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNumPointsRight
public void setNumPointsRight(int value)
Sets the number of points to the right of a data point.- Parameters:
value
- the number of points
-
getNumPointsRight
public int getNumPointsRight()
Returns the number of points to the right of a data point.- Returns:
- the number of points
-
numPointsRightTipText
public String numPointsRightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getOriginalPoint
protected abstract DataPoint getOriginalPoint(DataPoint newPoint, T original)
Retrieves the data point from the original signal that corresponds to the provided new one.- Parameters:
newPoint
- the point to obtain the corresponding one fororiginal
- the original signal- Returns:
- the corresponding data point, null if not found
-
subtract
protected abstract DataPoint subtract(DataPoint old, DataPoint baseline)
Subtracts the baseline from the old data point and creates a new data point.- Parameters:
old
- the old data point to subtract the baseline frombaseline
- the baseline value to subtract- Returns:
- the new corrected data point
-
processData
protected T processData(T data)
Performs the actual correcting.- Specified by:
processData
in classAbstractBaselineCorrection<T extends DataContainer>
- Parameters:
data
- the data to correct- Returns:
- the corrected data
-
-