Skip to content

Commit

Permalink
Update eda_intervalrelated.py
Browse files Browse the repository at this point in the history
Compute the mean peaks amplitude only on the peaks (and not on the whole signal)
  • Loading branch information
mperreir committed Oct 2, 2023
1 parent ce33299 commit b05a700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neurokit2/eda/eda_intervalrelated.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _eda_intervalrelated(
)
output["SCR_Peaks_Amplitude_Mean"] = np.nan
else:
output["SCR_Peaks_Amplitude_Mean"] = np.nanmean(data["SCR_Amplitude"].values)
output["SCR_Peaks_Amplitude_Mean"] = np.nanmean(data[data["SCR_Peaks"] == 1]["SCR_Amplitude"].values)

# Get variability of tonic
if "EDA_Tonic" in colnames:
Expand Down

0 comments on commit b05a700

Please sign in to comment.