Class MTProcess

All Implemented Interfaces:
PamObserver, ProcessAnnotator

public class MTProcess extends PamInstantProcess
Calculates a correlation difference coefficient between a match and reject click template and classifies a data unit based on a threshold value for the coefficient. Input data units must implement RawDataHolder, i.e. must have a raw waveform available.

The MTClassifier annotates data units with results from the matched template. It also adds data unit specific flags e.g. species flags to click detections.

Author:
Jamie Macaulay
  • Constructor Details

    • MTProcess

      public MTProcess(MTClassifierControl pamControlledUnit)
      The MTProcess
      Parameters:
      pamControlledUnit - - the pam controlled unit.
  • Method Details

    • setupProcess

      public void setupProcess()
      Description copied from class: PamProcess
      called for every process once the systemmodel has been created. this is a good time to check out and find input data blocks and similar tasks.
      Overrides:
      setupProcess in class PamProcess
    • newData

      public void newData(PamObservable o, PamDataUnit arg)
      Overrides:
      newData in class PamProcess
    • newClickData

      public void newClickData(PamDataUnit clickDetection)
      A new click has arrived . It needs to be classified
      Parameters:
      clickDetection - - the incoming click.
    • createRestrictedLenghtWave

      public static double[] createRestrictedLenghtWave(RawDataHolder click, int chan, int[] lengthPoints, int restrictedBins, double[] win)
      Create restricted waveform.
      Parameters:
      click - - the input data unit
      chan - - the channel to use
      lengthPoints - - the restricted start/end points.
      restrictedBins - - the number of bins to restrict the waveform to.
      win - - the window to use e.g. WindowFunction.hann(restrictedBins)
      Returns:
      the restricted waveform.
    • createRestrictedLenghtWave

      public static double[] createRestrictedLenghtWave(double[] waveData, int[] lengthPoints, int restrictedBins, double[] win)
      Create restricted waveform.
      Parameters:
      waveData - - the wave data to process
      lengthPoints - - the restricted start/end points.
      restrictedBins - - the number of bins to restrict the waveform to.
      win - - the window to use e.g. WindowFunction.hann(restrictedBins)
      Returns:
      the restricted waveform.
    • pamStart

      public void pamStart()
      Description copied from class: PamProcess
      Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).
      Specified by:
      pamStart in class PamProcess
    • pamStop

      public void pamStop()
      Description copied from class: PamProcess
      Stops the process.
      Specified by:
      pamStop in class PamProcess
    • getMTControl

      public MTClassifierControl getMTControl()
      Get the Matched Click Classifier Controller for this process.
      Returns:
      the matched click classifier controller.
    • getBespokeClassifierManager

      public BeskopeClassifierManager getBespokeClassifierManager()
      Get the manager for bespoke data units. This handles adding custom flags to different ypes of data units.
      Returns:
      the bespoke classifier manager
    • getCompatibleDataUnits

      public ArrayList getCompatibleDataUnits()
      A list of data block class types which are compatible as parent data blocks for the PamProcess. This can return null, e.g. in the case of Acquisition process.
      Overrides:
      getCompatibleDataUnits in class PamProcess
      Returns:
      a list of PamDataBlock sub class types which can be used as parent data blocks for the process.