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 Link icon

    • CPODClick Link icon

      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 Link icon

    • makeClick Link icon

      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 Link icon

      @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 Link icon

      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 Link icon

      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 Link icon

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

      public short getnCyc()
      Returns:
      the nCyc
    • setnCyc Link icon

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

      public short getBw()
      Returns:
      the bw
    • setBw Link icon

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

      public short getkHz()
      Returns:
      the kHz
    • setkHz Link icon

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

      public short getEndF()
      Returns:
      the endF
    • setEndF Link icon

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

      public short getSpl()
      Returns:
      the spl
    • setSpl Link icon

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

      public short getSlope()
      Returns:
      the slope
    • setSlope Link icon

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

      public void setICISamples(long iciSamples)
    • getICISamples Link icon

      public long getICISamples()
    • getAmplitudeDB Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      public void setRawDataTransfroms(RawDataTransforms rawDataTransforms)
    • setWavData Link icon

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

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

      public void setClassification(CPODClassification cpodClassification)
    • getClassification Link icon

      public CPODClassification getClassification()