Skip to content

Commit

Permalink
add None return for peak_times
Browse files Browse the repository at this point in the history
  • Loading branch information
darshanmandge committed Sep 28, 2023
1 parent 6aa8937 commit b595017
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bluepyopt/ephys/efeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ def calculate_feature(
from .extra_features_utils import calculate_features

"""Calculate feature value"""
if peak_times is None:
if return_waveforms:
return None, None
else:
return None

peak_times = self._get_peak_times(
responses, raise_warnings=raise_warnings
)
Expand All @@ -439,7 +445,10 @@ def calculate_feature(
if responses[self.recording_names[""]] is not None:
response = responses[self.recording_names[""]]
else:
return None
if return_waveforms:
return None, None
else:
return None

if np.std(np.diff(response["time"])) > 0.001 * np.mean(
np.diff(response["time"])
Expand Down

0 comments on commit b595017

Please sign in to comment.