Package rocca
Class RoccaContourDataBlock
- Author:
- Michael Oswald
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A field mapping the sweep direction to the nominal index used to train the classifierstatic enum
A field mapping the sweep direction to the nominal index used to train the classifier -
Field Summary
Fields inherited from class PamguardMVC.PamDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, 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
-
Constructor Summary
ConstructorDescriptionRoccaContourDataBlock
(PamProcess parentProcess, int channelMap) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Calculate the statistics specific to a click detectionvoid
Once the Datablock is filled, this routine will calculate the statistics of the contour.Creates the header line for the contour status summary file.Method to create a string containing the current contour statistics.createContourStatsString
(String clipFile, int detectionCount) Method to create a string containing the current contour statistics.createContourStatsString
(String clipFile, int detectionCount, String sightNum) Method to create a string containing the current contour statistics.double
int
int
double
double
getRCS()
double
double[]
Get the filename of the original wav filedouble[][]
boolean
boolean
Test whether this data block is a whistle or not serialVersionUID=24 2016/08/10void
setAsAWhistle
(boolean thisIsAWhistle) Sets whether this data block is a whistle or not.void
setClassifiedAs
(String classifiedAs) void
setClickDetection
(ClickDetection clickDetection) Sets the clickDetection parameter.void
setClickNoise
(ClickDetection clickNoise) void
setDuration
(double duration) void
setFirstUnitWithWhistle
(int firstUnitWithWhistle) void
setLastUnitWithWhistle
(int lastUnitWithWhistle) void
setLatitude
(double latitude) void
setLongitude
(double longitude) void
setStartTime
(double startTime) void
setStatsRun
(boolean statsRun) void
setTreeVotes
(double[] treeVotes) void
setWavInfo
(double[][] wavInfo) Methods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearAll, clearChannelIterators, clearDeletedList, clearOnViewerLoad, copyDataList, createProcessAnnotations, createProcessAnnotations, dispose, dumpBlockContents, dumpBufferStatus, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findFirstUnitAfter, findLastUnitBefore, findUnitByUIDandUTC, findUnitsinInterval, getAnnotationHandler, getARealChannel, getBackgroundManager, getBespokeDataMapGraphic, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelMap, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCrossReferenceInformation, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAutomationInfo, getDatablockSpeciesManager, getDataBlockXML, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDataGain, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getDurationRange, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationAlgorithm, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getMyDataUnits, getNanoTimeCalculator, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineData, getOfflineDataMap, getOfflineDataMap, getPamSymbolManager, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnitFromSeq, getPreceedingUnitFromSeq, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getQuickId2, getRawSourceDataBlock, getRawSourceDataBlock2, getRecordingTrigger, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getSequenceCount, getSequenceIterator, getSequenceMap, getSequenceMapObject, getShouldBinary, getShouldLog, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTethysDataProvider, getTOADCalculator, getUidHandler, getUIDRepairLogging, getUniqueParentList, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, hasDataRange, isCanClipGenerate, isClearAtStart, isLinkGpsData, isOffline, isRecycling, loadViewerData, loadViewerData, masterClockUpdate, needViewerDataLoad, noteNewSettings, notifyModelChanged, orderOfflineData, orderOfflineData, orderOfflineData, pamStart, pamStop, remove, remove, remove, removeOfflineDataMap, reset, saveViewerData, setAnnotationHandler, setBackgroundManager, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setDatagramProvider, setDataName, setDataSelectCreator, setJSONDataSource, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNanoTimeCalculator, setNaturalLifetime, setNaturalLifetimeMillis, setPamSymbolManager, setParentProcess, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setSequenceMap, setShouldBinary, setShouldLog, setSynchLock, setUidHandler, shouldNotify, sortData, sortOutputMaps, stopTimer, toString, updatePamData
Methods inherited from class PamguardMVC.PamObservable
addInstantObserver, canDraw, canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getMaxThreadJitter, getOverlayDraw, getPamObserver, getRequiredHistory, isInstantObserver, notifyInstantObservers, notifyNornalObservers, notifyObservers, notifyObservers, setChanged, setOverlayDraw, updateObservers, waitForThreadedObservers
-
Constructor Details
-
RoccaContourDataBlock
Constructor. Set the natural lifetime to the maximum integer value possible so that the data is never deleted unless the
-
-
Method Details
-
calculateStatistics
public void calculateStatistics()Once the Datablock is filled, this routine will calculate the statistics of the contour. -
calculateClickStats
public void calculateClickStats()Calculate the statistics specific to a click detection -
createContourStatsHeader
Creates the header line for the contour status summary file. Note that the individual species tree votes do not get labelled, as this may change if the user switches classifiers at some point. Instead, the species list is included at the end of each row 2014/09/09 added Encounter ID, Cruise ID, Data Provider and Known Species 2015/10/10 serialVersionUID=23 removed spaces and parenthesis from headers serialVersionUID=24 2016/08/10 added lat/long info- Returns:
- the header string
-
createContourStatsString
Method to create a string containing the current contour statistics. Also included in the string are the filename, detection number and encounter classification. This method sets the filename equal to the raw data source, and the detection count to 0- Returns:
- a String containing the contour statistics
-
createContourStatsString
Method to create a string containing the current contour statistics. Also included in the string are the filename, date/time, detection count and encounter classification. This method sets the filename equal to the passed String clipFile.- Parameters:
clipFile
- String to be saved in the 'filename' columndetectionCount
- integer specifying the detection count (the count starts at 1 when the first detection is captured)- Returns:
- a String containing the contour statistics
-
createContourStatsString
Method to create a string containing the current contour statistics. Also included in the string are the filename, date/time, detection count and encounter classification. This method sets the filename equal to the passed String clipFile. 2015/10/10 serialVersionUID=23 removed spaces from columns serialVersionUID=24 2016/08/10 added lat/long info- Parameters:
clipFile
- String to be saved in the 'filename' columndetectionCount
- integer specifying the detection count (the count starts at 1 when the first detection is captured)- Returns:
- a String containing the contour statistics
-
getWavFilename
Get the filename of the original wav file- Returns:
-
getClassifiedAs
-
setClassifiedAs
-
isStatsRun
public boolean isStatsRun() -
setStatsRun
public void setStatsRun(boolean statsRun) -
getTreeVotes
public double[] getTreeVotes() -
setTreeVotes
public void setTreeVotes(double[] treeVotes) -
getFirstUnitWithWhistle
public int getFirstUnitWithWhistle() -
setFirstUnitWithWhistle
public void setFirstUnitWithWhistle(int firstUnitWithWhistle) -
getLastUnitWithWhistle
public int getLastUnitWithWhistle() -
setLastUnitWithWhistle
public void setLastUnitWithWhistle(int lastUnitWithWhistle) -
getKeyNames
-
getContour
-
getRCS
-
getClickDetection
- Returns:
- the clickDetection
-
setClickDetection
Sets the clickDetection parameter. Also creates a RoccaContourDataUnit object and loads it with basic information from the clickDetection. This prevents errors later in the code where it is assumed that the RoccaContourDataBlock contains at least one data unit.- Parameters:
clickDetection
- the clickDetection to set
-
getClickNoise
- Returns:
- the clickNoise
-
setClickNoise
- Parameters:
clickNoise
- the clickNoise to set
-
getStartTime
public double getStartTime()- Returns:
- the startTime serialVersionUID=15 2014/11/12
-
setStartTime
public void setStartTime(double startTime) - Parameters:
startTime
- the startTime to set serialVersionUID=15 2014/11/12
-
getDuration
public double getDuration()- Returns:
- the duration serialVersionUID=22 2015/06/13
-
setDuration
public void setDuration(double duration) - Parameters:
duration
- the duration to set serialVersionUID=22 2015/06/13
-
isThisAWhistle
public boolean isThisAWhistle()Test whether this data block is a whistle or not serialVersionUID=24 2016/08/10- Returns:
- true=whistle, false=click
-
setAsAWhistle
public void setAsAWhistle(boolean thisIsAWhistle) Sets whether this data block is a whistle or not. True=whistle, false=click serialVersionUID=24 2016/08/10- Parameters:
thisIsAWhistle
-
-
getLatitude
public double getLatitude() -
setLatitude
public void setLatitude(double latitude) -
getLongitude
public double getLongitude() -
setLongitude
public void setLongitude(double longitude) -
setWavInfo
public void setWavInfo(double[][] wavInfo) -
getWavInfo
public double[][] getWavInfo()
-