Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
Merged
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
22 changes: 20 additions & 2 deletions bluepyefe/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@
logger = logging.getLogger(__name__)


def cells_pickle_output_path(output_directory):
"""Returns the cells.pkl output file path

Args:
output_directory (Path): the output directory
"""
return output_directory / "cells.pkl"


def protocols_pickle_output_path(output_directory):
"""Returns the protocols.pkl output file path

Args:
output_directory (Path): the output directory
"""
return output_directory / "protocols.pkl"


def _create_cell(cell_definition, recording_reader, efel_settings=None):
"""
Initialize a Cell object and populate it with the content of the associated
Expand Down Expand Up @@ -1037,8 +1055,8 @@ def extract_efeatures(
if pickle_cells:
path_cells = pathlib.Path(output_directory)
path_cells.mkdir(parents=True, exist_ok=True)
pickle.dump(cells, open(path_cells / "cells.pkl", 'wb'))
pickle.dump(protocols, open(path_cells / "protocols.pkl", 'wb'))
pickle.dump(cells, open(cells_pickle_output_path(path_cells), 'wb'))
pickle.dump(protocols, open(protocols_pickle_output_path(path_cells), 'wb'))

if plot:
plot_all_recordings_efeatures(
Expand Down