Pythonic Virtual Machine
peaker Class Reference

Detailed Description

PeakDetector.png
schema

Takes in an input and outputs when it finds a peak, where the peak is and how long since the last peak

  • Upper Peak found if $(t-2)$ $<$ $f(t-1)$ and $f(t-1)$ $>$ $f(t)$ is true
  • Lower Peak found if $(t-2)$ $>$ $f(t-1)$ and $f(t-1)$ $<$ $f(t)$ is true

Initialisation parameters:

  • pushed = True|False push the output buffer immediately if True
  • up = 1|0 : When set to 1 peaks in the positve y axis will be detected and when set to 0 peaks in the negative will be detected.

Input channels:

  • signal

Output channels:

  • tick = 1 if a peak and 0 if no peak
  • peak = location of the peak
  • delay = time elapsed since last peak was found

Example:

1 machine.AddCircuit(type='peaker', name='Peaks' , up = 1)

Inherits Circuit.

Additional Inherited Members

- Public Attributes inherited from Circuit
 name
 Name of the circuit. More...
 
 enabled
 if it is working... More...
 
 machine
 Reference to the virtual machine to which this circuit belongs. More...
 
 pushed
 Push output buffer at the end of Update. More...
 
 I
 Dictionary of input channels.
 
 O
 Dictionary of output channels.
 
 cCoreID
 index of circuit in cCore
 

Documentation for pyVAFM
Generated on Wed Feb 8 2017 10:13:49 for pyVAFM by doxygen 1.8.9.1