Skip to content

Commit

Permalink
Merge pull request #1044 from athatcher13/consistent_interpolation_pp…
Browse files Browse the repository at this point in the history
…g_quality

[Change] Update ppg_quality.py to use consistent interpolation method ('previous')
  • Loading branch information
DominiqueMakowski authored Dec 8, 2024
2 parents 5d03ccc + 2cf5862 commit 1d30473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neurokit2/ppg/ppg_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _ppg_quality_templatematch(ppg_cleaned, ppg_pw_peaks=None, sampling_rate=100

# Interpolate beat-by-beat CCs
quality = signal_interpolate(
ppg_pw_peaks[0:-1], cc, x_new=np.arange(len(ppg_cleaned)), method="quadratic"
ppg_pw_peaks[0:-1], cc, x_new=np.arange(len(ppg_cleaned)), method="previous"
)

return quality
Expand Down Expand Up @@ -193,4 +193,4 @@ def _ppg_quality_disimilarity(ppg_cleaned, ppg_pw_peaks=None, sampling_rate=1000
ppg_pw_peaks[0:-1], dis, x_new=np.arange(len(ppg_cleaned)), method="previous"
)

return quality
return quality

0 comments on commit 1d30473

Please sign in to comment.