Package clickDetector
Class ClickDataBlock
- All Implemented Interfaces:
 AlarmDataSource,OrganisedFFTData,FFTDataHolderBlock,GroupedDataSource
- Direct Known Subclasses:
 TrackedClickDataBlock
public class ClickDataBlock
extends AcousticDataBlock<ClickDetection>
implements AlarmDataSource, GroupedDataSource, OrganisedFFTData, FFTDataHolderBlock
- 
Field Summary
FieldsFields inherited from class PamguardMVC.PamDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, naturalLifetime, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, pamDataUnits, parentProcess, POSITION_AFTER, POSITION_BEFORE, REFERENCE_ABSOLUTE, REFERENCE_CURRENT, REQUEST_DATA_LOADED, REQUEST_DATA_PARTIAL_LOAD, REQUEST_EXCEPTION, REQUEST_INTERRUPTED, REQUEST_NO_DATA, REQUEST_SAME_REQUEST, unitsAdded, unitsRemoved, unitsUpdatedFields inherited from class PamguardMVC.PamObservable
masterClockSample, objectChanged, overlayDraw, pamProfiler - 
Constructor Summary
ConstructorsConstructorDescriptionClickDataBlock(ClickControl clickControl, PamProcess parentProcess, int channelMap)  - 
Method Summary
Modifier and TypeMethodDescriptionGet an alarmCounterProvider which can then generate any number of alarm counters for a datablock.Get a reference to the click control which owns this data blockGet the level of automation employed by the generation of these data.Get information about species types that may occur within this data block.double[]Get the nominal range of durations of sounds that might be detected by this detector (if applicable).int[]Return the fft parameters in the following format: int[0] = fft length int[1] = fft hopFind localisation algorithm for this data.New plan - always use the binary store if it has any data at all.getTethysDataProvider(TethysControl tethysControl) Gets a data provider for Tethys.booleanloadViewerData(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.voidnotifyModelChanged(int changeType) Receive notifications from the main PamController.protected intremoveOldUnitsS(long mastrClockSample) booleanSaves data in this data block in offline viewer mode.voidSet a forced click amplitude update.Methods inherited from class PamguardMVC.AcousticDataBlock
findParentSource, getChannelListManager, getDataBlockXML, getParentSourceData, prepareAmplitudeCalculations, prepareChannelListsMethods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearAll, clearAll, clearChannelIterators, clearDeletedList, clearOnViewerLoad, copyDataList, createProcessAnnotations, createProcessAnnotations, dispose, dumpBlockContents, dumpBufferStatus, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findFirstUnitAfter, findLastUnitBefore, findUnitByUIDandUTC, findUnitsinInterval, getAbsoluteDataUnit, getAnnotationHandler, getARealChannel, getBackgroundManager, getBespokeDataMapGraphic, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelMap, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCrossReferenceInformation, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDataGain, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getMyDataUnits, getNanoTimeCalculator, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineData, getOfflineDataMap, getOfflineDataMap, getPamConfiguration, getPamSymbolManager, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnitFromSeq, getPreceedingUnitFromSeq, getPrevDataEnd, getProcessAnnotations, getQuickId, getQuickId2, getRawSourceDataBlock, getRawSourceDataBlock2, getRecordingTrigger, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getSequenceCount, getSequenceIterator, getSequenceMap, getSequenceMapObject, getShouldBinary, getShouldLog, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTaskDataCopy, getUidHandler, getUniqueParentList, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, hasDataRange, isCanClipGenerate, isClearAtStart, isLinkGpsData, isOffline, isRecycling, loadViewerData, masterClockUpdate, needViewerDataLoad, noteNewSettings, notifyOfflineObservers, orderOfflineData, orderOfflineData, orderOfflineData, pamStart, pamStop, remove, remove, remove, removedDataUnit, removeOfflineDataMap, removeOldUnitsT, reset, setAnnotationHandler, setBackgroundManager, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setCurrentViewDataEnd, setCurrentViewDataStart, setDatagramProvider, setDataName, setDataSelectCreator, setEffortProvider, setJSONDataSource, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNanoTimeCalculator, setNaturalLifetime, setNaturalLifetimeMillis, setPamSymbolManager, setParentProcess, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setSequenceMap, setShouldBinary, setShouldLog, setSynchLock, setUidHandler, shouldNotify, sortData, sortOutputMaps, stopTimer, toString, updatePamDataMethods inherited from class PamguardMVC.PamObservable
addInstantObserver, canDraw, canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getInstantObservers, getLongestObserver, getMaxThreadJitter, getOverlayDraw, getPamObserver, getPamObservers, getRequiredHistory, isInstantObserver, notifyInstantObservers, notifyNornalObservers, notifyObservers, notifyObservers, setChanged, setOverlayDraw, updateObservers, waitForThreadedObservers 
- 
Field Details
- 
clickControl
 
 - 
 - 
Constructor Details
- 
ClickDataBlock
 
 - 
 - 
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:
 loadViewerDatain classPamDataBlock<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:PamDataBlockSaves data in this data block in offline viewer mode.- Overrides:
 saveViewerDatain classPamDataBlock<ClickDetection>- Returns:
 - true if data found and saved.
 
 - 
getPrimaryDataMap
Description copied from class:PamDataBlockNew 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:
 getPrimaryDataMapin classPamDataBlock<ClickDetection>- Returns:
 - a data map
 
 - 
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamDataBlockReceive notifications from the main PamController.- Overrides:
 notifyModelChangedin classAcousticDataBlock<ClickDetection>- Parameters:
 changeType-
 - 
getUIDRepairLogging
- Overrides:
 getUIDRepairLoggingin classPamDataBlock<ClickDetection>
 - 
getOfflineClickLogging
- Returns:
 - the offlineClickLogging
 
 - 
removeOldUnitsS
protected int removeOldUnitsS(long mastrClockSample) - Overrides:
 removeOldUnitsSin classPamDataBlock<ClickDetection>
 - 
getAlarmCounterProvider
Description copied from interface:AlarmDataSourceGet an alarmCounterProvider which can then generate any number of alarm counters for a datablock.- Specified by:
 getAlarmCounterProviderin interfaceAlarmDataSource- Returns:
 - alarm Counter provider for that control. This more complicated system enables multiple alarms to be hung off the same data block.
 
 - 
getDataSelectCreator
- Overrides:
 getDataSelectCreatorin classPamDataBlock<ClickDetection>- Returns:
 - an object that can create data selectors to sub select data from within this type of data block.
 
 - 
getGroupSourceParameters
- Specified by:
 getGroupSourceParametersin interfaceGroupedDataSource- Returns:
 - the current group source parameters for this data source.
 
 - 
getClickControl
Get a reference to the click control which owns this data block- Returns:
 - click control.
 
 - 
getTOADCalculator
- Overrides:
 getTOADCalculatorin classPamDataBlock<ClickDetection>- Returns:
 - A calculator for Time of Arrival Difference Calculations
 
 - 
getFFTDataOrganiser
- Specified by:
 getFFTDataOrganiserin interfaceOrganisedFFTData
 - 
getDurationRange
public double[] getDurationRange()Description copied from class:PamDataBlockGet 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:
 getDurationRangein classPamDataBlock<ClickDetection>- Returns:
 - duration range in seconds of sounds this detector can sensibly detect
 
 - 
getFFTparams
public int[] getFFTparams()Description copied from interface:FFTDataHolderBlockReturn the fft parameters in the following format:- int[0] = fft length
 - int[1] = fft hop
 
- Specified by:
 getFFTparamsin interfaceFFTDataHolderBlock- 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
Description copied from class:PamDataBlockGet 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:
 getDatablockSpeciesManagerin classPamDataBlock<ClickDetection>- Returns:
 - Types of species information available within this datablock.
 
 - 
getTethysDataProvider
Description copied from class:PamDataBlockGets a data provider for Tethys. These will probably need to be bespoke, but for now will autogenerate based on the SQLLogging information.- Overrides:
 getTethysDataProviderin classPamDataBlock<ClickDetection>- Returns:
 - the tethysDataProvider
 
 - 
getDataAutomationInfo
Description copied from class:PamDataBlockGet the level of automation employed by the generation of these data. Should ideally be completed for everything providing data to Tethys.- Overrides:
 getDataAutomationInfoin classPamDataBlock<ClickDetection>- Returns:
 - level of automation for this data block.
 
 - 
getLocalisationAlgorithm
Description copied from class:PamDataBlockFind localisation algorithm for this data. This may be within the owning module, or a downstream algorithm.- Overrides:
 getLocalisationAlgorithmin classPamDataBlock<ClickDetection>- Returns:
 - first found localisation algorithm or null;
 
 
 -