Skip to content

Commit

Permalink
adjust simulation interval points for IV
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkilic committed Nov 22, 2024
1 parent b63047b commit 7fdf870
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 2 additions & 3 deletions bluepyemodel/emodel_pipeline/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,11 +1236,10 @@ def plot_IV_curves(
efel_settings = bluepyefe.tools.DEFAULT_EFEL_SETTINGS.copy()

lower_bound = -100
upper_bound = 300
upper_bound = 100

# Generate amplitude points
sim_amp_points = list(numpy.linspace(lower_bound, upper_bound, n_bin))

sim_amp_points = list(map(int, numpy.linspace(lower_bound, upper_bound, n_bin + 1)))
# add missing features (if any) to evaluator
updated_evaluator = fill_in_IV_curve_evaluator(
evaluator, efel_settings, prot_name, sim_amp_points
Expand Down
9 changes: 6 additions & 3 deletions bluepyemodel/emodel_pipeline/plotting_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,15 @@ def fill_in_IV_curve_evaluator(evaluator, efel_settings, prot_name="iv", new_amp
prot_v_deflection.append(prot.name)

if new_amps is not None:
prot_name_original = get_original_protocol_name(prot_name, evaluator)
for amp in new_amps:
protocol_name_amp = f"{prot_name.split('_')[0]}_{amp}"
protocol_name_amp = f"{prot_name_original.split('_')[0]}_{amp}"
if 0 <= amp < 100:
prot_max_v.append(protocol_name_amp)
if protocol_name_amp not in prot_max_v:
prot_max_v.append(protocol_name_amp)
elif amp < 0:
prot_v_deflection.append(protocol_name_amp)
if protocol_name_amp not in prot_v_deflection:
prot_v_deflection.append(protocol_name_amp)

# maps protocols of interest with all its associated features
# also get protocol data we need for feature registration
Expand Down

0 comments on commit 7fdf870

Please sign in to comment.