Class CenteredMovingAverage

  • 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.filter.Filter>, adams.core.SizeOfHandler, adams.core.TechnicalInformationHandler, adams.data.filter.Filter<Spectrum>, adams.data.filter.OptionalProcessingInfoUpdate, Serializable, Comparable

    public class CenteredMovingAverage
    extends adams.data.filter.AbstractCenteredMovingAverage<Spectrum>
    A filter that applies Centered Moving Average smoothing.

    For more information see:

    WikiPedia. Moving average. URL https://en.wikipedia.org/wiki/Moving_average

     @misc{missing_id,
        author = {WikiPedia},
        title = {Moving average},
        URL = {https://en.wikipedia.org/wiki/Moving_average}
     }
     


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -no-id-update <boolean> (property: dontUpdateID)
        If enabled, suppresses updating the ID of adams.data.id.IDHandler data containers.
        default: false
     
    -no-processing-info-update <boolean> (property: dontUpdateProcessingInfo)
        If enabled, suppresses updating the processing information of adams.data.NotesHandler
        data containers.
        default: false
     
    -window-size <int> (property: windowSize)
        The window size to use (uneven number).
        default: 15
        minimum: 1
     
    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

        adams.data.filter.AbstractFilter.FilterJob<T extends adams.data.container.DataContainer>
    • Field Summary

      • Fields inherited from class adams.data.filter.AbstractCenteredMovingAverage

        m_WindowSize
      • Fields inherited from class adams.data.filter.AbstractFilter

        m_DontUpdateID, m_DontUpdateProcessingInfo
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Point2D convert​(adams.data.container.DataPoint point)
      Returns the X/Y values of the DataPoint as Point2D.
      protected adams.data.container.DataPoint newDataPoint​(Point2D smoothed)
      Creates a new DataPoint from the smoothed one.
      • Methods inherited from class adams.data.filter.AbstractCenteredMovingAverage

        defineOptions, getTechnicalInformation, getWindowSize, globalInfo, processData, setWindowSize, windowSizeTipText
      • Methods inherited from class adams.data.filter.AbstractFilter

        checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, dontUpdateProcessingInfoTipText, equals, filter, forCommandLine, getDontUpdateID, getDontUpdateProcessingInfo, reset, setDontUpdateID, setDontUpdateProcessingInfo, shallowCopy, shallowCopy
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, toCommandLine, toString
      • Methods inherited from class adams.core.logging.CustomLoggingLevelObject

        setLoggingLevel
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • 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
    • Constructor Detail

      • CenteredMovingAverage

        public CenteredMovingAverage()
    • Method Detail

      • convert

        protected Point2D convert​(adams.data.container.DataPoint point)
        Returns the X/Y values of the DataPoint as Point2D.
        Specified by:
        convert in class adams.data.filter.AbstractCenteredMovingAverage<Spectrum>
        Parameters:
        point - the point to get the X/Y values from
        Returns:
        the X/Y values as Point2D
      • newDataPoint

        protected adams.data.container.DataPoint newDataPoint​(Point2D smoothed)
        Creates a new DataPoint from the smoothed one.
        Specified by:
        newDataPoint in class adams.data.filter.AbstractCenteredMovingAverage<Spectrum>
        Parameters:
        smoothed - the smoothed data point
        Returns:
        the new DataPoint