Package ca.uqac.lif.cep.signal
Class PeakFinderTravelRise
- java.lang.Object
-
- ca.uqac.lif.cep.Processor
-
- ca.uqac.lif.cep.SynchronousProcessor
-
- ca.uqac.lif.cep.signal.WindowProcessor
-
- ca.uqac.lif.cep.signal.PeakFinderTravelRise
-
- All Implemented Interfaces:
ca.uqac.lif.azrael.Printable
,ca.uqac.lif.azrael.Readable
,ca.uqac.lif.cep.Contextualizable
,ca.uqac.lif.cep.Duplicable
,ca.uqac.lif.cep.DuplicableProcessor
public class PeakFinderTravelRise extends WindowProcessor
Finds peaks in a sequence of numerical values using the "travel-rise" technique. This works as follows:Between any two points in your data, (x(0),y(0)) and (x(n),y(n)), add up y(i+1)-y(i) for 0 <= i < n and call this T ("travel") and set R ("rise") to y(n)- y(0) + k for suitably small k. T/R > 1 indicates a peak. This works OK if large travel due to noise is unlikely or if noise distributes symmetrically around a base curve shape.
- Author:
- Sylvain
-
-
Field Summary
Fields Modifier and Type Field Description protected static float
s_k
-
Fields inherited from class ca.uqac.lif.cep.signal.WindowProcessor
m_maxValue, m_minValue, m_values, m_windowWidth, s_precision
-
Fields inherited from class ca.uqac.lif.cep.SynchronousProcessor
m_inputPushables, m_outputPullables, m_tempQueue
-
Fields inherited from class ca.uqac.lif.cep.Processor
m_context, m_eventTracker, m_hasBeenNotifiedOfEndOfTrace, m_inputArity, m_inputCount, m_inputPullables, m_inputQueues, m_notifiedEndOfTraceDownstream, m_outputArity, m_outputCount, m_outputPushables, m_outputQueues, MAX_PULL_RETRIES, s_versionString
-
-
Constructor Summary
Constructors Constructor Description PeakFinderTravelRise(int width)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
compute(java.lang.Object[] inputs, java.util.Queue<java.lang.Object[]> outputs)
java.lang.Float
computeOutputValue()
PeakFinderTravelRise
duplicate(boolean with_state)
-
Methods inherited from class ca.uqac.lif.cep.signal.WindowProcessor
doubleEquals, getMaxValue, getMinValue, reset
-
Methods inherited from class ca.uqac.lif.cep.SynchronousProcessor
getPullableOutput, getPushableInput, setEventTracker
-
Methods inherited from class ca.uqac.lif.cep.Processor
allNotifiedEndOfTrace, allNull, associateTo, associateToInput, associateToOutput, copyInputQueue, copyOutputQueue, duplicate, duplicateInto, equals, getAt, getContext, getContext, getEmptyQueue, getEventTracker, getId, getInputArity, getInputCount, getInputQueue, getInputType, getInputTypesFor, getLeaves, getLeaves, getOutputArity, getOutputCount, getOutputQueue, getOutputType, getPullableInput, getPullableOutput, getPushableInput, getPushableOutput, hashCode, leftShift, newContext, onEndOfTrace, or, or, print, printState, read, readState, rightShift, setContext, setContext, setPullableInput, setPushableOutput, start, startAll, stop, stopAll
-
-
-
-
Field Detail
-
s_k
protected static final float s_k
- See Also:
- Constant Field Values
-
-
Method Detail
-
compute
protected boolean compute(java.lang.Object[] inputs, java.util.Queue<java.lang.Object[]> outputs)
- Specified by:
compute
in classca.uqac.lif.cep.SynchronousProcessor
-
duplicate
public PeakFinderTravelRise duplicate(boolean with_state)
- Specified by:
duplicate
in interfaceca.uqac.lif.cep.Duplicable
- Specified by:
duplicate
in classca.uqac.lif.cep.Processor
-
computeOutputValue
public java.lang.Float computeOutputValue()
- Specified by:
computeOutputValue
in classWindowProcessor
-
-