public class OldClickClass
extends java.lang.Object
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
ClickDetector
Constructor and Description |
---|
OldClickClass(ClickDetector clickDetector,
long startSample,
int nChan,
long duration,
int channelList,
int triggerList) |
Modifier and Type | Method and Description |
---|---|
double |
clickLength(double percent)
Calculates the length of a click in seconds averaged over all channels
|
double |
clickLength(int channel,
double percent)
Calculates the length of a click in seconds for a particular channel
|
void |
freeClickMemory() |
double |
getAmplitude(int channel) |
double |
getAngle(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 length
|
Complex[] |
getComplexSpectrum(int channel,
int fftLength)
Returns the complex spectrum for a given channel using a set FFT length
|
int |
getCurrentSpectrumLength() |
double |
getDBamplitude() |
int |
getDelay() |
int |
getEventId() |
double |
getMeanAmplitude() |
int |
getNChan() |
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 channels
|
double[][] |
getWaveData() |
double[] |
getWaveData(int channel) |
double |
inBandEnergy(double[] freqs)
Calculates the total energy within a particular frequency band
|
boolean |
isTracked() |
double |
peakFrequency(double[] searchRange) |
double |
peakFrequencyWidth(double peakFrequency,
double percent) |
void |
setAmplitude(int channel,
double amplitude) |
void |
setDBamplitude(double bamplitude) |
void |
setDelay(int delay) |
void |
setEventId(int eventId) |
void |
setTracked(boolean tracked) |
void |
setWaveData(double[][] waveData) |
public OldClickClass(ClickDetector clickDetector, long startSample, int nChan, long duration, int channelList, int triggerList)
public boolean isTracked()
public void setTracked(boolean tracked)
public int getEventId()
public void setEventId(int eventId)
public double getAngle(float sampleRate)
sampleRate
- public Complex[] getComplexSpectrum(int channel)
channel
- public Complex[] getComplexSpectrum(int channel, int fftLength)
channel
- fftLength
- public int getCurrentSpectrumLength()
public double[] getPowerSpectrum(int channel, int fftLength)
channel
- fftLength
- public double[] getTotalPowerSpectrum(int fftLength)
fftLength
- public double inBandEnergy(double[] freqs)
freqs
- BasicClickIdentifier
public double clickLength(double percent)
percent
- Fraction of total click energy to use in the calculationBasicClickIdentifier
public double clickLength(int channel, double percent)
channel
- percent
- Fraction of total click energy to use in the calculationBasicClickIdentifier
public double peakFrequency(double[] searchRange)
public double peakFrequencyWidth(double peakFrequency, double percent)
public double getAmplitude(int channel)
public void setAmplitude(int channel, double amplitude)
public double[] getWaveData(int channel)
public double[][] getWaveData()
public void setWaveData(double[][] waveData)
public void freeClickMemory()
public double getMeanAmplitude()
public double getDBamplitude()
public void setDBamplitude(double bamplitude)
bamplitude
- The dBamplitude to set.public int getDelay()
public void setDelay(int delay)
delay
- The delay to set.public int getNChan()