Skip to content

Commit

Permalink
arbor-related code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaquier Aurélien Tristan committed Aug 22, 2024
1 parent 5778cd5 commit f9ac053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bluepyopt/ephys/morphologies.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def load(morpho_filename, replace_axon):
elif morpho_suffix == '.swc':
morpho = arbor.load_swc_arbor(morpho_filename)
# turn loaded_morphology into morphology type
morpho = arbor.morphology(morpho.segment_tree)
morpho = morpho.morphology
elif morpho_suffix == '.asc':
morpho = arbor.load_asc(morpho_filename).morphology
else:
Expand Down
4 changes: 2 additions & 2 deletions bluepyopt/ephys/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def instantiate_recordings(self, cell_model, use_labels=False):
"""Instantiate recordings"""

# Attach voltage probe sampling at 10 kHz (every 0.1 ms)
for _, rec in enumerate(self.recordings):
for i, rec in enumerate(self.recordings):
# alternatively arbor.cable_probe_membrane_voltage
arb_loc = rec.location.acc_label()
if isinstance(arb_loc, list) and len(arb_loc) != 1:
Expand All @@ -653,7 +653,7 @@ def instantiate_recordings(self, cell_model, use_labels=False):

cell_model.probe('voltage',
arb_loc.ref if use_labels else arb_loc.loc,
"0", # tag: default is '0'
f"probe-{i}",
# frequency could be a parameter
frequency=10 * arbor.units.kHz)

Expand Down

0 comments on commit f9ac053

Please sign in to comment.