Package clickDetector

Class ClickDataBlock

All Implemented Interfaces:
AlarmDataSource, OrganisedFFTData, FFTDataHolderBlock, GroupedDataSource
Direct Known Subclasses:
TrackedClickDataBlock

  • Constructor Details

    • ClickDataBlock

      public ClickDataBlock(ClickControl clickControl, PamProcess parentProcess, int channelMap)
  • Method Details

    • loadViewerData

      public boolean loadViewerData(OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver)
      Click detector loading has to be a bit different to normal - first data are loaded from the binary store, then a subset of these data are loaded from the Offline database. These database clicks are then matched to the data in the
      Overrides:
      loadViewerData in class PamDataBlock<ClickDetection>
      Parameters:
      offlineDataLoadInfo - - the load object which contains all info on the data to be loaded.
      loadObserver - - the load observer. Can be used as a callback for load progress.
    • saveViewerData

      public boolean saveViewerData()
      Description copied from class: PamDataBlock
      Saves data in this data block in offline viewer mode.
      Overrides:
      saveViewerData in class PamDataBlock<ClickDetection>
      Returns:
      true if data found and saved.
    • getPrimaryDataMap

      public OfflineDataMap getPrimaryDataMap()
      Description copied from class: PamDataBlock
      New plan - always use the binary store if it has any data at all. If the binary store doesn't exist or is empty, only then use the database.
      Overrides:
      getPrimaryDataMap in class PamDataBlock<ClickDetection>
      Returns:
      a data map
    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from class: PamDataBlock
      Receive notifications from the main PamController.
      Overrides:
      notifyModelChanged in class AcousticDataBlock<ClickDetection>
    • getUIDRepairLogging

      public SQLLogging getUIDRepairLogging()
      Overrides:
      getUIDRepairLogging in class PamDataBlock<ClickDetection>
    • getOfflineClickLogging

      public OfflineClickLogging getOfflineClickLogging()
      Returns:
      the offlineClickLogging
    • getAlarmCounterProvider

      public AlarmCounterProvider getAlarmCounterProvider()
      Description copied from interface: AlarmDataSource
      Get an alarmCounterProvider which can then generate any number of alarm counters for a datablock.
      Specified by:
      getAlarmCounterProvider in interface AlarmDataSource
      Returns:
      alarm Counter provider for that control. This more complicated system enables multiple alarms to be hung off the same data block.
    • getDataSelectCreator

      public DataSelectorCreator getDataSelectCreator()
      Overrides:
      getDataSelectCreator in class PamDataBlock<ClickDetection>
      Returns:
      an object that can create data selectors to sub select data from within this type of data block.
    • getGroupSourceParameters

      public GroupedSourceParameters getGroupSourceParameters()
      Specified by:
      getGroupSourceParameters in interface GroupedDataSource
      Returns:
      the current group source parameters for this data source.
    • getClickControl

      public ClickControl getClickControl()
      Get a reference to the click control which owns this data block
      Returns:
      click control.
    • getTOADCalculator

      public TOADCalculator getTOADCalculator()
      Overrides:
      getTOADCalculator in class PamDataBlock<ClickDetection>
      Returns:
      A calculator for Time of Arrival Difference Calculations
    • getFFTDataOrganiser

      public FFTDataOrganiser getFFTDataOrganiser()
      Specified by:
      getFFTDataOrganiser in interface OrganisedFFTData
    • getDurationRange

      public double[] getDurationRange()
      Description copied from class: PamDataBlock
      Get the nominal range of durations of sounds that might be detected by this detector (if applicable). This is pretty crude, but will give an indication of which detectors might work with which types of sound.
      can return null, 0 and Double.Infinity are also acceptable values.
      Overrides:
      getDurationRange in class PamDataBlock<ClickDetection>
      Returns:
      duration range in seconds of sounds this detector can sensibly detect
    • getFFTparams

      public int[] getFFTparams()
      Description copied from interface: FFTDataHolderBlock
      Return the fft parameters in the following format:
      • int[0] = fft length
      • int[1] = fft hop
      Specified by:
      getFFTparams in interface FFTDataHolderBlock
      Returns:
      fft length and hop, respectively, in an int array
    • setForceAmplitudeUpdate

      public void setForceAmplitudeUpdate()
      Set a forced click amplitude update. This means the next time getAmplitude is called the amplitude value is recalculated using latest sensitivity/gain values. TODO - this could be moved into AcousticDataBlock?
    • getDatablockSpeciesManager

      public DataBlockSpeciesManager<ClickDetection> getDatablockSpeciesManager()
      Description copied from class: PamDataBlock
      Get information about species types that may occur within this data block. Primarily for conversion into Tethys compatible data, but may prove to have other uses.
      Overrides:
      getDatablockSpeciesManager in class PamDataBlock<ClickDetection>
      Returns:
      Types of species information available within this datablock.
    • getTethysDataProvider

      public TethysDataProvider getTethysDataProvider(TethysControl tethysControl)
      Description copied from class: PamDataBlock
      Gets a data provider for Tethys. These will probably need to be bespoke, but for now will autogenerate based on the SQLLogging information.
      Overrides:
      getTethysDataProvider in class PamDataBlock<ClickDetection>
      Returns:
      the tethysDataProvider
    • getDataAutomationInfo

      public DataAutomationInfo getDataAutomationInfo()
      Description copied from class: PamDataBlock
      Get the level of automation employed by the generation of these data. Should ideally be completed for everything providing data to Tethys.
      Overrides:
      getDataAutomationInfo in class PamDataBlock<ClickDetection>
      Returns:
      level of automation for this data block.
    • getLocalisationAlgorithm

      public LocalisationAlgorithm getLocalisationAlgorithm()
      Description copied from class: PamDataBlock
      Find localisation algorithm for this data. This may be within the owning module, or a downstream algorithm.
      Overrides:
      getLocalisationAlgorithm in class PamDataBlock<ClickDetection>
      Returns:
      first found localisation algorithm or null;