Skip to content

Commit

Permalink
Merge pull request #89 from BlueBrain/bug_fix
Browse files Browse the repository at this point in the history
Some bug fix
  • Loading branch information
DrTaDa authored Sep 6, 2022
2 parents 694d381 + 2358b41 commit 764bd63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
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

0 comments on commit 764bd63

Please sign in to comment.