Package gpl.contour
Class GPLContour
java.lang.Object
gpl.contour.GPLContour
- All Implemented Interfaces:
 Cloneable
- Direct Known Subclasses:
 NullGPLContour
- 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMake an empty contour.GPLContour(int iT, int iF, double signalExcess, double energy)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddContourPoint(int iT, int iF, double signalExcess, double energy) Add a contour pointvoidaddContourPoint(GPLContourPoint contourPoint) Add a contour pointprotected GPLContourclone()intgetArea()Get the area of the contourintGet 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.intReferenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.intintReferenced to the full spectrum, not just the detection band, so 0 represents 0 Hz and FFTLen/2 is Nyquist.intint[][]int[][]getOutline(int binOffset) doubleThis is the sum^2 of every FFT point that formed part of the contour.doubleThis is the sum of the whitened data in the contour.static GPLContourMake a null contour.protected voidsetMaxFBin(int maxFBin) protected voidsetMaxTBin(int maxTBin) protected voidsetMinFBin(int minFBin) protected voidsetMinTBin(int minTBin) voidsetTotalEnergy(double totalEnergy) voidsetTotalExcess(double totalExcess) voidshift the contour so that everything is referenced to a first time bin of 0.voidsort the points in the contour by time and frequency. 
- 
Constructor Details
- 
GPLContour
protected GPLContour()Make an empty contour. Not to be used to generate a contour to then add data to, since it doesn't have an arraylist of points. Only for null contours. - 
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:
 
 - 
clone
 - 
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
 - 
setMinFBin
protected void setMinFBin(int minFBin) - Parameters:
 minFBin- the minFBin to set
 - 
setMaxFBin
protected void setMaxFBin(int maxFBin) - Parameters:
 maxFBin- the maxFBin to set
 - 
setMinTBin
protected void setMinTBin(int minTBin) - Parameters:
 minTBin- the minTBin to set
 - 
setMaxTBin
protected void setMaxTBin(int maxTBin) - Parameters:
 maxTBin- the maxTBin to set
 
 -