Class EquiDistance

  • 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.data.filter.Filter<Spectrum>, Serializable, Comparable

    public class EquiDistance
    extends adams.data.filter.AbstractEquiDistanceWithOffset<Spectrum>
    A filter for interpolating the amplitudes of a spectrum. One can either specify a fixed number of points or just use the same amount of points as currently in the input data.

    Valid options are:

    -D (property: debug)
        If set to true, scheme may output additional info to the console.
     
    -num-points <int> (property: numPoints)
        The number of points to generate, '-1' will use the same amount of points
        as currently in the input data.
        default: -1
     
    -offset <int> (property: offset)
        Offset to add to wave number, ignored if -1.
        default: -1
     
    -allow-oversampling (property: allowOversampling)
        If set to true, then over-sampling is allowed, ie, generating more data
        points than in the original data.
     
    Version:
    $Revision: 2242 $
    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.AbstractEquiDistanceWithOffset

        m_Offset
      • Fields inherited from class adams.data.filter.AbstractEquiDistance

        m_AllowOversampling, m_NumPoints
      • 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
      EquiDistance()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String globalInfo()
      Returns a string describing the object.
      protected SpectrumPoint interpolate​(float waveno, SpectrumPoint left, SpectrumPoint right)
      Returns a SpectrumPoint with interpolated amplitude.
      String offsetTipText()
      Returns the tip text for this property.
      protected Spectrum processData​(Spectrum data)
      Performs the actual filtering.
      • Methods inherited from class adams.data.filter.AbstractEquiDistanceWithOffset

        defineOptions, getOffset, setOffset
      • Methods inherited from class adams.data.filter.AbstractEquiDistance

        allowOversamplingTipText, getAllowOversampling, getNumPoints, numPointsTipText, setAllowOversampling, setNumPoints
      • 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 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

      • EquiDistance

        public EquiDistance()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • offsetTipText

        public String offsetTipText()
        Returns the tip text for this property.
        Specified by:
        offsetTipText in class adams.data.filter.AbstractEquiDistanceWithOffset<Spectrum>
        Returns:
        tip text for this property suitable for displaying in the gui
      • interpolate

        protected SpectrumPoint interpolate​(float waveno,
                                            SpectrumPoint left,
                                            SpectrumPoint right)
        Returns a SpectrumPoint with interpolated amplitude.
        Parameters:
        waveno - the wave number we have to interpolate for
        left - the "earlier" SpectrumPoint
        right - the "later" SpectrumPoint
        Returns:
        the interpolated SpectrumPoint
      • processData

        protected Spectrum processData​(Spectrum data)
        Performs the actual filtering.
        Specified by:
        processData in class adams.data.filter.AbstractFilter<Spectrum>
        Parameters:
        data - the data to filter
        Returns:
        the filtered data