Package gpl.contour
Class GPLContour
java.lang.Object
gpl.contour.GPLContour
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
NullGPLContour
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContourPoint
(int iT, int iF, double signalExcess, double energy) Add a contour pointvoid
addContourPoint
(GPLContourPoint contourPoint) Add a contour pointint
getArea()
Get the area of the contourint
Get how long the sound was in FFT slices.Time is from the start of the call, Frequency is referenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.int
Referenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.int
int
Referenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.int
int[][]
int[][]
getOutline
(int binOffset) double
This is the sum^2 of every FFT point that formed part of the contour.double
This is the sum of the whitened data in the contour.static GPLContour
Make a null contour.void
setTotalEnergy
(double totalEnergy) void
setTotalExcess
(double totalExcess) void
shift the contour so that everything is referenced to a first time bin of 0.void
sort the points in the contour by time and frequency.
-
Constructor Details
-
GPLContour
public GPLContour(int iT, int iF, double signalExcess, double energy)
-
-
Method Details
-
makeNullContour
Make a null contour. not to be used for ANYTHING but a pla- Returns:
-
addContourPoint
public void addContourPoint(int iT, int iF, double signalExcess, double energy) Add a contour point- Parameters:
iT
- time biniF
- frequency bindataValue
- whitened data value.
-
addContourPoint
Add a contour point- Parameters:
contourPoint
-
-
getArea
public int getArea()Get the area of the contour- Returns:
-
sortContourPoints
public void sortContourPoints()sort the points in the contour by time and frequency. -
getTotalExcess
public double getTotalExcess()This is the sum of the whitened data in the contour. Has no rational scale.- Returns:
- sum of whitened levels
-
getTotalEnergy
public double getTotalEnergy()This is the sum^2 of every FFT point that formed part of the contour.- Returns:
- total energy in contour, scaled to counts
-
getOutline
public int[][] getOutline() -
getOutline
public int[][] getOutline(int binOffset) -
getContourPoints
Time is from the start of the call, Frequency is referenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.- Returns:
- the contourPoints
-
getMinFBin
public int getMinFBin()Referenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.- Returns:
- the minFBin
-
getMaxFBin
public int getMaxFBin()Referenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.- Returns:
- the maxFBin
-
getMinTBin
public int getMinTBin()- Returns:
- the minTBin
-
getMaxTBin
public int getMaxTBin()- Returns:
- the maxTBin
-
getBinsDuration
public int getBinsDuration()Get how long the sound was in FFT slices.- Returns:
-
shiftTimeBins
public void shiftTimeBins()shift the contour so that everything is referenced to a first time bin of 0. -
setTotalExcess
public void setTotalExcess(double totalExcess) - Parameters:
totalExcess
- the totalExcess to set
-
setTotalEnergy
public void setTotalEnergy(double totalEnergy) - Parameters:
totalEnergy
- the totalEnergy to set
-