HeartBeatRate/Software/dashboard/ecg_sim.py

7 lines
309 B
Python

import neurokit2 as nk # Load the package
simulated_ecg = nk.ecg_simulate(duration=8, sampling_rate=200, heart_rate=80)
signal, info = nk.ecg_process(simulated_ecg, sampling_rate=200)
nk.write_csv(signal, "./ecg_simulate_data.csv")
# nk.signal_plot(simulated_ecg, sampling_rate=200) # Visualize the signal