seismicVeto
Class VetoProcess.ChannelDetector
java.lang.Object
seismicVeto.VetoProcess.ChannelDetector
- Enclosing class:
- VetoProcess
class VetoProcess.ChannelDetector
- extends java.lang.Object
Since the detector may be running on several channels, make a sub class for the actual detector
code so that multiple instances may be created.
- Author:
- Doug Gillespie
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
channel
private int channel
detectionOn
private boolean detectionOn
background
private double background
callCount
private int callCount
runningBackground
private double[] runningBackground
setupCount
static final int setupCount
- See Also:
- Constant Field Values
randomWaveData
private double[][] randomWaveData
- Random waveofrms for use in simulated wave data.
selectedWave1
private int selectedWave1
selectedWave2
private int selectedWave2
randomSample
private int randomSample
detectionEndSample
private long detectionEndSample
detectionStartSample
private long detectionStartSample
detectionEnergy
private double detectionEnergy
detectionSliceCount
private int detectionSliceCount
VetoProcess.ChannelDetector
public VetoProcess.ChannelDetector(int channel)
pamStart
public void pamStart()
newData
public void newData(PamObservable o,
FFTDataUnit arg)
- Performs the same function as newData in the outer class, but this
time it should only ever get called with data for a single channel.
For the first few calls, it just updates the background by taking a straight mean
of the energy values. After that it calculates a decaying average of
the background.
- Parameters:
o - arg -
fillWaveData
protected void fillWaveData(double[] data)
clearWaveData
protected void clearWaveData(double[] data)
prepareRandomWaveData
private double[][] prepareRandomWaveData(int nSamples)
- generate a number of random samples of data which follow a particular
spectral shape. These will be stitched together in random order to make a
longer wave sample in the veto
- Parameters:
nSamples - sampleLength -
energySum
private double energySum(Complex[] fftData,
int bin1,
int bin2)
startDetection
private void startDetection(FFTDataUnit dataUnit,
double energy)
continueDetection
private void continueDetection(FFTDataUnit dataUnit,
double energy)
endDetection
private void endDetection()
getRunningBackground
public double[] getRunningBackground()