Skip to content

Commit

Permalink
Merge branch 'feature/ecg_rpeak_vgraph_detector' of https://github.co…
Browse files Browse the repository at this point in the history
…m/sokolmarek/NeuroKit into feature/ecg_rpeak_vgraph_detector
  • Loading branch information
sokolmarek committed Nov 12, 2022
2 parents e9bd54a + acb4c11 commit d2e5e5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neurokit2/ecg/ecg_findpeaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ def _ecg_findpeaks_vgraph(signal, sampling_rate=1000, lowcut=3, order=2, **kwarg
"""
# Try loading ts2vg
try:
from ts2vg import NaturalVG
import ts2vg
except ImportError as import_error:
raise ImportError(
"NeuroKit error: ecg_findpeaks(): the 'ts2vg' module is required for"
Expand Down Expand Up @@ -1098,7 +1098,7 @@ def _ecg_findpeaks_vgraph(signal, sampling_rate=1000, lowcut=3, order=2, **kwarg
y = filtered[L:R]

# Compute the adjacency matrix to the directed visibility graph
A = NaturalVG(directed="top_to_bottom").build(y).adjacency_matrix()
A = ts2vg.NaturalVG(directed="top_to_bottom").build(y).adjacency_matrix()
_w = np.ones(len(y))

# Computee the weights for the ecg using its VG transformation
Expand Down

0 comments on commit d2e5e5a

Please sign in to comment.