Package cpod

Class CPODClick

All Implemented Interfaces:
Comparable<PamDataUnit>, RawDataHolder

public class CPODClick extends PamDataUnit<PamDataUnit,SuperDetection> implements RawDataHolder
CPOD or FPOD click.
  • Constructor Details

    • CPODClick

      public CPODClick(long tMillis, long fileSamples, short nCyc, short bw, short kHz, short endF, short spl, short slope, short[] shortData)
      Constructor for a CPOD click. This adds all basic information that is required for a CPOD or FPOD click
      Parameters:
      tMillis - - the time in millis.
      fileSamples - - the file samples
      nCyc - - the number of cycles
      bw - -the bandwidth in kHZ
      kHz - - the frequency in kHz.
      endF - - the end frequency in kHz.
      spl - - the spl (0-255) unitless.
      slope - - the slope
      shortData - - the raw data.
  • Method Details

    • makeClick

      public static CPODClick makeClick(DataUnitBaseData baseData, short[] shortData)
      Create a CPOD click. (This is used to load CPOD clicks from the binary store)
      Parameters:
      baseData - - the base data.
      shortData - -contains the raw CPOD data
      Returns:
      a new CPOD click.
    • makeClick

      @Deprecated public static CPODClick makeClick(CPODControl cpodControl, long minuteMillis, short[] shortData)
      Deprecated.
      Create a CPOD click. This is usually called whenever the CPOD click is imported from a CSV file.
      Parameters:
      minuteMillis - The time in miliiseconds of the minute block preceding the current click.
      shortData -
      Returns:
    • makeFPODClick

      public static CPODClick makeFPODClick(long tMillis, long fileSamples, FPODReader.FPODdata fpodData)
      Make a FPOD click. This called whenever click has been imported from a FP1 or FP3 file
      Parameters:
      tMillis - - the time in milliseconds datenum.
      fileSamples - - the number of samples into the file the CPOD click is at - this is calculated from CPODClickDataBlock.CPOD_SR
      shortData - - the raw data from the CPOD click. This can be 8 bytes or 30 bytes if a click train clcik
      Returns:
      a CPODClick object.
    • makeCPODClick

      public static CPODClick makeCPODClick(long tMillis, long fileSamples, short[] shortData)
      Make a CPOD click. This called whenever click has been imported from a CP1 or CP3 file
      Parameters:
      tMillis - - the time in milliseconds datenum.
      fileSamples - - the number of samples into the file the CPOD click is at - this is calculated from CPODClickDataBlock.CPOD_SR
      shortData - - the raw data from the CPOD click. This can be 8 bytes or 40 bytes if a click train clcik
      Returns:
      a CPODClick object.
    • getRawData

      public short[] getRawData()
      Get the raw data.
      Returns:
      the raw data.
    • getnCyc

      public short getnCyc()
      Returns:
      the nCyc
    • setnCyc

      public void setnCyc(short nCyc)
      Parameters:
      nCyc - the nCyc to set
    • getBw

      public short getBw()
      Returns:
      the bw
    • setBw

      public void setBw(short bw)
      Parameters:
      bw - the bw to set
    • getkHz

      public short getkHz()
      Returns:
      the kHz
    • setkHz

      public void setkHz(short kHz)
      Parameters:
      kHz - the kHz to set
    • getEndF

      public short getEndF()
      Returns:
      the endF
    • setEndF

      public void setEndF(short endF)
      Parameters:
      endF - the endF to set
    • getSpl

      public short getSpl()
      Returns:
      the spl
    • setSpl

      public void setSpl(short spl)
      Parameters:
      spl - the spl to set
    • getSlope

      public short getSlope()
      Returns:
      the slope
    • setSlope

      public void setSlope(short slope)
      Parameters:
      slope - the slope to set
    • setICISamples

      public void setICISamples(long iciSamples)
    • getICISamples

      public long getICISamples()
    • getAmplitudeDB

      public double getAmplitudeDB()
      Get a rough estimation of the recieved amplitude of a CPOD in dB
      Overrides:
      getAmplitudeDB in class PamDataUnit<PamDataUnit,SuperDetection>
      Returns:
      the amplitude in dB.
    • getSummaryString

      public String getSummaryString()
      Description copied from class: PamDataUnit
      Return an html formatted summary string describing the detection which can be used in tooltips anywhere in PAMGuard.
      Overrides:
      getSummaryString in class PamDataUnit<PamDataUnit,SuperDetection>
      Returns:
      summary string
    • 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
    • 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.
    • setRawDataTransfroms

      public void setRawDataTransfroms(RawDataTransforms rawDataTransforms)
    • setWavData

      public void setWavData(double[][] ds)
    • getCPODClickTrain

      public CPODClickTrainDataUnit getCPODClickTrain()
      Get the click train detection from the click detection
      Returns:
      the click train detection
    • setClassification

      public void setClassification(CPODClassification cpodClassification)
    • getClassification

      public CPODClassification getClassification()