Package gpl.whiten

Class MovingMatrix

java.lang.Object
gpl.whiten.MovingMatrix

public class MovingMatrix extends Object
A matrix for moving average calculations, initially designed to replicate some functionality in SIO GPL_Quiet function.

Will store squared data in the matrix to save on later squaring ...

Author:
dg50
  • Constructor Details

    • MovingMatrix

      public MovingMatrix(int nTime, int nFreq)
  • Method Details

    • addData

      public void addData(double[] newSlice)
      Add a new row of data to the matrix.
      Parameters:
      newSlice -
    • getnTime

      public int getnTime()
      Returns:
      the nTime
    • getnFreq

      public int getnFreq()
      Returns:
      the nFreq
    • getSumTime2

      public double[] getSumTime2()
      Returns:
      the sumTime2
    • getSumFreq2

      public double[] getSumFreq2()
      Get the energy summed over time in each frequency bin
      Returns:
      the sumFreq2
    • getiTime

      public int getiTime()
      Get the index of the last time bin to be filled.
      Returns:
      the iTime
    • getTimeIndex

      public int getTimeIndex(int offset)
      Get the index of a time bin which is offset beins earlier than the current bin.
      Parameters:
      offset - positive number saying how far back in time to go. 0 == last entry.
      Returns:
      bin number based on current bin index and the offset.