streamsim.src.examples.sinus_demo module
Sinus Wave Peak Detection Demonstration Script.
- streamsim.src.examples.sinus_demo.run_sinus_example()[source]
Executes the Sinus Wave Peak Detection demonstration pipeline.
This function sets up a synthetic 1 Hz sine wave source and processes it through a general-purpose feature derivation and detection chain. It visualizes the raw wave and marks the detected local maxima (peaks).
- Configuration Details:
Signal Frequency: 1.0 Hz (one cycle per second).
Sampling Rate: 100.0 Hz (10 ms intervals).
Duration: Generates data for 20 seconds.
Window Duration: 5.0 seconds of rolling data visible.
Simulation Interval: 30ms (approx. 33Hz update rate).
History Limit: Keeps up to 5000 samples in memory.
- Components Initialized:
Data Source: Custom generator yielding sin(2πt).
Feature Deriver: SimpleFeature (passes data through).
Detector: SimpleDetector (identifies local maxima).
Renderer: RPeakRenderer (blue signal, orange peaks).
Example
>>> run_sinus_example() Running Sinus Wave Peak Detection... # [Matplotlib window opens with live sine wave and orange peak markers]