Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add None return for peak_times in calculate_feature() of extraFELFeature class #472

Merged
merged 5 commits into from
Sep 29, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading