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

Some bug fix #89

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions bluepyefe/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ def read_recordings(


def extract_efeatures_at_targets(
cells,
targets,
map_function=map,
efel_settings=None
cells,
targets,
map_function=map,
efel_settings=None
):
"""
Extract efeatures from recordings following the protocols, amplitudes and
Expand Down Expand Up @@ -809,7 +809,7 @@ def extract_efeatures(
the path contains data coming from different stimuli (eg: for NWB).
targets (list): define the efeatures to extract as well as which
protocols and current amplitude they should be extracted for. If
targets are not probided, automatic targets will be used.
targets are not provided, automatic targets will be used.
Of the form:
[{
"efeature": "AP_amplitude",
Expand Down
13 changes: 10 additions & 3 deletions bluepyefe/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ def _nwb_reader_BBP(content, target_protocols, repetition):
for cell_id in content["data_organization"].keys():

if ecode not in content["data_organization"][cell_id]:
logger.info(
f"No eCode {ecode} in nwb {in_data['filepath']}."
)
logger.debug(f"No eCode {ecode} in nwb.")
continue

ecode_content = content["data_organization"][cell_id][ecode]
Expand All @@ -292,6 +290,15 @@ def _nwb_reader_BBP(content, target_protocols, repetition):
else:
continue

if key_current not in content["stimulus"]["presentation"]:
logger.debug(f"Ignoring {key_current} not"
" present in the stimulus presentation")
continue
if trace_name not in content["acquisition"]:
logger.debug(f"Ignoring {trace_name} not"
" present in the acquisition")
continue

data.append(_format_nwb_trace(
voltage=content["acquisition"][trace_name]["data"],
current=content["stimulus"]["presentation"][key_current]["data"],
Expand Down