Class WhistleClassifierProcess

java.lang.Object
PamguardMVC.PamProcess
whistleClassifier.WhistleClassifierProcess
All Implemented Interfaces:
PamObserver, ProcessAnnotator

public class WhistleClassifierProcess extends PamProcess
Whistle Classifier process

Receives whistles from either whistle detector. Fragments them and either stores the fragments for later training or builds up information on many fragments and then classifies when it's got enough.

Keeps a list or recent whistle times so that it can clear the store if the whistle rate drops too low.

Author:
Doug
  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • setupLogging Link icon

      public void setupLogging()
      Called after settings read in so that correct table can be created.
    • checkLoggingTables Link icon

      public void checkLoggingTables()
      Called whenever settings / species list changes to ensure that database table columns match the species list in use.
    • setSampleRate Link icon

      public void setSampleRate(float sampleRate, boolean notify)
      Description copied from interface: PamObserver
      New sample rate
      Specified by:
      setSampleRate in interface PamObserver
      Overrides:
      setSampleRate in class PamProcess
      Parameters:
      sampleRate -
      notify - Notify other PamObservers and PamObservables in the chain.
    • isTraining Link icon

      public boolean isTraining()
      Flag to say that it's in the process of collecting training data.
      Returns:
      true if it's in the process of collecting training data.
    • pamStart Link icon

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

      public void pamHasStopped()
    • pamStop Link icon

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

      public void prepareTrainingStore()
    • prepareTrainingStore Link icon

      public void prepareTrainingStore(String nameBit, String wavFolder)
    • writeTrainingStoreData Link icon

      public void writeTrainingStoreData()
    • closeTrainingStore Link icon

      public void closeTrainingStore()
    • findSourceData Link icon

      protected void findSourceData()
    • masterClockUpdate Link icon

      public void masterClockUpdate(long timeMilliseconds, long sampleNumber)
      Specified by:
      masterClockUpdate in interface PamObserver
      Overrides:
      masterClockUpdate in class PamProcess
    • newData Link icon

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

      public void runTimingFunctions(long timeMilliseconds)
    • resetClassifier Link icon

      public void resetClassifier()
      Called when reprocessing offline.
    • clearFragmentStore Link icon

      public void clearFragmentStore(long clearTime)
    • runClassification Link icon

      public boolean runClassification(long timeMillis)
      Called once enough fragments have accumulated. Run the classification model.
      Returns:
      true if model ran without errors.
    • getFragmentStore Link icon

      public FragmentStore getFragmentStore()
    • getWhistleClassifierControl Link icon

      public WhistleClassifierControl getWhistleClassifierControl()
      Returns:
      the whistleClassifierControl
    • getWhistleClasificationDataBlock Link icon

      public WhistleClassificationDataBlock getWhistleClasificationDataBlock()
      Returns:
      the whistleClasificationDataBlock