Skip to content
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
26 changes: 16 additions & 10 deletions bluepyefe/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,22 +451,28 @@ def group_efeatures(
efel_settings=efel_settings,
)

missing_protocols = set()

for protocol in protocols:
found = False
for cell in cells:

if cell.rheobase is None and not absolute_amplitude:
continue
recordings = cell.get_recordings_by_protocol_name(protocol.name)
if not recordings:
continue
found = True

for recording in cell.get_recordings_by_protocol_name(
protocol.name
):

if recording.in_target(
protocol.amplitude,
protocol.tolerance,
absolute_amplitude
):
for recording in recordings:
if recording.in_target(protocol.amplitude,
protocol.tolerance,
absolute_amplitude):
protocol.append(recording)
if not found:
missing_protocols.add(protocol.name)

for name in missing_protocols:
logger.warning(f"Protocol '{name}' not found in any cell recordings.")

return protocols

Expand Down
10 changes: 10 additions & 0 deletions bluepyefe/nwbreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,16 @@ def read(self):
data (list of dict): list of traces
"""
data = []

# Only return data if target_protocols is None or includes "step"
if self.target_protocols:
allowed = [p.lower() for p in self.target_protocols]
if "step" not in allowed:
logger.warning(
f"TRTNWBReader only supports 'step' protocols, but requested: {self.target_protocols}. Skipping."
)
return []

# possible paths in content:
# /acquisition/index_00
# or /acquisition/index_000
Expand Down