whistleDetector
Class ShapeDataUnit

java.lang.Object
  extended by PamguardMVC.PamDataUnit
      extended by PamDetection.AcousticDataUnit
          extended by PamDetection.PamDetection<PamDetection,PamDetection>
              extended by whistlesAndMoans.AbstractWhistleDataUnit
                  extended by whistleDetector.ShapeDataUnit
All Implemented Interfaces:
java.lang.Comparable<PamDataUnit>, WhistleContour

public class ShapeDataUnit
extends AbstractWhistleDataUnit

Example class to go with WslPeak to show how WslPeaks, WslShapes and WslEvents all go together.

Author:
Doug

Field Summary
private  double[] freqData
           
private  double[] timeData
           
private  WhistleShape whistleShape
           
 
Fields inherited from class PamDetection.AcousticDataUnit
AMPLITUDE_SCALE_DBREMPA, AMPLITUDE_SCALE_LINREFSD, duration, frequency, startSample
 
Fields inherited from class PamguardMVC.PamDataUnit
absBlockIndex, channelBitmap, localisation, oLL, timeMilliseconds
 
Constructor Summary
ShapeDataUnit(long timeMilliseconds, int channelBitmap, long startSample, int duration, WhistleShape whistleShape)
           
 
Method Summary
 double getAmplitudeDB()
           
 double getCalculatedAmlitudeDB()
           
 double[] getFreqsHz()
          Get an array of the peak frequencies in Hz.
 int getSliceCount()
          Get the total number of slices
 double[] getTimesInSeconds()
          Get an array of the times of each slice in seconds
 WhistleShape getWhistleShape()
           
 void setWhistleShape(WhistleShape whistleShape)
           
 
Methods inherited from class PamDetection.PamDetection
addSubDetection, addSuperDetection, getDetectionType, getPeakTime, getSubDetection, getSubDetectionsCount, getSubDetectionSyncronisation, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, removeSubDetection, removeSuperDetection, setDetectionType, setPeakTime, setUniqueSuperDetection
 
Methods inherited from class PamDetection.AcousticDataUnit
amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, compareTo, getDuration, getFrequency, getFrequencyOverlap, getLastSample, getMeasuredAmplitude, getMeasuredAmplitudeType, getSeconds, getStartSample, getTimeOverlap, setCalculatedAmlitudeDB, setDuration, setFrequency, setInfo, setMeasuredAmplitude, setMeasuredAmplitude, setMeasuredAmplitudeType, setStartSample
 
Methods inherited from class PamguardMVC.PamDataUnit
clearUpdateCount, getAbsBlockIndex, getChannelBitmap, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getGpsPosition, getLastUpdateTime, getLocalisation, getOriginLatLong, getPairAngle, getParentDataBlock, getTimeMilliseconds, getUpdateCount, setAbsBlockIndex, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setLastUpdateTime, setLocalisation, setOriginLatLong, setParentDataBlock, setTimeMilliseconds, updateDataUnit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

whistleShape

private WhistleShape whistleShape

freqData

private double[] freqData

timeData

private double[] timeData
Constructor Detail

ShapeDataUnit

public ShapeDataUnit(long timeMilliseconds,
                     int channelBitmap,
                     long startSample,
                     int duration,
                     WhistleShape whistleShape)
Method Detail

getWhistleShape

public WhistleShape getWhistleShape()

setWhistleShape

public void setWhistleShape(WhistleShape whistleShape)

getFreqsHz

public double[] getFreqsHz()
Description copied from class: AbstractWhistleDataUnit
Get an array of the peak frequencies in Hz.

Specified by:
getFreqsHz in interface WhistleContour
Specified by:
getFreqsHz in class AbstractWhistleDataUnit
Returns:
peak frequencies in Hz.

getSliceCount

public int getSliceCount()
Description copied from class: AbstractWhistleDataUnit
Get the total number of slices

Specified by:
getSliceCount in class AbstractWhistleDataUnit
Returns:
total number of slices

getTimesInSeconds

public double[] getTimesInSeconds()
Description copied from class: AbstractWhistleDataUnit
Get an array of the times of each slice in seconds

Specified by:
getTimesInSeconds in interface WhistleContour
Specified by:
getTimesInSeconds in class AbstractWhistleDataUnit
Returns:
times in seconds

getAmplitudeDB

public double getAmplitudeDB()
Overrides:
getAmplitudeDB in class AcousticDataUnit

getCalculatedAmlitudeDB

public double getCalculatedAmlitudeDB()
Overrides:
getCalculatedAmlitudeDB in class AcousticDataUnit