Package PamguardMVC

Class DataBlock2D<Tunit extends PamDataUnit>

Direct Known Subclasses:
BeamOGramDataBlock, FFTDataBlock, RawFFTPlot.SimpleFFTDataBlock, ScaleTest2D

public abstract class DataBlock2D<Tunit extends PamDataUnit> extends AcousticDataBlock<Tunit>
  • Constructor Details

    • DataBlock2D

      public DataBlock2D(Class unitClass, String dataName, PamProcess parentProcess, int channelMap)
  • Method Details

    • getHopSamples

      public abstract int getHopSamples()
      Get the advance between slices in samples. For FFT data this is the same thing as the FFT Hop
      Returns:
      advance in samples between slices.
    • getDataWidth

      public abstract int getDataWidth(int sequenceNumber)
      Get the length of contained data. For FFT data this will be FFTLength()/2.
      Returns:
      length of data in each slice.
    • getMinDataValue

      public abstract double getMinDataValue()
      Get the minimum value which can occur in the data. e.g. 0 for FFT data.
      Returns:
      the data's minimum value
    • getMaxDataValue

      public abstract double getMaxDataValue()
      Get the maximum value which can occur in the data. e.g. sampleRate/2 for FFT data.
      Returns:
      the data's maximum value
    • isLogScale

      public boolean isLogScale()
      Are the data on a log scale
      Returns:
      true if log, default is false.
    • bin2Value

      public double bin2Value(double bin, int sequenceNumber)
      Convert a bin to a value. e.g. a fft bin to a frequency
      Parameters:
      bin - bin number, e.g. pos in fft.
      sequenceNumnber - (channel)
      Returns:
      data value
    • value2bin

      public double value2bin(double value, int sequenceNumber)
      convert a data value to a bin
      Parameters:
      value - data value
      sequenceNumber - (channel)
      Returns:
      bin within data (can exceed limits if too large !)
    • getScaleInfo

      public abstract DataTypeInfo getScaleInfo()
      Get the scale units to display on axis, etc.
      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 AcousticDataBlock<Tunit extends PamDataUnit>
      Parameters:
      doc -
      Returns:
      XML element with description of data.