Package fftManager

Class FFTDataBlock

Direct Known Subclasses:
BeamFormerDataBlock, CepstrumDataBlock, LtsaDataBlock

public class FFTDataBlock extends DataBlock2D<FFTDataUnit>
  • Constructor Details

    • FFTDataBlock

      public FFTDataBlock(String dataName, PamProcess parentProcess, int channelMap, int fftHop, int fftLength)
  • Method Details

    • getLongDataName

      public String getLongDataName()
      Description copied from class: PamDataBlock
      Get a slightly longer data name that also contains the module name
      Overrides:
      getLongDataName in class PamDataBlock<FFTDataUnit>
      Returns:
      longer data name including module name.
    • getOldLongDataName

      public String getOldLongDataName()
    • getFftLength

      public int getFftLength()
    • setFftLength

      public void setFftLength(int fftLength)
    • getFftHop

      public int getFftHop()
    • setFftHop

      public void setFftHop(int fftHop)
    • dumpBlockContents

      public void dumpBlockContents()
      Overrides:
      dumpBlockContents in class PamDataBlock<FFTDataUnit>
    • clearAll

      public void clearAll()
      Description copied from class: PamDataBlock
      Clears all PamDataUnits from memory

      In viewer mode, data are also re-saved.

      Overrides:
      clearAll in class PamDataBlock<FFTDataUnit>
    • recycleComplexArray

      public void recycleComplexArray(Complex[] complexArray)
    • getComplexArray

      public Complex[] getComplexArray(int arrayLength)
    • getDataGain

      public double getDataGain(int iChan)
      Description copied from class: PamDataBlock
      Return the gain applied to any data created into this datablock.

      Example 1: The amplifier module will just return it's gain

      Example 2: The FFT module will return the loss due to windowing the data.

      To convert to dB use 20*log10(Math.abs(getDataGain()));

      Overrides:
      getDataGain in class PamDataBlock<FFTDataUnit>
      Parameters:
      iChan - channel number
      Returns:
      gain as a factor (to allow for negative gains)
    • setWindowGain

      public void setWindowGain(double windowGain)
      Parameters:
      windowGain - the windowGain to set
    • setRecycle

      public void setRecycle(boolean recycle)
    • isRecycle

      public boolean isRecycle()
    • getHopSamples

      public int getHopSamples()
      Description copied from class: DataBlock2D
      Get the advance between slices in samples. For FFT data this is the same thing as the FFT Hop
      Specified by:
      getHopSamples in class DataBlock2D<FFTDataUnit>
      Returns:
      advance in samples between slices.
    • getDataWidth

      public int getDataWidth(int sequenceNumber)
      Description copied from class: DataBlock2D
      Get the length of contained data. For FFT data this will be FFTLength()/2.
      Specified by:
      getDataWidth in class DataBlock2D<FFTDataUnit>
      Returns:
      length of data in each slice.
    • getMinDataValue

      public double getMinDataValue()
      Description copied from class: DataBlock2D
      Get the minimum value which can occur in the data. e.g. 0 for FFT data.
      Specified by:
      getMinDataValue in class DataBlock2D<FFTDataUnit>
      Returns:
      the data's minimum value
    • getMaxDataValue

      public double getMaxDataValue()
      Description copied from class: DataBlock2D
      Get the maximum value which can occur in the data. e.g. sampleRate/2 for FFT data.
      Specified by:
      getMaxDataValue in class DataBlock2D<FFTDataUnit>
      Returns:
      the data's maximum value
    • getChannelMap

      public int getChannelMap()
      Overrides:
      getChannelMap in class PamDataBlock<FFTDataUnit>
      Returns:
      Software channel map for the data block.
    • getScaleInfo

      public DataTypeInfo getScaleInfo()
      Description copied from class: DataBlock2D
      Get the scale units to display on axis, etc.
      Specified by:
      getScaleInfo in class DataBlock2D<FFTDataUnit>
      Returns:
      data type information.
    • getDataBlockXML

      public Element getDataBlockXML(Document doc)
      Description copied from class: PamDataBlock
      Get a brief summary of datablock to include in XML descriptions. Basic output is very simple. Expect other datablock to extend this by adding additional attributes.
      Overrides:
      getDataBlockXML in class DataBlock2D<FFTDataUnit>
      Returns:
      XML element with description of data.