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
  • Constructor Details

  • Method Details

    • setupLogging

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

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

      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:
      notify - Notify other PamObservers and PamObservables in the chain.
    • isTraining

      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

      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

      public void pamHasStopped()
    • pamStop

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

      public void prepareTrainingStore()
    • prepareTrainingStore

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

      public void writeTrainingStoreData()
    • closeTrainingStore

      public void closeTrainingStore()
    • masterClockUpdate

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

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

      public void runTimingFunctions(long timeMilliseconds)
    • resetClassifier

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

      public void clearFragmentStore(long clearTime)
    • runClassification

      public boolean runClassification(long timeMillis)
      Run the classification model.
      Returns:
      true if model ran without errors.
    • getFragmentStore

      public FragmentStore getFragmentStore()