Class Scale

  • 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 Scale
    extends adams.data.filter.AbstractFilter<Spectrum>
    Scales the amplitudes to a given maximum.

    Valid options are:

    -D (property: debug)
             If set to true, scheme may output additional info to the console.
     
    -min <double> (property: minAmplitude)
             The minimum amplitude to scale to.
             default: 0.0
     
    -max <double> (property: maxAmplitude)
             The maximum amplitude to scale to.
             default: 100.0
     
    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 
      Modifier and Type Field Description
      protected double m_MaxAmplitude
      the maximum amplitude to scale to.
      protected double m_MinAmplitude
      the minimum amplitude to scale to.
      • 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
      Scale()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void defineOptions()
      Adds options to the internal list of options.
      double getMaxAmplitude()
      Returns the maximum amplitude to scale to.
      double getMinAmplitude()
      Returns the minimum amplitude to scale to.
      String globalInfo()
      Returns a string describing the object.
      String maxAmplitudeTipText()
      Returns the tip text for this property.
      String minAmplitudeTipText()
      Returns the tip text for this property.
      protected Spectrum processData​(Spectrum data)
      Performs the actual filtering.
      void setMaxAmplitude​(double value)
      Sets the maximum amplitude to scale to.
      void setMinAmplitude​(double value)
      Sets the minimum amplitude to scale to.
      • 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
    • Field Detail

      • m_MinAmplitude

        protected double m_MinAmplitude
        the minimum amplitude to scale to.
      • m_MaxAmplitude

        protected double m_MaxAmplitude
        the maximum amplitude to scale to.
    • Constructor Detail

      • Scale

        public Scale()
    • 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
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.data.filter.AbstractFilter<Spectrum>
      • setMinAmplitude

        public void setMinAmplitude​(double value)
        Sets the minimum amplitude to scale to.
        Parameters:
        value - the maximum
      • getMinAmplitude

        public double getMinAmplitude()
        Returns the minimum amplitude to scale to.
        Returns:
        the minimum
      • minAmplitudeTipText

        public String minAmplitudeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setMaxAmplitude

        public void setMaxAmplitude​(double value)
        Sets the maximum amplitude to scale to.
        Parameters:
        value - the maximum
      • getMaxAmplitude

        public double getMaxAmplitude()
        Returns the maximum amplitude to scale to.
        Returns:
        the maximum
      • maxAmplitudeTipText

        public String maxAmplitudeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • 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