Package cpod
Class CPODClick
- All Implemented Interfaces:
Comparable<PamDataUnit>
,RawDataHolder
CPOD or FPOD click.
-
Constructor Summary
ConstructorDescriptionCPODClick
(long tMillis, long fileSamples, short nCyc, short bw, short kHz, short endF, short spl, short slope, short[] shortData) Constructor for a CPOD click. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get a rough estimation of the recieved amplitude of a CPOD in dBshort
getBw()
Get the click train detection from the click detectionGet the raw data transforms class.short
getEndF()
long
short
getkHz()
short
getnCyc()
short[]
Get the raw data.short
getSlope()
short
getSpl()
Return an html formatted summary string describing the detection which can be used in tooltips anywhere in PAMGuard.double[][]
Get arrays of raw audio data, one per channel.static CPODClick
makeClick
(CPODControl cpodControl, long minuteMillis, short[] shortData) Deprecated.static CPODClick
makeClick
(DataUnitBaseData baseData, short[] shortData) Create a CPOD click.static CPODClick
makeCPODClick
(long tMillis, long fileSamples, short[] shortData) Make a CPOD click.static CPODClick
makeFPODClick
(long tMillis, long fileSamples, FPODReader.FPODdata fpodData) Make a FPOD click.void
setBw
(short bw) void
setClassification
(CPODClassification cpodClassification) void
setEndF
(short endF) void
setICISamples
(long iciSamples) void
setkHz
(short kHz) void
setnCyc
(short nCyc) void
setRawDataTransfroms
(RawDataTransforms rawDataTransforms) void
setSlope
(short slope) void
setSpl
(short spl) void
setWavData
(double[][] ds) 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, getLocalisation, 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, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit
-
Constructor Details
-
CPODClick
public CPODClick(long tMillis, long fileSamples, short nCyc, short bw, short kHz, short endF, short spl, short slope, short[] shortData) Constructor for a CPOD click. This adds all basic information that is required for a CPOD or FPOD click- Parameters:
tMillis
- - the time in millis.fileSamples
- - the file samplesnCyc
- - the number of cyclesbw
- -the bandwidth in kHZkHz
- - the frequency in kHz.endF
- - the end frequency in kHz.spl
- - the spl (0-255) unitless.slope
- - the slopeshortData
- - the raw data.
-
-
Method Details
-
makeClick
Create a CPOD click. (This is used to load CPOD clicks from the binary store)- Parameters:
baseData
- - the base data.shortData
- -contains the raw CPOD data- Returns:
- a new CPOD click.
-
makeClick
@Deprecated public static CPODClick makeClick(CPODControl cpodControl, long minuteMillis, short[] shortData) Deprecated.Create a CPOD click. This is usually called whenever the CPOD click is imported from a CSV file.- Parameters:
minuteMillis
- The time in miliiseconds of the minute block preceding the current click.shortData
-- Returns:
-
makeFPODClick
Make a FPOD click. This called whenever click has been imported from a FP1 or FP3 file- Parameters:
tMillis
- - the time in milliseconds datenum.fileSamples
- - the number of samples into the file the CPOD click is at - this is calculated from CPODClickDataBlock.CPOD_SRshortData
- - the raw data from the CPOD click. This can be 8 bytes or 30 bytes if a click train clcik- Returns:
- a CPODClick object.
-
makeCPODClick
Make a CPOD click. This called whenever click has been imported from a CP1 or CP3 file- Parameters:
tMillis
- - the time in milliseconds datenum.fileSamples
- - the number of samples into the file the CPOD click is at - this is calculated from CPODClickDataBlock.CPOD_SRshortData
- - the raw data from the CPOD click. This can be 8 bytes or 40 bytes if a click train clcik- Returns:
- a CPODClick object.
-
getRawData
public short[] getRawData()Get the raw data.- Returns:
- the raw data.
-
getnCyc
public short getnCyc()- Returns:
- the nCyc
-
setnCyc
public void setnCyc(short nCyc) - Parameters:
nCyc
- the nCyc to set
-
getBw
public short getBw()- Returns:
- the bw
-
setBw
public void setBw(short bw) - Parameters:
bw
- the bw to set
-
getkHz
public short getkHz()- Returns:
- the kHz
-
setkHz
public void setkHz(short kHz) - Parameters:
kHz
- the kHz to set
-
getEndF
public short getEndF()- Returns:
- the endF
-
setEndF
public void setEndF(short endF) - Parameters:
endF
- the endF to set
-
getSpl
public short getSpl()- Returns:
- the spl
-
setSpl
public void setSpl(short spl) - Parameters:
spl
- the spl to set
-
getSlope
public short getSlope()- Returns:
- the slope
-
setSlope
public void setSlope(short slope) - Parameters:
slope
- the slope to set
-
setICISamples
public void setICISamples(long iciSamples) -
getICISamples
public long getICISamples() -
getAmplitudeDB
public double getAmplitudeDB()Get a rough estimation of the recieved amplitude of a CPOD in dB- Overrides:
getAmplitudeDB
in classPamDataUnit<PamDataUnit,
SuperDetection> - Returns:
- the amplitude in dB.
-
getSummaryString
Description copied from class:PamDataUnit
Return an html formatted summary string describing the detection which can be used in tooltips anywhere in PAMGuard.- Overrides:
getSummaryString
in classPamDataUnit<PamDataUnit,
SuperDetection> - Returns:
- summary string
-
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
-
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.
-
setRawDataTransfroms
-
setWavData
public void setWavData(double[][] ds) -
getCPODClickTrain
Get the click train detection from the click detection- Returns:
- the click train detection
-
setClassification
-
getClassification
-