Class JLDataView

java.lang.Object
fr.esrf.tangoatk.widget.util.chart.JLDataView
All Implemented Interfaces:
Serializable

public class JLDataView extends Object implements Serializable
A class to handle data view. It handles data and all graphics stuff related to a serie of data.
Author:
JL Pons
See Also:
  • Field Details

    • MARKER_NONE

      public static final int MARKER_NONE
      No marker displayed
      See Also:
    • MARKER_DOT

      public static final int MARKER_DOT
      Display a dot for each point of the view
      See Also:
    • MARKER_BOX

      public static final int MARKER_BOX
      Display a box for each point of the view
      See Also:
    • MARKER_TRIANGLE

      public static final int MARKER_TRIANGLE
      Display a triangle for each point of the view
      See Also:
    • MARKER_DIAMOND

      public static final int MARKER_DIAMOND
      Display a diamond for each point of the view
      See Also:
    • MARKER_STAR

      public static final int MARKER_STAR
      Display a start for each point of the view
      See Also:
    • MARKER_VERT_LINE

      public static final int MARKER_VERT_LINE
      Display a vertical line for each point of the view
      See Also:
    • MARKER_HORIZ_LINE

      public static final int MARKER_HORIZ_LINE
      Display an horizontal line for each point of the view
      See Also:
    • MARKER_CROSS

      public static final int MARKER_CROSS
      Display a cross for each point of the view
      See Also:
    • MARKER_CIRCLE

      public static final int MARKER_CIRCLE
      Display a circle for each point of the view
      See Also:
    • MARKER_SQUARE

      public static final int MARKER_SQUARE
      Display a square for each point of the view
      See Also:
    • STYLE_SOLID

      public static final int STYLE_SOLID
      Solid line style
      See Also:
    • STYLE_DOT

      public static final int STYLE_DOT
      Dot line style
      See Also:
    • STYLE_DASH

      public static final int STYLE_DASH
      Dash line style
      See Also:
    • STYLE_LONG_DASH

      public static final int STYLE_LONG_DASH
      Long Dash line style
      See Also:
    • STYLE_DASH_DOT

      public static final int STYLE_DASH_DOT
      Dash + Dot line style
      See Also:
    • TYPE_LINE

      public static final int TYPE_LINE
      Line style
      See Also:
    • TYPE_BAR

      public static final int TYPE_BAR
      BarGraph style
      See Also:
    • METHOD_FILL_FROM_TOP

      public static final int METHOD_FILL_FROM_TOP
      Fill curve and bar from the top of the graph
      See Also:
    • METHOD_FILL_FROM_ZERO

      public static final int METHOD_FILL_FROM_ZERO
      Fill curve and bar from zero position (on Yaxis)
      See Also:
    • METHOD_FILL_FROM_BOTTOM

      public static final int METHOD_FILL_FROM_BOTTOM
      Fill curve and bar from the bottom of the graph
      See Also:
    • FILL_STYLE_NONE

      public static final int FILL_STYLE_NONE
      No filling
      See Also:
    • FILL_STYLE_SOLID

      public static final int FILL_STYLE_SOLID
      Solid fill style
      See Also:
    • FILL_STYLE_LARGE_RIGHT_HATCH

      public static final int FILL_STYLE_LARGE_RIGHT_HATCH
      Hatch fill style
      See Also:
    • FILL_STYLE_LARGE_LEFT_HATCH

      public static final int FILL_STYLE_LARGE_LEFT_HATCH
      Hatch fill style
      See Also:
    • FILL_STYLE_LARGE_CROSS_HATCH

      public static final int FILL_STYLE_LARGE_CROSS_HATCH
      Hatch fill style
      See Also:
    • FILL_STYLE_SMALL_RIGHT_HATCH

      public static final int FILL_STYLE_SMALL_RIGHT_HATCH
      Hatch fill style
      See Also:
    • FILL_STYLE_SMALL_LEFT_HATCH

      public static final int FILL_STYLE_SMALL_LEFT_HATCH
      Hatch fill style
      See Also:
    • FILL_STYLE_SMALL_CROSS_HATCH

      public static final int FILL_STYLE_SMALL_CROSS_HATCH
      Hatch fill style
      See Also:
    • FILL_STYLE_DOT_PATTERN_1

      public static final int FILL_STYLE_DOT_PATTERN_1
      Hatch fill style
      See Also:
    • FILL_STYLE_DOT_PATTERN_2

      public static final int FILL_STYLE_DOT_PATTERN_2
      Hatch fill style
      See Also:
    • FILL_STYLE_DOT_PATTERN_3

      public static final int FILL_STYLE_DOT_PATTERN_3
      Hatch fill style
      See Also:
    • NAN_FOR_NULL

      public static final double NAN_FOR_NULL
      NaN value used with y to represent a null value
    • NAN_FOR_POSITIVE_INFINITY

      public static final double NAN_FOR_POSITIVE_INFINITY
      NaN value used with y to represent a positive infinity value
    • NAN_FOR_NEGATIVE_INFINITY

      public static final double NAN_FOR_NEGATIVE_INFINITY
      NaN value used with y to represent a negative infinity value
    • INTERPOLATE_NONE

      public static final int INTERPOLATE_NONE
      No interpolation
      See Also:
    • INTERPOLATE_LINEAR

      public static final int INTERPOLATE_LINEAR
      Linear interpolation method
      See Also:
    • INTERPOLATE_COSINE

      public static final int INTERPOLATE_COSINE
      Cosine interpolation method
      See Also:
    • INTERPOLATE_CUBIC

      public static final int INTERPOLATE_CUBIC
      See Also:
    • INTERPOLATE_HERMITE

      public static final int INTERPOLATE_HERMITE
      See Also:
    • SMOOTH_NONE

      public static final int SMOOTH_NONE
      No smoothing
      See Also:
    • SMOOTH_FLAT

      public static final int SMOOTH_FLAT
      Flat smoothing (Flat shape)
      See Also:
    • SMOOTH_TRIANGULAR

      public static final int SMOOTH_TRIANGULAR
      Linear smoothing (Triangular shape)
      See Also:
    • SMOOTH_GAUSSIAN

      public static final int SMOOTH_GAUSSIAN
      Gaussian smoothing (Gaussian shape)
      See Also:
    • SMOOTH_EXT_NONE

      public static final int SMOOTH_EXT_NONE
      No smoothing extrapolation
      See Also:
    • SMOOTH_EXT_FLAT

      public static final int SMOOTH_EXT_FLAT
      flat smoothing extrapolation (duplicate last and end value)
      See Also:
    • SMOOTH_EXT_LINEAR

      public static final int SMOOTH_EXT_LINEAR
      Linear smoothing extrapolation (linear extrapolation)
      See Also:
    • MATH_NONE

      public static final int MATH_NONE
      No mathematical operation
      See Also:
    • MATH_DERIVATIVE

      public static final int MATH_DERIVATIVE
      Derivative operation
      See Also:
    • MATH_INTEGRAL

      public static final int MATH_INTEGRAL
      Integral operation
      See Also:
    • MATH_FFT_MODULUS

      public static final int MATH_FFT_MODULUS
      FFT (modulus) operation
      See Also:
    • MATH_FFT_PHASE

      public static final int MATH_FFT_PHASE
      FFT (phase) operation
      See Also:
    • DRAWMODE_NORMAL

      public static final int DRAWMODE_NORMAL
      Normal drawing mode
      See Also:
    • DRAWMODE_FOLLOWX

      public static final int DRAWMODE_FOLLOWX
      Follow X axis scale, Fixed Y coordinates in pixel
      See Also:
    • DRAWMODE_FOLLOWY

      public static final int DRAWMODE_FOLLOWY
      Follow Y axis scale, Fixed X coordinates in pixel
      See Also:
    • DRAWMODE_FOLLOWNONE

      public static final int DRAWMODE_FOLLOWNONE
      Fixed X and Y coordinates in pixel
      See Also:
    • xDataSorted

      protected boolean xDataSorted
  • Constructor Details

    • JLDataView

      public JLDataView()
      DataView constructor.
  • Method Details

    • getHelpString

      public static String getHelpString()
      Returns:
      a string containing the configuration file help.
    • setViewType

      public void setViewType(int s)
      Sets the graph type (Line or BarGraph).
      Parameters:
      s - Type of graph
      See Also:
    • getViewType

      public int getViewType()
      Gets view type.
      Returns:
      View type
      See Also:
    • setFillStyle

      public void setFillStyle(int b)
      Sets the filling style of this view.
      Parameters:
      b - Filling style
      See Also:
    • getFillStyle

      public int getFillStyle()
      Gets the current filling style.
      Returns:
      Filling style
      See Also:
    • setFillMethod

      public void setFillMethod(int m)
      Sets the filling method for this view.
      Parameters:
      m - Filling method
      See Also:
    • getFillMethod

      public int getFillMethod()
      Gets the current filling style.
      Returns:
      Filling method
      See Also:
    • setFillColor

      public void setFillColor(Color c)
      Sets the filling color of this dataView.
      Parameters:
      c - Filling color
      See Also:
    • getFillColor

      public Color getFillColor()
      Gets the filling color.
      Returns:
      Filling color
      See Also:
    • setBarFillColorAt

      public void setBarFillColorAt(int idx, Color fillColor)
      Change the default bar filling color for the specified index.
      Parameters:
      idx - Value index
      fillColor - Filling color
    • getBarFillColorAt

      public Color getBarFillColorAt(int idx)
      Return the fill color for the specified index
      Parameters:
      idx - Value index
      Returns:
      The filling color or default fill color if index not found.
    • setBarFillColors

      public void setBarFillColors(Vector<ColorItem> bfColors)
      Sets the filling color vector for a barchart.
      Parameters:
      bfColors - A vector of Filling colors for barchart
      See Also:
    • getBarFillColors

      public Vector<ColorItem> getBarFillColors()
      Gets the filling color vector for a barchart.
      Returns:
      A vector of Filling colors for barchart
      See Also:
    • setColor

      public void setColor(Color c)
      Sets the color of the curve.
      Parameters:
      c - Curve color
      See Also:
    • getColor

      public Color getColor()
      Gets the curve color.
      Returns:
      Curve color
      See Also:
    • isFill

      public boolean isFill()
      Provided for backward compatibility.
      Returns:
      true if the view is filled, false otherwise
      See Also:
    • setFill

      public void setFill(boolean b)
      Provided for backward compatibility.
      Parameters:
      b - true if the view is filled, false otherwise
      See Also:
    • setClickable

      public void setClickable(boolean b)
      Sets this view clickable or not. When set to false, this view is excluded from the search that occurs when the user click on the chart. Default is true.
      Parameters:
      b - Clickable state
    • isClickable

      public boolean isClickable()
      Returns:
      the clickable state.
      See Also:
    • setLabelVisible

      public void setLabelVisible(boolean b)
      Display the label of this view when true. This has effects only if the parent chart has visible labels.
      Parameters:
      b - visible state
      See Also:
    • isLabelVisible

      public boolean isLabelVisible()
      Returns:
      true when the label is visible.
      See Also:
    • getLabelColor

      public Color getLabelColor()
    • setLabelColor

      public void setLabelColor(Color labelColor)
    • setInterpolationMethod

      public void setInterpolationMethod(int method)
      Set an interpolation on this dataview using the specified method. (Cubic interpolation requires constant x interval)
      Parameters:
      method - Interpolation method
      See Also:
    • getInterpolationMethod

      public int getInterpolationMethod()
      Returns:
      current interpolation mode.
      See Also:
    • setInterpolationStep

      public void setInterpolationStep(int step)
      Sets the interpolation step
      Parameters:
      step - Interpolation step (must be >=2)
      See Also:
    • getInterpolationStep

      public int getInterpolationStep()
      Returns:
      the interpolation step.
      See Also:
    • setHermiteTension

      public void setHermiteTension(double tension)
      Set the Hermite interpolation tension coefficient
      Parameters:
      tension - Hermite interpolation tension coefficient (1=high, 0=normal, -1=low)
    • getHermiteTension

      public double getHermiteTension()
      Returns:
      the Hermite interpolation tension coefficient
      See Also:
    • setHermiteBias

      public void setHermiteBias(double bias)
      Set the Hermite interpolation bias coefficient. 0 for no bias, positive value towards first segment, negative value towards the others.
      Parameters:
      bias - Hermite interpolation bias coefficient
    • getHermiteBias

      public double getHermiteBias()
      Returns:
      the Hermite interpolation bias coefficient.
    • setSmoothingMethod

      public void setSmoothingMethod(int method)
      Sets the smoothing method (Convolution product). Requires constant x intervals.
      Parameters:
      method - Smoothing filer type
      See Also:
    • getSmoothingMethod

      public int getSmoothingMethod()
      Returns:
      the smoothing method.
      See Also:
    • setSmoothingNeighbors

      public void setSmoothingNeighbors(int n)
      Sets number of neighbors for smoothing
      Parameters:
      n - Number of neighbors (Must be >= 2)
    • getSmoothingNeighbors

      public int getSmoothingNeighbors()
      Returns:
      number of neighbors for smoothing
      See Also:
    • setSmoothingGaussSigma

      public void setSmoothingGaussSigma(double sigma)
      Sets the standard deviation of the gaussian (Smoothing filter).
      Parameters:
      sigma - Standard deviation
      See Also:
    • getSmoothingGaussSigma

      public double getSmoothingGaussSigma()
      Returns:
      the standard deviation of the gaussian (Smoothing filter).
      See Also:
    • setSmoothingExtrapolation

      public void setSmoothingExtrapolation(int extMode)
      Sets the extrapolation method used in smoothing operation
      Parameters:
      extMode - Extrapolation mode
      See Also:
    • getSmoothingExtrapolation

      public int getSmoothingExtrapolation()
      Returns:
      the extrapolation method used in smoothing operation.
      See Also:
    • setMathFunction

      public void setMathFunction(int function)
      Sets a mathematical function
      Parameters:
      function - Function
      See Also:
    • getMathFunction

      public int getMathFunction()
      Returns:
      the current math function.
      See Also:
    • setBarWidth

      public void setBarWidth(int w)
      Sets the width of the bar in pixel (Bar graph mode). Pass 0 to have bar auto scaling.
      Parameters:
      w - Bar width (pixel)
      See Also:
    • getBarWidth

      public int getBarWidth()
      Gets the bar width.
      Returns:
      Bar width (pixel)
      See Also:
    • setMarkerColor

      public void setMarkerColor(Color c)
      Sets the marker color.
      Parameters:
      c - Marker color
      See Also:
    • getMarkerColor

      public Color getMarkerColor()
      Gets the marker color.
      Returns:
      Marker color
      See Also:
    • setStyle

      public void setStyle(int c)
      Set the plot line style.
      Parameters:
      c - Line style
      See Also:
    • getMarkerSize

      public int getMarkerSize()
      Gets the marker size.
      Returns:
      Marker size (pixel)
      See Also:
    • setMarkerSize

      public void setMarkerSize(int c)
      Sets the marker size (pixel).
      Parameters:
      c - Marker size (pixel)
      See Also:
    • getStyle

      public int getStyle()
      Gets the line style.
      Returns:
      Line style
      See Also:
    • getLineWidth

      public int getLineWidth()
      Gets the line width.
      Returns:
      Line width
      See Also:
    • setLineWidth

      public void setLineWidth(int c)
      Sets the line width (pixel).
      Parameters:
      c - Line width (pixel)
      See Also:
    • setName

      public void setName(String s)
      Sets the view name.
      Parameters:
      s - Name of this view
      See Also:
    • getName

      public String getName()
      Gets the view name.
      Returns:
      Dataview name
      See Also:
    • setUnit

      public void setUnit(String s)
      Set the dataView unit. (Used only for display)
      Parameters:
      s - Dataview unit.
      See Also:
    • getUnit

      public String getUnit()
      Gets the dataView unit.
      Returns:
      Dataview unit
      See Also:
    • getExtendedName

      public String getExtendedName()
      Gets the extended name. (including transform description when used)
      Returns:
      Extended name of this view.
    • getMarker

      public int getMarker()
      Gets the marker type.
      Returns:
      Marker type
      See Also:
    • setMarker

      public void setMarker(int m)
      Sets the marker type.
      Parameters:
      m - Marker type
      See Also:
    • setDrawOnNaN

      public void setDrawOnNaN(boolean drawOnNaN)
      In Bar chart mode, draw a bar up to the yAxis maximum on a NaN value
      Parameters:
      drawOnNaN - Draw on NaN flag
    • isDrawOnNaN

      public boolean isDrawOnNaN()
    • getA0

      public double getA0()
      Gets the A0 transformation coeficient.
      Returns:
      A0 value
      See Also:
    • getA1

      public double getA1()
      Gets the A1 transformation coeficient.
      Returns:
      A1 value
      See Also:
    • getA2

      public double getA2()
      Gets the A2 transformation coeficient.
      Returns:
      A2 value
      See Also:
    • setA0

      public void setA0(double d)
      Set A0 transformation coeficient. The transformation computes new value = A0 + A1*v + A2*v*v. Transformation is disabled when A0=A2=0 and A1=1.
      Parameters:
      d - A0 value
    • setA1

      public void setA1(double d)
      Set A1 transformation coeficient. The transformation computes new value = A0 + A1*v + A2*v*v. Transformation is disabled when A0=A2=0 and A1=1.
      Parameters:
      d - A1 value
    • setA2

      public void setA2(double d)
      Set A2 transformation coeficient. The transformation computes new value = A0 + A1*v + A2*v*v. Transformation is disabled when A0=A2=0 and A1=1.
      Parameters:
      d - A2 value
    • hasTransform

      public boolean hasTransform()
      Determines wether this views has a transformation.
      Returns:
      false when A0=A2=0 and A1=1, true otherwise
    • hasFilter

      public boolean hasFilter()
      Determines wether this view is affected by a transform.
      Returns:
      false when no filtering true otherwise.
      See Also:
    • setAxis

      public void setAxis(JLAxis a)
      Expert usage. Sets the parent axis. ( Used by JLAxis.addDataView() )
      Parameters:
      a - Parent axis
    • getAxis

      public JLAxis getAxis()
      Expert usage. Gets the parent axis.
      Returns:
      Parent axis
    • getMinimum

      public double getMinimum()
      Expert usage. Gets the minimum (Y axis).
      Returns:
      Minimum value
    • getMaximum

      public double getMaximum()
      Expert usage. Gets the maximum (Y axis).
      Returns:
      Maximun value
    • getMinTime

      public double getMinTime()
      Expert usage. Gets the minimun on X axis (with TIME_ANNO).
      Returns:
      Minimum time
    • getMinXValue

      public double getMinXValue()
      Expert usage. Gets the minimum on X axis.
      Returns:
      Minimum x value
    • getPositiveMinXValue

      public double getPositiveMinXValue()
      Expert usage. Get the positive minimum on X axis.
      Returns:
      Minimum value strictly positive
    • getPositiveMinTime

      public double getPositiveMinTime()
      Expert usage. Get the positive minimum on X axis.
      Returns:
      Minimum value strictly positive
    • getMaxXValue

      public double getMaxXValue()
      Expert usage. Get the maximum on X axis
      Returns:
      Maximum x value
    • getMaxTime

      public double getMaxTime()
      Expert usage. Get the maxinmun on X axis (with TIME_ANNO)
      Returns:
      Maximum value
    • getDataLength

      public int getDataLength()
      Gets the number of data in this view.
      Returns:
      Data length
    • getData

      public DataList getData()
      Return a handle on the data. If you modify data, call commitChange() after the update. Expert usage.
      Returns:
      A handle to the data.
      See Also:
    • commitChange

      public void commitChange()
      Commit change when some data has been in modified in the DataList (via getData())
      See Also:
    • add

      public void add(double x, double y)
      Add datum to the dataview. If you call this routine directly the graph will be updated only after a repaint and your data won't be garbaged (if a display duration is specified). You should use JLChart.addData instead.
      Parameters:
      x - x coordinates (real space)
      y - y coordinates (real space)
      See Also:
    • add

      public void add(double x, double y, boolean updateFilter)
      Add datum to the dataview. If you call this routine directly the graph will be updated only after a repaint and your data won't be garbaged (if a display duration is specified). You should use JLChart.addData instead.
      Parameters:
      x - x coordinates (real space)
      y - y coordinates (real space)
      updateFilter - update filter flag.
      See Also:
    • setData

      public void setData(double[] x, double[] y)
      Set data of this dataview.
      Parameters:
      x - x values
      y - y values
      See Also:
    • setUnorderedData

      public void setUnorderedData(double[] x, double[] y)
      Set data of this dataview and order value according to the x value
      Parameters:
      x - x values
      y - y values
      See Also:
    • add

      public void add(Point2D.Double p)
      Add datum to the dataview. If you call this routine directly the graph will be updated only after a repaint and your data won't be garbaged (if a display duration is specified). You should use JLChart.addData instead.
      Parameters:
      p - point (real space)
      See Also:
    • garbagePointTime

      public int garbagePointTime(double garbageLimit)
      Garbage old data according to time.
      Parameters:
      garbageLimit - Limit time (in millisec)
      Returns:
      Number of deleted point.
    • garbagePointLimit

      public void garbagePointLimit(int garbageLimit)
      Garbage old data according to data length. It will remove the (dataLength-garbageLimit) first points.
      Parameters:
      garbageLimit - Index limit
    • computeDataBounds

      public void computeDataBounds()
      Computes and stores min and max on x and y
    • computeTransformedMinMax

      public double[] computeTransformedMinMax()
      Expert usage. Compute transformed min and max.
      Returns:
      Transformed min and max
    • computePositiveMin

      public double computePositiveMin()
      Compute minimun of positive value.
      Returns:
      Double.MAX_VALUE when no positive value are found
    • getTransformedValue

      public double getTransformedValue(double x)
      Compute transformed value of x.
      Parameters:
      x - Value to transform
      Returns:
      transformed value (through A0,A1,A2 transformation)
    • getLastValue

      public DataList getLastValue()
      Get last value.
      Returns:
      Last value
    • getLastValueRaw

      public DataList getLastValueRaw()
      Get last value ignoring filter
      Returns:
      Last value
    • reset

      public void reset()
      Clear all data in this view.
    • applyConfiguration

      public void applyConfiguration(String prefix, CfFileReader f)
      Apply dataview configuration.
      Parameters:
      prefix - settings prefix
      f - CfFileReader object wich contains dataview parametters
      See Also:
    • getConfiguration

      public String getConfiguration(String prefix)
      Build a configuration string that can be write into a file and is compatible with CfFileReader.
      Parameters:
      prefix - DataView prefix
      Returns:
      A string containing param.
      See Also:
    • getYValueByIndex

      public double getYValueByIndex(int idx)
      Returns Y value according to index.
      Parameters:
      idx - Value index
      Returns:
      Y value
    • getXValueByIndex

      public double getXValueByIndex(int idx)
      Returns X value according to index.
      Parameters:
      idx - Value index
      Returns:
      X value
    • setUserFormat

      public void setUserFormat(String format)
      Sets the format property for this dataview (C format). By default, it uses the Axis format.
      Parameters:
      format - Format (C style)
    • setDrawingMode

      public void setDrawingMode(int mode)
      Sets the drawing mode
      Parameters:
      mode - Drawing mode
      See Also:
    • getDrawingMode

      public int getDrawingMode()
      Returns the drawingMode
      Returns:
      Drawing mode
      See Also:
    • addChangeListener

      public void addChangeListener(ChangeListener l)
      Add a listener to this dataview, triggered when a setting change.
      Parameters:
      l - ChangeListener
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
    • clearChangeListener

      public void clearChangeListener()
    • getUserFormat

      public String getUserFormat()
      Returns:
      the current user format (null when none).
    • formatValue

      public String formatValue(double v)
      Format the given value according the userFormat or to the Axis format.
      Parameters:
      v - Value to be formated
      Returns:
      The formatted string
    • isXDataSorted

      public boolean isXDataSorted()
      Returns whether data is supposed to be sorted on x or not
      Returns:
      a boolean value
    • setXDataSorted

      public void setXDataSorted(boolean dataSorted)
      Set whether data is supposed to be sorted on x or not. false by default
      Parameters:
      dataSorted - a boolean value
    • getSortedTimes

      public double[] getSortedTimes()
    • getSortedValues

      public double[] getSortedValues()
    • getDataSortedByTimes

      public double[][] getDataSortedByTimes()
    • getDataSortedByValues

      public double[][] getDataSortedByValues()
    • removeFromAxis

      public void removeFromAxis()
      Convenience function for removing this dataview from its axis (if any)
    • mergeSort

      public static void mergeSort(double[] array, double[] associated)
      Applies merge sort on an array of double. If an associated array is given, its elements are moved the same way as the array to sort.
      Parameters:
      array - The array to sort
      associated - The associated array. Must be null or of the same length of array
    • setRemoveAverage

      public void setRemoveAverage(boolean remove)
      Remove average when calculating FFT
      Parameters:
      remove - True to remove average
    • getRemoveAverage

      public boolean getRemoveAverage()
      Returns:
      true if average is removed during FFT calculation
    • setSamplingFrequency

      public void setSamplingFrequency(double f)
      Sets the smapling freqncy used for FFT calculation
      Parameters:
      f - Smapling frequnecy
    • getSamplingFrequency

      public double getSamplingFrequency()
      Returns:
      the smapling freqncy used for FFT calculation
    • updateFilters

      public void updateFilters()
      Update filter calulation. Call this function if you're using the add(x,y,false) mehtod.