Class ThresholdDetectorDataUnit

java.lang.Object
PamguardMVC.PamDataUnit<PamDataUnit,SuperDetection>
likelihoodDetectionModule.thresholdDetector.ThresholdDetectorDataUnit
All Implemented Interfaces:
Comparable<PamDataUnit>, PamDetection, AcousticDataUnit

public class ThresholdDetectorDataUnit extends PamDataUnit<PamDataUnit,SuperDetection> implements PamDetection
This is the Threshold Detectors output data unit. PamDetection units are sent off describing a detection, and will be picked up by subscribers (SQL Logging, OverlayGraphics, localizers, etc).

Along with the constructor's parameters (see its documentation for those), we also set the following properties of the PamDetection before sending it on its way:

MeasuredAmplitude - The peak value (in Decibels, 10*log10() ) of the Likelihood Ratio. The likelihood ratio is the signal estimate/background noise estimate

PeakTime - The time of the peak value described above. This value is in double precision seconds since the beginning of the data capture.

Frequency - This is a double[2] describing a frequency range. frequency[0] is the low frequency, frequency[1] the high frequency. These values are taken verbatim from the target configuration as entered by the user, not calculated from the actual detection region.

DetectionType - A string uniquely identifying the detection. We concatenate the configuration name with the signal band name which the detection occurred within. For example "Bowhead - End Note"; Bowhead is the configuration name, and End Note is the signal band.

EstimatedPeakTimeAccuracy - The estimated accuracy of our PeakTime property to help with localization calculations. This value is in seconds (double precision) and is currently set to the spectral processing time resolution.

Author:
Dave Flogeras
  • Constructor Details

    • ThresholdDetectorDataUnit

      public ThresholdDetectorDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration)
      Parameters:
      timeMilliseconds - The time in milliseconds of the start of the detection.
      channelBitmap - The channel that this detection was triggered on.
      startSample - The sample number of the start of this detection. This is in terms of the raw sampled data from the data source.
      duration - The duration of the detection, also in terms of raw input data samples.
  • Method Details

    • setEstimatedPeakTimeAccuracy

      public void setEstimatedPeakTimeAccuracy(double p)
    • getEstimatedPeakTimeAccuracy

      public double getEstimatedPeakTimeAccuracy()
    • getDetectionType

      public String getDetectionType()
      Returns:
      Returns the detectionType.
    • setDetectionType

      public void setDetectionType(String detectionType)
      Parameters:
      detectionType - The detectionType to set.
    • getPeakTime

      public double getPeakTime()
      Returns:
      Returns the peakTime, in msec. relative to the start of the PAMGUARD run
    • setPeakTime

      public void setPeakTime(double peakTimeMsec)
      Parameters:
      peakTimeMsec - The peakTime to set, in msec. relative to the start of the PAMGUARD run.