Skip to content

Commit

Permalink
Merge pull request #472 from darshanmandge/extra_efeat_none
Browse files Browse the repository at this point in the history
add None return for peak_times in calculate_feature() of extraFELFeature class
  • Loading branch information
AurelienJaquier committed Sep 29, 2023
2 parents 6aa8937 + 12a4df9 commit f7fd66d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bluepyopt/ephys/efeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@ def calculate_feature(
peak_times = self._get_peak_times(
responses, raise_warnings=raise_warnings
)
if peak_times is None:
if return_waveforms:
return None, None
else:
return None

if len(peak_times) > 1 and self.skip_first_spike:
peak_times = peak_times[1:]
Expand All @@ -439,7 +444,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 f7fd66d

Please sign in to comment.