Package whistleDetector
Class ShapeDataUnit
java.lang.Object
PamguardMVC.PamDataUnit<PamDataUnit,PamDataUnit>
whistlesAndMoans.AbstractWhistleDataUnit
whistleDetector.ShapeDataUnit
- All Implemented Interfaces:
Comparable<PamDataUnit>
,PamDetection
,AcousticDataUnit
,WhistleContour
Example class to go with WslPeak to show how WslPeaks, WslShapes and
WslEvents all go together.
- Author:
- Doug
-
Constructor Summary
ConstructorDescriptionShapeDataUnit
(long timeMilliseconds, int channelBitmap, long startSample, int duration, WhistleShape whistleShape) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the calculated amplitude, in dB.double
Returns the calculated amplitude in dB, stored in the base datadouble[]
Get an array of the peak frequencies in Hz.int
Get the total number of slicesdouble[]
Get an array of the times of each slice in secondsvoid
setWhistleShape
(WhistleShape whistleShape) Methods inherited from class PamguardMVC.PamDataUnit
addDataAnnotation, addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAnnotationsSummaryString, getBasicData, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, getLocalisation, getMeasuredAmplitude, getMeasuredAmplitudeType, getNoiseBackground, getNumDataAnnotations, getOriginLatLong, getParentDataBlock, getSampleDuration, getSampleDurationAsInt, getSeconds, getSequenceBitmap, getSequenceBitmapObject, getSignalExcess, getSignalSPL, getSnapshotGeometry, getStartSample, getSummaryString, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, getSuperId, getTimeDelaysSeconds, getTimeMilliseconds, getTimeNanoseconds, getTimeOverlap, getUID, getUpdateCount, isEmbryonic, isForceAmpRecalc, linAmplitudeToDB, removeDataAnnotation, removeDataAnnotation, removeSuperDetection, setAbsBlockIndex, setCalculatedAmlitudeDB, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setDurationInMilliseconds, setEmbryonic, setForceAmpRecalc, setFrequency, setInfo, setLastUpdateTime, setLocalisation, setMeasuredAmpAndType, setMeasuredAmplitude, setMeasuredAmplitudeType, setNoiseBackground, setParentDataBlock, setSampleDuration, setSequenceBitmap, setSignalExcess, setSignalSPL, setSnapshotGeometry, setStartSample, setTimeDelaysSeconds, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit
-
Constructor Details
-
ShapeDataUnit
public ShapeDataUnit(long timeMilliseconds, int channelBitmap, long startSample, int duration, WhistleShape whistleShape)
-
-
Method Details
-
getWhistleShape
-
setWhistleShape
-
getFreqsHz
public double[] getFreqsHz()Description copied from class:AbstractWhistleDataUnit
Get an array of the peak frequencies in Hz.- Specified by:
getFreqsHz
in interfaceWhistleContour
- Specified by:
getFreqsHz
in classAbstractWhistleDataUnit
- Returns:
- peak frequencies in Hz.
-
getSliceCount
public int getSliceCount()Description copied from class:AbstractWhistleDataUnit
Get the total number of slices- Specified by:
getSliceCount
in classAbstractWhistleDataUnit
- Returns:
- total number of slices
-
getTimesInSeconds
public double[] getTimesInSeconds()Description copied from class:AbstractWhistleDataUnit
Get an array of the times of each slice in seconds- Specified by:
getTimesInSeconds
in interfaceWhistleContour
- Specified by:
getTimesInSeconds
in classAbstractWhistleDataUnit
- Returns:
- times in seconds
-
getAmplitudeDB
public double getAmplitudeDB()Description copied from class:PamDataUnit
Get the calculated amplitude, in dB. If it hasn't been calculated yet, do that first and then return the value- Overrides:
getAmplitudeDB
in classPamDataUnit<PamDataUnit,
PamDataUnit> - Returns:
- the amplitude in dB with reference unit dictated by the hydrophone/microphone sensitivity value units.
-
getCalculatedAmlitudeDB
public double getCalculatedAmlitudeDB()Description copied from class:PamDataUnit
Returns the calculated amplitude in dB, stored in the base data- Overrides:
getCalculatedAmlitudeDB
in classPamDataUnit<PamDataUnit,
PamDataUnit> - Returns:
-