Skip to content

Commit

Permalink
hotfix3
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Aug 14, 2017
1 parent 23fc17e commit 61bbaef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion neurokit/bio/bio_ecg.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,13 @@ def compute_features(variable, prefix, response):

# Compute differences between features and baseline
keys = [key for key in ECG_Response.keys() if '_Baseline' in key] # Find keys
keys = [key for key in keys if 'ECG_HRV_' in key]
keys = [s.replace('_Baseline', '') for s in keys] # Remove baseline part
for key in keys:
ECG_Response["ECG_HRV_" + key + "_Diff"] = ECG_Response[key] - ECG_Response[key + "_Baseline"]
try:
ECG_Response["ECG_HRV_" + key + "_Diff"] = ECG_Response[key] - ECG_Response[key + "_Baseline"]
except KeyError:
ECG_Response["ECG_HRV_" + key + "_Diff"] = np.nan



Expand Down

0 comments on commit 61bbaef

Please sign in to comment.