Class GroupedRawData

java.lang.Object
PamguardMVC.PamDataUnit
rawDeepLearningClassifier.segmenter.GroupedRawData
All Implemented Interfaces:
Cloneable, Comparable, PamDetection, AcousticDataUnit
Direct Known Subclasses:
ClickDLTest.PredGroupedRawData

public class GroupedRawData extends PamDataUnit implements PamDetection, Cloneable
Temporary holder for raw data with a pre defined size. This holds one channel group of raw sound data.
Author:
Jamie Macaulay
  • Constructor Details

    • GroupedRawData

      public GroupedRawData(long timeMilliseconds, int channelBitmap, long startSample, long duration, int samplesize)
      Create a grouped raw data unit. This contains a segment of sound data.
      Parameters:
      timeMilliseconds - - the time in milliseconds.
      channelBitmap - - the channel bitmap of the raw data.
      startSample - - the start sample of the raw data.
      duration - - the duration of the raw data in samples.
      samplesize - - the total sample size of the raw data unit chunk in samples.
  • Method Details

    • setParentDataUnit

      public void setParentDataUnit(PamDataUnit rawDataUnit)
      Set the parent data unit.
      Parameters:
      unit - - the raw data unit.
    • getParentDataUnit

      public PamDataUnit getParentDataUnit()
      Get the data unit that this raw sound segment is associated with.
    • copyRawData

      public int copyRawData(Object src, int srcPos, int copyLen, int groupChan)
      Copy raw data from an array to another.
      Parameters:
      src - - the array to come from
      srcPos - - the raw source position
      copyLen - - the copy length.
      Returns:
      overflow - the number of raw data points left at the end which were not copied.
    • getRawData

      public double[][] getRawData()
      Get the raw data grouped by channel.
      Returns:
      the raw acoustic data.
    • setRawData

      public void setRawData(double[][] rawData)
      Set the raw data grouped by channel.
      Parameters:
      the - raw acoustic data to set
    • getRawDataPointer

      public int[] getRawDataPointer()
      Get the current pointer for rawData.
      Returns:
      the data pointer per channel.