Skip to content

Commit

Permalink
Also pickles the targets/protocols (#137)
Browse files Browse the repository at this point in the history
* Also pickles the targets/protocols

* add values properties

---------

Co-authored-by: arnaudon <alexis.arnaudon@epfl.ch>
  • Loading branch information
DrTaDa and arnaudon committed Mar 23, 2023
1 parent 4ed2ddb commit 44bb87d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bluepyefe/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ def extract_efeatures(
rheobase_strategy,
rheobase_settings
)

efeatures, protocol_definitions, current = create_feature_protocol_files(
cells,
protocols,
Expand All @@ -995,10 +996,12 @@ def extract_efeatures(
write_files=write_files,
default_std_value=default_std_value
)

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'))

if plot:
plot_all_recordings_efeatures(
Expand Down
5 changes: 5 additions & 0 deletions bluepyefe/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def __init__(
self._files = []
self._auto_thresholds = []

@property
def values(self):
"""Return all values."""
return self._values

@property
def mean(self):
"""Average of the e-feature value at target"""
Expand Down

0 comments on commit 44bb87d

Please sign in to comment.