Class SimpleClick
java.lang.Object
PamguardMVC.PamDataUnit
clickTrainDetector.clickTrainAlgorithms.mht.mhtMAT.SimpleClick
- All Implemented Interfaces:
Comparable
,RawDataHolder
- Author:
- Jamie Macaulay
-
Field Summary
Modifier and TypeFieldDescriptiondouble
The amplitude of the click in dBdouble
The time in milliseconds. -
Constructor Summary
ConstructorDescriptionSimpleClick
(Integer UID, double timeSeconds, double amplitude, float sR) Create a simple clickSimpleClick
(Integer UID, Double timeSeconds, Double amplitude, Double bearing, double[] waveform, float sR) Create a simple click.SimpleClick
(Integer UID, Double timeSeconds, Double amplitude, Double bearing, float sR) Create a simple click. -
Method Summary
Modifier and TypeMethodDescriptionint
Comparison for ArrayList comparator.double
Get the calculated amplitude, in dB.Get the raw data transforms class.double[][]
Get arrays of raw audio data, one per channel.toString()
Methods inherited from class PamguardMVC.PamDataUnit
addDataAnnotation, addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, 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
-
Field Details
-
timeSeconds
public double timeSecondsThe time in milliseconds. -
amplitude
public double amplitudeThe amplitude of the click in dB
-
-
Constructor Details
-
SimpleClick
Create a simple click- Parameters:
UID
- - a unique identifier for the clicktimeSeconds
- 0- the time in secondsamplitude
- - the amplitude in dB
-
SimpleClick
Create a simple click.- Parameters:
UID
- - a unique identifier for the clicktimeSeconds
- 0- the time in secondsamplitude
- - the amplitude in dBbearing
- - the bearing in DEGREESsR
- - the sample rate
-
SimpleClick
public SimpleClick(Integer UID, Double timeSeconds, Double amplitude, Double bearing, double[] waveform, float sR) Create a simple click.- Parameters:
UID
- - a unique identifier for the clickamplitude
- - the amplitude in dBbearing
- - the bearing in DEGREESwaveform
- - the waveformsR
- - the sample ratesR
- - the sample rate.
-
-
Method Details
-
compareTo
Comparison for ArrayList comparator.- Parameters:
a
- - click to compare- Returns:
- the integer
-
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
- Returns:
- the amplitude in dB with reference unit dictated by the hydrophone/microphone sensitivity value units.
-
toString
-
getWaveData
public double[][] getWaveData()Description copied from interface:RawDataHolder
Get arrays of raw audio data, one per channel. Assume that the array matches getChannelMap() !- Specified by:
getWaveData
in interfaceRawDataHolder
- Returns:
- arrays of raw data by channel
-
getLocalisation
- Overrides:
getLocalisation
in classPamDataUnit
- Returns:
- Returns the localisation.
-
getDataTransforms
Description copied from interface:RawDataHolder
Get 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:
getDataTransforms
in interfaceRawDataHolder
- Returns:
- the data transforms object.
-