java.lang.Object
PamguardMVC.PamDataUnit
clickTrainDetector.clickTrainAlgorithms.mht.mhtMAT.SimpleClick
All Implemented Interfaces:
Comparable, RawDataHolder

public class SimpleClick extends PamDataUnit implements RawDataHolder
Author:
Jamie Macaulay
  • Field Details

    • timeSeconds

      public double timeSeconds
      The time in milliseconds.
    • amplitude

      public double amplitude
      The amplitude of the click in dB
  • Constructor Details

    • SimpleClick

      public SimpleClick(Integer UID, double timeSeconds, double amplitude, float sR)
      Create a simple click
      Parameters:
      UID - - a unique identifier for the click
      timeSeconds - 0- the time in seconds
      amplitude - - the amplitude in dB
    • SimpleClick

      public SimpleClick(Integer UID, Double timeSeconds, Double amplitude, Double bearing, float sR)
      Create a simple click.
      Parameters:
      UID - - a unique identifier for the click
      timeSeconds - 0- the time in seconds
      amplitude - - the amplitude in dB
      bearing - - the bearing in DEGREES
      sR - - the sample rate
    • SimpleClick

      public SimpleClick(Integer UID, Double timeSeconds, Double amplitude, Double bearing, double[] waveform, float sR)
      Create a simple click.
      Parameters:
      UID - - a unique identifier for the click
      amplitude - - the amplitude in dB
      bearing - - the bearing in DEGREES
      waveform - - the waveform
      sR - - the sample rate
      sR - - the sample rate.
  • Method Details

    • compareTo

      public int compareTo(SimpleClick a)
      Comparison for ArrayList comparator.
      Parameters:
      a - - click to compare
      Returns:
      the integer
    • getAmplitudeDB

      public double getAmplitudeDB()
      Description copied from class: PamDataUnit
      Get the calculated amplitude, in dB. If it hasn't been calculated yet, do that first and then return the value
      Overrides:
      getAmplitudeDB in class PamDataUnit
      Returns:
      the amplitude in dB with reference unit dictated by the hydrophone/microphone sensitivity value units.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getWaveData

      public double[][] getWaveData()
      Description copied from interface: RawDataHolder
      Get arrays of raw audio data, one per channel. Assume that the array matches getChannelMap() !
      Specified by:
      getWaveData in interface RawDataHolder
      Returns:
      arrays of raw data by channel
    • getLocalisation

      public AbstractLocalisation getLocalisation()
      Overrides:
      getLocalisation in class PamDataUnit
      Returns:
      Returns the localisation.
    • getDataTransforms

      public RawDataTransforms getDataTransforms()
      Description copied from interface: RawDataHolder
      Get the raw data transforms class. This handles standard data transforms that are often used in raw data units, e.g. calculating the spectrum, filtering waveforms, getting data as an int16 (short) array, etc.
      Specified by:
      getDataTransforms in interface RawDataHolder
      Returns:
      the data transforms object.