public class PamDetection<T extends PamDetection,U extends PamDetection> extends AcousticDataUnit
These things will nearly always be stored within a PamDataUnit which already contains some of the information - such as the channelMap - should this be repeated here ?
One thing this will have to do is to deal with the myriad of different amplitude types. I suggest that the basic storage unit should either be fft amplitude units - which will be there for any detection that comes out of a spectrogram, or peak ADC values, such as would come from a click detector. The class will have functions for converting between the different amplitude types.
AMPLITUDE_SCALE_DBREMPA, AMPLITUDE_SCALE_LINREFSD
Constructor and Description |
---|
PamDetection(long timeMilliseconds,
int channelBitmap,
long startSample,
long duration) |
Modifier and Type | Method and Description |
---|---|
int |
addSubDetection(T subDetection)
Add a sub detection to the sub detection list.
|
void |
addSuperDetection(U superDetection) |
T |
findSubDetection(long timeMillis,
int channelBitmap)
find a sub detection based on it's time and it's channel map
|
java.lang.String |
getDetectionType() |
long |
getEventEndTime() |
double |
getPeakTime() |
T |
getSubDetection(int ind) |
int |
getSubDetectionsCount() |
java.lang.Object |
getSubDetectionSyncronisation() |
U |
getSuperDetection(java.lang.Class superClass) |
U |
getSuperDetection(int ind) |
int |
getSuperDetectionsCount() |
java.lang.Object |
getSuperDetectionSyncronisation() |
void |
removeSubDetection(T subDetection) |
void |
removeSuperDetection(U superDetection) |
void |
replaceSubDetection(T oldOne,
T newOne)
Replace a sub detection in an event.
|
void |
setDetectionType(java.lang.String detectionType) |
void |
setEventEndTime(long eventEndTime) |
void |
setPeakTime(double peakTimeMsec) |
int |
setUniqueSuperDetection(U superDetection)
Sets a unique super detection.
|
amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, compareTo, getAmplitudeDB, getCalculatedAmlitudeDB, getDuration, getFrequency, getFrequencyOverlap, getLastSample, getMeasuredAmplitude, getMeasuredAmplitudeType, getSeconds, getStartSample, getSummaryString, getTimeOverlap, setCalculatedAmlitudeDB, setDuration, setFrequency, setInfo, setMeasuredAmplitude, setMeasuredAmplitude, setMeasuredAmplitudeType, setStartSample
addDataAnnotation, clearOandAngles, clearUpdateCount, findDataAnnotation, getAbsBlockIndex, getChannelBitmap, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDetectionMatch, getDetectionMatch, getHydrophoneHeading, getLastUpdateTime, getLocalisation, getNumDataAnnotations, getOriginLatLong, getPairAngle, getParentDataBlock, getTimeMilliseconds, getUpdateCount, removeDataAnnotation, removeDataAnnotation, setAbsBlockIndex, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setLastUpdateTime, setLocalisation, setOriginLatLong, setParentDataBlock, setTimeMilliseconds, updateDataUnit
public PamDetection(long timeMilliseconds, int channelBitmap, long startSample, long duration)
public double getPeakTime()
public void setPeakTime(double peakTimeMsec)
peakTimeMsec
- The peakTime to set, in msec.
relative to the start of the PAMGUARD run.public java.lang.String getDetectionType()
public void setDetectionType(java.lang.String detectionType)
detectionType
- The detectionType to set.public int addSubDetection(T subDetection)
subDetection
- public int setUniqueSuperDetection(U superDetection)
superDetection
- public void addSuperDetection(U superDetection)
public T findSubDetection(long timeMillis, int channelBitmap)
timeMillis
- time in millisecondschannelBitmap
- channel mappublic void replaceSubDetection(T oldOne, T newOne)
if the original sub detection does not exist, then the new one is added anyway.
oldOne
- old sub detectionnewOne
- new sub detection.public int getSubDetectionsCount()
public int getSuperDetectionsCount()
public T getSubDetection(int ind)
public U getSuperDetection(java.lang.Class superClass)
public U getSuperDetection(int ind)
public void removeSubDetection(T subDetection)
public void removeSuperDetection(U superDetection)
public java.lang.Object getSubDetectionSyncronisation()
public java.lang.Object getSuperDetectionSyncronisation()
public void setEventEndTime(long eventEndTime)
public long getEventEndTime()