Package clickDetector
Class OldClickClass
java.lang.Object
clickDetector.OldClickClass
- Author:
 - Doug Gillespie Click objects created by a click detector.
         
Contains a snap shot of wave data representing the click (this may or may not have been filtered). Also contains the basic data included in clicks created by RainbowClick
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionOldClickClass(ClickDetector clickDetector, long startSample, int nChan, long duration, int channelList, int triggerList)  - 
Method Summary
Modifier and TypeMethodDescriptiondoubleclickLength(double percent) Calculates the length of a click in seconds averaged over all channelsdoubleclickLength(int channel, double percent) Calculates the length of a click in seconds for a particular channelvoiddoublegetAmplitude(int channel) doublegetAngle(float sampleRate) Gets the angle to a click from the time delay on two hydrophones based on sound speed.Complex[]getComplexSpectrum(int channel) Returns the complex spectrum for a given channel using the shortest possible FFT lengthComplex[]getComplexSpectrum(int channel, int fftLength) Returns the complex spectrum for a given channel using a set FFT lengthintdoubleintgetDelay()intdoubleintgetNChan()double[]getPowerSpectrum(int channel, int fftLength) Returns the power spectum for a given channel (square of magnitude of complex spectrum)double[]getTotalPowerSpectrum(int fftLength) Returns the sum of the power spectra for all channelsdouble[][]double[]getWaveData(int channel) doubleinBandEnergy(double[] freqs) Calculates the total energy within a particular frequency bandbooleandoublepeakFrequency(double[] searchRange) doublepeakFrequencyWidth(double peakFrequency, double percent) voidsetAmplitude(int channel, double amplitude) voidsetDBamplitude(double bamplitude) voidsetDelay(int delay) voidsetEventId(int eventId) voidsetTracked(boolean tracked) voidsetWaveData(double[][] waveData)  
- 
Constructor Details
- 
OldClickClass
public OldClickClass(ClickDetector clickDetector, long startSample, int nChan, long duration, int channelList, int triggerList)  
 - 
 - 
Method Details
- 
isTracked
public boolean isTracked() - 
setTracked
public void setTracked(boolean tracked)  - 
getEventId
public int getEventId() - 
setEventId
public void setEventId(int eventId)  - 
getAngle
public double getAngle(float sampleRate) Gets the angle to a click from the time delay on two hydrophones based on sound speed.- Parameters:
 sampleRate-- Returns:
 - The angle to the click (ahead = 0 degrees)
 
 - 
getComplexSpectrum
Returns the complex spectrum for a given channel using the shortest possible FFT length- Parameters:
 channel-- Returns:
 - The complex spectrum
 
 - 
getComplexSpectrum
Returns the complex spectrum for a given channel using a set FFT length- Parameters:
 channel-fftLength-- Returns:
 - the complex spectrum
 
 - 
getCurrentSpectrumLength
public int getCurrentSpectrumLength() - 
getPowerSpectrum
public double[] getPowerSpectrum(int channel, int fftLength) Returns the power spectum for a given channel (square of magnitude of complex spectrum)- Parameters:
 channel-fftLength-- Returns:
 - Power spectrum
 
 - 
getTotalPowerSpectrum
public double[] getTotalPowerSpectrum(int fftLength) Returns the sum of the power spectra for all channels- Parameters:
 fftLength-- Returns:
 - Sum of power spectra
 
 - 
inBandEnergy
public double inBandEnergy(double[] freqs) Calculates the total energy within a particular frequency band- Parameters:
 freqs-- Returns:
 - In Band Energy
 - See Also:
 
 - 
clickLength
public double clickLength(double percent) Calculates the length of a click in seconds averaged over all channels- Parameters:
 percent- Fraction of total click energy to use in the calculation- Returns:
 - click length in seconds
 - See Also:
 
 - 
clickLength
public double clickLength(int channel, double percent) Calculates the length of a click in seconds for a particular channel- Parameters:
 channel-percent- Fraction of total click energy to use in the calculation- Returns:
 - Click Length (seconds)
 - See Also:
 
 - 
peakFrequency
public double peakFrequency(double[] searchRange)  - 
peakFrequencyWidth
public double peakFrequencyWidth(double peakFrequency, double percent)  - 
getAmplitude
public double getAmplitude(int channel)  - 
setAmplitude
public void setAmplitude(int channel, double amplitude)  - 
getWaveData
public double[] getWaveData(int channel)  - 
getWaveData
public double[][] getWaveData() - 
setWaveData
public void setWaveData(double[][] waveData)  - 
freeClickMemory
public void freeClickMemory() - 
getMeanAmplitude
public double getMeanAmplitude() - 
getDBamplitude
public double getDBamplitude()- Returns:
 - Returns the dBamplitude.
 
 - 
setDBamplitude
public void setDBamplitude(double bamplitude) - Parameters:
 bamplitude- The dBamplitude to set.
 - 
getDelay
public int getDelay()- Returns:
 - Returns the delay.
 
 - 
setDelay
public void setDelay(int delay) - Parameters:
 delay- The delay to set.
 - 
getNChan
public int getNChan() 
 -