Skip to content

Commit

Permalink
Merge pull request #1074 from DerAndereJohannes/scipy_update
Browse files Browse the repository at this point in the history
[Update] changes scipy.signal.daub to PyWavelets format
  • Loading branch information
DominiqueMakowski authored Feb 12, 2025
2 parents b7cd604 + 1662b3b commit 2c78bee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neurokit2/ecg/ecg_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import pandas as pd
import scipy
import pywt

from ..misc import check_random_state, check_random_state_children
from ..signal import signal_distort, signal_resample
Expand Down Expand Up @@ -207,7 +208,7 @@ def _ecg_simulate_daubechies(duration=10, length=None, sampling_rate=1000, heart
"""
# The "Daubechies" wavelet is a rough approximation to a real, single, cardiac cycle
cardiac = scipy.signal.daub(10)
cardiac = np.array(pywt.Wavelet("db10").rec_lo)

# Add the gap after the pqrst when the heart is resting.
cardiac = np.concatenate([cardiac, np.zeros(10)])
Expand Down

0 comments on commit 2c78bee

Please sign in to comment.