Class EncounterGranularityHandler

java.lang.Object
tethys.detection.GranularityHandler
tethys.detection.EncounterGranularityHandler

public class EncounterGranularityHandler extends GranularityHandler
As with the binned Detections, this may generate multiple encounters at the same time for different types of sounds.
Author:
dg50
  • Constructor Details Link icon

  • Method Details Link icon

    • prepare Link icon

      public void prepare(long timeMillis)
      Description copied from class: GranularityHandler
      Prepare to start, passing the start time of the effort or of the first time bin for binned granularity types.
      Specified by:
      prepare in class GranularityHandler
      Parameters:
      timeMillis -
    • addDataUnit Link icon

      public nilus.Detection[] addDataUnit(PamDataUnit dataUnit)
      Description copied from class: GranularityHandler
      Put a data unit into a Detection object. for Call granularity this will probably return every time. For binned and encounter types this will only return at the end of a bin / encounter
      Specified by:
      addDataUnit in class GranularityHandler
      Parameters:
      dataUnit -
      Returns:
      Detection object, but only when ready to be added to Detections
    • cleanup Link icon

      public nilus.Detection[] cleanup(long timeMillis)
      Description copied from class: GranularityHandler
      Called after end end of all data units to get the last bin / encounter.

      Specified by:
      cleanup in class GranularityHandler
      Parameters:
      timeMillis - end time of effort or last bin in milliseconds.
      Returns:
      null for Call granularity, otherwise may be non null for binned or encounter.
    • autoEffortFix Link icon

      protected boolean autoEffortFix(nilus.Detections detections, nilus.Detection det)
      Description copied from class: GranularityHandler
      Automatically fix mismatches between effort and detections. This will be called if a detection or part of a detection is outside of the start and end defined by the effort. If it's a small difference, i.e. if the detection at least overlaps the effort then it can be automatically fixed by truncating the detection (for binned types) or by a small extension to the effort (for encounter and call types).
      Specified by:
      autoEffortFix in class GranularityHandler
      Parameters:
      detections - nilus Detections object
      det - a single detection
      Returns:
      true if it was fixed automatically. False otherwise.