Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 130d990

Browse files
author
Jaquier Aurélien Tristan
committed
allow to use '&' and the distance twice in hoc distribution
1 parent d506c7c commit 130d990

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bluepyopt/ephys/create_hoc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def range_exprs_to_hoc(range_params):
105105
for param in range_params:
106106
value = param.value_scaler.inst_distribution
107107
value = re.sub(r'math\.', '', value)
108+
value = re.sub(r'\&', '&&', value)
108109
value = re.sub('{distance}', FLOAT_FORMAT, value)
109110
value = re.sub('{value}', format_float(param.value), value)
110111
ret.append(Range(param.location, param.name, value))

bluepyopt/ephys/templates/cell_template.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ proc distribute_distance(){local x localobj sl
120120
this.soma[0] distance(0, 0.5)
121121
sprint(distfunc, "%%s %s(%%f) = %s", mech, distfunc)
122122
forsec sl for(x, 0) {
123-
sprint(stmp, distfunc, secname(), x, distance(x))
123+
sprint(stmp, distfunc, secname(), x, distance(x), distance(x))
124124
execute(stmp)
125125
}
126126
}

0 commit comments

Comments
 (0)