Package tethys.detection
Class EncounterGranularityHandler
java.lang.Object
tethys.detection.GranularityHandler
tethys.detection.EncounterGranularityHandler
As with the binned Detections, this may generate multiple encounters
at the same time for different types of sounds.
- Author:
- dg50
-
Field Summary
Fields inherited from class tethys.detection.GranularityHandler
dataBlock, streamExportParams, tethysControl, tethysExportParams
-
Constructor Summary
ConstructorsConstructorDescriptionEncounterGranularityHandler
(TethysControl tethysControl, PamDataBlock dataBlock, TethysExportParams tethysExportParams, StreamExportParams streamExportParams) -
Method Summary
Modifier and TypeMethodDescriptionnilus.Detection[]
addDataUnit
(PamDataUnit dataUnit) Put a data unit into a Detection object.protected boolean
autoEffortFix
(nilus.Detections detections, nilus.Detection det) Automatically fix mismatches between effort and detections.nilus.Detection[]
cleanup
(long timeMillis) Called after end end of all data units to get the last bin / encounter.void
prepare
(long timeMillis) Prepare to start, passing the start time of the effort or of the first time bin for binned granularity types.Methods inherited from class tethys.detection.GranularityHandler
addChannelsToMap, contractDetection, effortOverlap, expandEffort, finaliseChannels, getCallGroupName, getHandler, toDetectionArray
-
Constructor Details
-
EncounterGranularityHandler
public EncounterGranularityHandler(TethysControl tethysControl, PamDataBlock dataBlock, TethysExportParams tethysExportParams, StreamExportParams streamExportParams)
-
-
Method Details
-
prepare
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 classGranularityHandler
- Parameters:
timeMillis
-
-
addDataUnit
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 classGranularityHandler
- Parameters:
dataUnit
-- Returns:
- Detection object, but only when ready to be added to Detections
-
cleanup
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 classGranularityHandler
- 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
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 classGranularityHandler
- Parameters:
detections
- nilus Detections objectdet
- a single detection- Returns:
- true if it was fixed automatically. False otherwise.
-