single_cell_parser
❭ cell_parser
❭ CellParser
❭ insert_range_mechanisms
CellParser.insert_range_mechanisms¶
- single_cell_parser.cell_parser.CellParser.insert_range_mechanisms(label, mechs)¶
Inserts range mechanisms into all structures named as
label
.Range mechanism specifications can be found in
mechanisms
.- Parameters:¶
label (str) – Label of the structure.
mechs (
ParameterSet
) – Range mechanisms. Must contain the keyspatial
to define the spatial distribution. Possible values for spatial distributions are given below.
- Raises:¶
RuntimeError – If the structure has not been parsed from the .hoc file yet.
NotImplementedError – If the spatial distribution is not implemented.
The following table lists the possible spatial keywords of
mech
, the additional keys each spatial key requires, and the corresponding math equations.Possible spatial keywords of mech
, the additional keys each spatial key requires, and the corresponding math equations.¶Spatial Key
Additional Keys
Math Equation
uniform
None
\(y = c\)
linear
slope
,offset
\(y = \text{slope} \cdot x + \text{offset}\)
linear_capped
prox_value
,dist_value
,dist_value_distance
\(y = \min(\text{prox_value} + \frac{\text{dist_value} - \text{prox_value}}{\text{dist_value_distance}} x, \text{dist_value})\)
exponential
offset
,linScale
,_lambda
,xOffset
\(y = \text{offset} + \text{linScale} \cdot e^{-\frac{x - \text{xOffset}}{\lambda}}\)
exponential_by_z_dist
offset
,linScale
,_lambda
,xOffset
\(y = \text{offset} + \text{linScale} \cdot e^{-\frac{z - \text{xOffset}}{\lambda}}\)
capped_exponential
offset
,linScale
,_lambda
,xOffset
,max_g
\(y = \min(\text{offset} + \text{linScale} \cdot e^{-\frac{x - \text{xOffset}}{\lambda}}, \text{max_g})\)
sigmoid
offset
,linScale
,xOffset
,width
\(y = \text{offset} + \frac{\text{linScale}}{1 + e^{\frac{x - \text{xOffset}}{\text{width}}}}\)
uniform_range
begin
,end
,outsidescale
,outsidescale_sections
\(y = c\) for \(\text{begin} \leq x \leq \text{end}\), \(y = c \cdot \text{outsidescale}\) otherwise