Comparator¶
- class pathsim.blocks.comparator.Comparator(threshold=0, tolerance=0.0001, span=[-1, 1])[source]¶
Bases:
BlockComparator block that sets the output to ‘1’ it the input signal crosses a predefined threshold and to ‘-1’ if it crosses in the reverse direction.
This is realized by the block spawning a zero-crossing event detector that watches the input of the block and locates the transition up to a tolerance.
The block output is determined by a simple sign check in the ‘update’ method.
- Parameters:
- events¶
internal zero crossing event
- Type: