Class DLDetection
java.lang.Object
PamguardMVC.PamDataUnit<PamDataUnit,SuperDetection>
 
clipgenerator.ClipDataUnit
rawDeepLearningClassifier.dlClassification.DLDetection
- All Implemented Interfaces:
 Comparable<PamDataUnit>,PamDetection,AcousticDataUnit,RawDataHolder
A detected DL data unit. These data units are only ever generated from raw 
 sound data from the segmenter. Otherwise DL results are saved as annotations on 
 other data units.
- Author:
 - Jamie Macaulay
 
- 
Field Summary
Fields inherited from class clipgenerator.ClipDataUnit
fastFFT, fileName, triggerMilliseconds, triggerNameFields inherited from class PamguardMVC.PamDataUnit
absBlockIndex - 
Constructor Summary
ConstructorsConstructorDescriptionDLDetection(long timeMilliseconds, int channelBitmap, long startSample, long durationSamples, ArrayList<PredictionResult> modelResults, double[][] waveData, float sampleRate) Deprecated.DLDetection(DataUnitBaseData baseData, double[][] waveData, float sampleRate) Create a data unit for DL which has passed binary classification. - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataAnnotation(DataAnnotation dataAnnotation) Adds a data annotation to the data unit.Get the raw data transforms class.Get the model results that were used to construct the data unit.double[][]getPowerSpectrum(int fftLength) Get the power spectrum for all channels.getSpectrogram(int fftSize, int fftHop) Get a spectrogram image of the wave clip.double[][]Get all the wave data into an array.double[]getWaveData(int channel) Get the wave data for a specified channel.Methods inherited from class clipgenerator.ClipDataUnit
clearClipSpecData, findTriggerDataUnit, generateComplexSpectrogram, generateSpectrogramArrays, getClipImage, getDisplaySampleRate, getFastFFT, getRawData, getSampleRate, getSourceSampleRate, getSpectrogramData, getSpectrogramWaveData, getSummaryString, getTriggerDataUnit, getTriggerMilliseconds, getTriggerUID, getWindowFunc, getWindowType, setRawData, setTimeMilliseconds, setTriggerDataUnit, setTriggerUID, setWindowTypeMethods inherited from class PamguardMVC.PamDataUnit
addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAmplitudeDB, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getGpsPosition, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, getMeasuredAmplitude, getMeasuredAmplitudeType, getNoiseBackground, getNumDataAnnotations, getOriginLatLong, getParentDataBlock, getSampleDuration, getSampleDurationAsInt, getSeconds, getSequenceBitmap, getSequenceBitmapObject, getSignalExcess, getSignalSPL, getSnapshotGeometry, getStartSample, 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, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit 
- 
Constructor Details
- 
DLDetection
@Deprecated public DLDetection(long timeMilliseconds, int channelBitmap, long startSample, long durationSamples, ArrayList<PredictionResult> modelResults, double[][] waveData, float sampleRate) Deprecated.Create a data unit for DL which has passed binary classification.- Parameters:
 timeMilliseconds- - the time in milliseconds.channelBitmap- - the channel bit map.startSample- - the start sample.durationSamples- - the duration in samples.modelResults- - the model results that were used to construct the data unit.
 - 
DLDetection
Create a data unit for DL which has passed binary classification. Usually used for loading data units from binary files.- Parameters:
 baseData- - the base binary data.waveData- - the wave data.probdata- - the probability data.
 
 - 
 - 
Method Details
- 
addDataAnnotation
Description copied from class:PamDataUnitAdds a data annotation to the data unit. Removes any existing annotation of the same type and name.- Overrides:
 addDataAnnotationin classPamDataUnit<PamDataUnit,SuperDetection> - Parameters:
 dataAnnotation- data annotation
 - 
getLocalisation
- Overrides:
 getLocalisationin classClipDataUnit- Returns:
 - Returns the localisation.
 
 - 
getWaveData
public double[][] getWaveData()Description copied from class:ClipDataUnitGet all the wave data into an array.- Specified by:
 getWaveDatain interfaceRawDataHolder- Overrides:
 getWaveDatain classClipDataUnit- Returns:
 - the wave data or null if it can't be found.
 
 - 
getModelResults
Get the model results that were used to construct the data unit. The number of results will generally be the raw data length divided by hop size.- Returns:
 - the model results.
 
 - 
getWaveData
public double[] getWaveData(int channel) Get the wave data for a specified channel.- Overrides:
 getWaveDatain classClipDataUnit- Parameters:
 channel-- Returns:
 
 - 
getSpectrogram
Get a spectrogram image of the wave clip. The clip is null until called. It is recalculated if the FFT length and/or hop size are different.- Parameters:
 fftSize- - the FFT size in samplesfftHop- - the FFT hop in samples- Returns:
 - a spectrogram clip (dB/Hz ).
 
 - 
getPowerSpectrum
public double[][] getPowerSpectrum(int fftLength) Get the power spectrum for all channels.- Parameters:
 fftLength- - the fft length to use.- Returns:
 - the power sepctrums for all channels.
 
 - 
getDataTransforms
Description copied from interface:RawDataHolderGet the raw data transforms class. This handles standard data transforms that are often used in raw data units, e.g. calculating the spectrum, filtering waveforms, getting data as an int16 (short) array, etc.- Specified by:
 getDataTransformsin interfaceRawDataHolder- Overrides:
 getDataTransformsin classClipDataUnit- Returns:
 - the data transforms object.
 
 
 -