Package adams.data.baseline
Class SlidingWindow<T extends DataContainer>
-
- Type Parameters:
T- the type of data to process
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractBaselineCorrection>,SizeOfHandler,DatabaseConnectionHandler,DatabaseConnectionProvider,DatabaseConnectionUser,Serializable,Comparable
public class SlidingWindow<T extends DataContainer> extends AbstractDatabaseConnectionBaselineCorrection<T>
Applies a baseline correction scheme on partitions of the data with a sliding window approach.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-num-left <int> (property: numLeft) The number of points left of the center point. default: 30
-num-right <int> (property: numRight) The number of points right of the center point. default: 30
-baseline <adams.data.baseline.AbstractBaselineCorrection [options]> (property: baselineCorrection) The baseline correction algorithm to use for correcting the baseline of the data. default: adams.data.baseline.PassThrough
Default options for adams.data.baseline.PassThrough (-baseline/baselineCorrection):-D (property: debug) If set to true, scheme may output additional info to the console.
- Version:
- $Revision$
- Author:
- dale (dale at cs dot 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 AbstractBaselineCorrectionm_BaselineCorrectionthe actual baseline correction scheme to apply.protected intm_NumLeftthe number of points left of the center.protected intm_NumRightthe number of points right of the center.-
Fields inherited from class adams.data.baseline.AbstractDatabaseConnectionBaselineCorrection
m_DatabaseConnection
-
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 SlidingWindow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbaselineCorrectionTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.AbstractBaselineCorrectiongetBaselineCorrection()Returns the current baseline correction algorithm.protected AbstractDatabaseConnectiongetDefaultDatabaseConnection()Returns the default database connection.intgetNumLeft()Returns the number of points left of the center.intgetNumRight()Returns the number of points right of the center.StringglobalInfo()Returns a string describing the object.StringnumLeftTipText()Returns the tip text for this property.StringnumRightTipText()Returns the tip text for this property.protected TprocessData(T data)Performs the actual correcting.voidsetBaselineCorrection(AbstractBaselineCorrection value)Sets the baseline correction algorithm.voidsetNumLeft(int value)Sets the number of points left of the center.voidsetNumRight(int value)Sets the number of points right of the center.protected voidupdateDatabaseConnection()Updates the database connection in dependent schemes.-
Methods inherited from class adams.data.baseline.AbstractDatabaseConnectionBaselineCorrection
getDatabaseConnection, initialize, setDatabaseConnection
-
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_NumLeft
protected int m_NumLeft
the number of points left of the center.
-
m_NumRight
protected int m_NumRight
the number of points right of the center.
-
m_BaselineCorrection
protected AbstractBaselineCorrection m_BaselineCorrection
the actual baseline correction scheme to apply.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
getDefaultDatabaseConnection
protected AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.- Specified by:
getDefaultDatabaseConnectionin classAbstractDatabaseConnectionBaselineCorrection<T extends DataContainer>- Returns:
- the default database connection
-
setNumLeft
public void setNumLeft(int value)
Sets the number of points left of the center.- Parameters:
value- the number of points
-
getNumLeft
public int getNumLeft()
Returns the number of points left of the center.- Returns:
- the number of points
-
numLeftTipText
public String numLeftTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNumRight
public void setNumRight(int value)
Sets the number of points right of the center.- Parameters:
value- the number of points
-
getNumRight
public int getNumRight()
Returns the number of points right of the center.- Returns:
- the number of points
-
numRightTipText
public String numRightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBaselineCorrection
public void setBaselineCorrection(AbstractBaselineCorrection value)
Sets the baseline correction algorithm.- Parameters:
value- the algorithm
-
getBaselineCorrection
public AbstractBaselineCorrection getBaselineCorrection()
Returns the current baseline correction algorithm.- Returns:
- the algorithm
-
baselineCorrectionTipText
public String baselineCorrectionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
updateDatabaseConnection
protected void updateDatabaseConnection()
Updates the database connection in dependent schemes.- Overrides:
updateDatabaseConnectionin classAbstractDatabaseConnectionBaselineCorrection<T extends DataContainer>
-
processData
protected T processData(T data)
Performs the actual correcting.- Specified by:
processDatain classAbstractBaselineCorrection<T extends DataContainer>- Parameters:
data- the data to correct- Returns:
- the corrected data
-
-