Package whistlesAndMoans
Class ConnectedRegionDataUnit
java.lang.Object
PamguardMVC.PamDataUnit<PamDataUnit,PamDataUnit>
whistlesAndMoans.AbstractWhistleDataUnit
whistlesAndMoans.ConnectedRegionDataUnit
- All Implemented Interfaces:
Comparable<PamDataUnit>
,PamDetection
,AcousticDataUnit
,FFTDataHolder
,TFContourProvider
,WhistleContour
public class ConnectedRegionDataUnit
extends AbstractWhistleDataUnit
implements TFContourProvider, FFTDataHolder
-
Constructor Summary
ConstructorDescriptionConnectedRegionDataUnit
(DataUnitBaseData dataUnitBaseData, ConnectedRegion connectedRegion, WhistleToneConnectProcess whistleToneConnectProcess) Constructor to use from Binary filesConnectedRegionDataUnit
(ConnectedRegion connectedRegion, WhistleToneConnectProcess whistleToneConnectProcess) -
Method Summary
Modifier and TypeMethodDescriptiongetFFTDataUnits
(Integer fftLength) Return a list of FFT data units from the data unit.double[]
Get an array of the peak frequencies in Hz.double[]
gets the frequency limits from the DataUnitBaseData objectint
Get the total number of slicesGets time-frequency contour information in units of milliseconds and frequencydouble[]
As of version 2 time delays are now stored in the DataUnitBaseData object.double[]
Get an array of the times of each slice in secondsvoid
setTimeDelaysSeconds
(double[] timeDelaysSeconds) As of version 2 time delays are now stored in the DataUnitBaseData object.Methods inherited from class PamguardMVC.PamDataUnit
addDataAnnotation, addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAmplitudeDB, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, 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, 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, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit
-
Constructor Details
-
ConnectedRegionDataUnit
public ConnectedRegionDataUnit(ConnectedRegion connectedRegion, WhistleToneConnectProcess whistleToneConnectProcess) -
ConnectedRegionDataUnit
public ConnectedRegionDataUnit(DataUnitBaseData dataUnitBaseData, ConnectedRegion connectedRegion, WhistleToneConnectProcess whistleToneConnectProcess) Constructor to use from Binary files- Parameters:
dataUnitBaseData
-connectedRegion
-whistleToneConnectProcess
-
-
-
Method Details
-
getConnectedRegion
-
getFrequency
public double[] getFrequency()Description copied from class:PamDataUnit
gets the frequency limits from the DataUnitBaseData object- Overrides:
getFrequency
in classPamDataUnit<PamDataUnit,
PamDataUnit> - Returns:
-
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
-
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.
-
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
-
setTimeDelaysSeconds
public void setTimeDelaysSeconds(double[] timeDelaysSeconds) As of version 2 time delays are now stored in the DataUnitBaseData object. An important difference, however, is that if there are no time delays yet the DataUnitBaseData would set the array to null, whereas this object would have set it to an empty array (in the WhistleBinaryDataSource object). Therefore, override PamDataUnit's setTimeDelaysSeconds method to intercept any empty arrays and set them as null- Overrides:
setTimeDelaysSeconds
in classPamDataUnit<PamDataUnit,
PamDataUnit> - Parameters:
timeDelaysSeconds
- the time delays (in seconds) to set
-
getTimeDelaysSeconds
public double[] getTimeDelaysSeconds()As of version 2 time delays are now stored in the DataUnitBaseData object. An important difference, however, is that if there are no time delays yet the DataUnitBaseData would set the array to null, whereas this object would have set it to an empty array (in the WhistleBinaryDataSource object). Therefore, override PamDataUnit's getTimeDelaysSeconds method to intercept any null arrays and return them as empty- Overrides:
getTimeDelaysSeconds
in classPamDataUnit<PamDataUnit,
PamDataUnit> - Returns:
- the time delays in seconds
-
getTFContourData
Description copied from interface:TFContourProvider
Gets time-frequency contour information in units of milliseconds and frequency- Specified by:
getTFContourData
in interfaceTFContourProvider
- Returns:
- TFContour data object.
-
getFFTDataUnits
Description copied from interface:FFTDataHolder
Return a list of FFT data units from the data unit.- Specified by:
getFFTDataUnits
in interfaceFFTDataHolder
- Parameters:
fftLength
- Length of FFT to use. If this is null, a default from the data source will be used, otherwise the source should recalculate if possible. If it's not possible to recalculate, then return what's available and the calling process must decide whether it can use the data or not.- Returns:
- list of FFT units, interleaved by channel.
-