Simulation Functions
attr_sim(pop, attr_dict, t=500)
#
Simulates a period 't' setting the attributes of a given population to the values specified in 'attr_list', after this simulation the attributes are reset to initial values (before simulation).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population whose attributes should be set |
required |
attr_dict |
dict
|
dictionary containing the attributes and their values |
required |
t |
int
|
duration in ms |
500
|
Source code in src/CompNeuroPy/simulation_functions.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
attribute_step(pop, attr, t1=500, t2=500, v1=0, v2=100)
#
Simulates an attribute step for a given population.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population whose attribute should be changed |
required |
attr |
str
|
name of attribute which should be changed |
required |
t1 |
int
|
time in ms before step |
500
|
t2 |
int
|
time in ms after step |
500
|
v1 |
int
|
value of attribute for t1 |
0
|
v2 |
int
|
value of attribute for t2 |
100
|
Returns:
Name | Type | Description |
---|---|---|
return_dict |
dict
|
dictionary containing:
|
Source code in src/CompNeuroPy/simulation_functions.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
attr_ramp(pop, attr, v0, v1, dur, n)
#
Simulating while constantly changing the attribute of a given population. After this attr_ramp simulation the attribute value is reset to the initial value (before simulation).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population whose attribute should be changed |
required |
attr |
str
|
name of attribute which should be changed |
required |
v0 |
int
|
initial value of attribute (of first stimulation) |
required |
v1 |
int
|
final value of attribute (of last stimulation) |
required |
dur |
int
|
duration of the complete ramp simulation |
required |
n |
int
|
number of steps for changing the attribute |
required |
Warning
dur/n should be divisible by the simulation time step without remainder
Returns:
Name | Type | Description |
---|---|---|
return_dict |
dict
|
dictionary containing:
|
Raises:
Type | Description |
---|---|
ValueError
|
if resulting duration of one stimulation is not divisible by the simulation time step without remainder |
Source code in src/CompNeuroPy/simulation_functions.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
increasing_attr(pop, attr, v0, dv, nr_steps, dur_step)
#
Conducts multiple simulations while constantly increasing the attribute of a given population. After this simulation the attribute value is reset to the initial value (before simulation).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population whose attribute should be changed |
required |
v0 |
int
|
initial attribute value (of first stimulation) |
required |
dv |
int
|
attribute step size |
required |
nr_steps |
int
|
number of simulations with different attribute values |
required |
dur_step |
int
|
duration of one step simulation |
required |
Returns:
Name | Type | Description |
---|---|---|
return_dict |
dict
|
dictionary containing:
|
Source code in src/CompNeuroPy/simulation_functions.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
current_step(pop, t1=500, t2=500, a1=0, a2=100)
#
Stimulates a given population in two periods with two input currents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population, which should be stimulated with input current neuron model of population has to contain "I_app" as input current |
required |
t1 |
int
|
time in ms before current step |
500
|
t2 |
int
|
time in ms after current step |
500
|
a1 |
int
|
current amplitude before current step |
0
|
a2 |
int
|
current amplitude after current step |
100
|
Returns:
Name | Type | Description |
---|---|---|
return_dict |
dict
|
dictionary containing:
|
Source code in src/CompNeuroPy/simulation_functions.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
current_stim(pop, t=500, a=100)
#
Stimulates a given population during specified period 't' with input current with amplitude 'a', after this stimulation the current is reset to initial value (before stimulation).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population, which should be stimulated with input current neuron model of population has to contain "I_app" as input current |
required |
t |
int
|
duration in ms |
500
|
a |
int
|
current amplitude |
100
|
Source code in src/CompNeuroPy/simulation_functions.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
current_ramp(pop, a0, a1, dur, n)
#
Conducts multiple current stimulations with constantly changing current inputs. After this current_ramp stimulation the current amplitude is reset to the initial value (before current ramp).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population, which should be stimulated with input current neuron model of population has to contain "I_app" as input current |
required |
a0 |
int
|
initial current amplitude (of first stimulation) |
required |
a1 |
int
|
final current amplitude (of last stimulation) |
required |
dur |
int
|
duration of the complete current ramp (all stimulations) |
required |
n |
int
|
number of stimulations |
required |
Warning
dur/n should be divisible by the simulation time step without remainder
Returns:
Name | Type | Description |
---|---|---|
return_dict |
dict
|
dictionary containing:
|
Raises:
Type | Description |
---|---|
ValueError
|
if resulting duration of one stimulation is not divisible by the simulation time step without remainder |
Source code in src/CompNeuroPy/simulation_functions.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
|
increasing_current(pop, a0, da, nr_steps, dur_step)
#
Conducts multiple current stimulations with constantly increasing current inputs. After this increasing_current stimulation the current amplitude is reset to the initial value (before increasing_current).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pop |
str
|
population name of population, which should be stimulated with input current neuron model of population has to contain "I_app" as input current |
required |
a0 |
int
|
initial current amplitude (of first stimulation) |
required |
da |
int
|
current step size |
required |
nr_steps |
int
|
number of stimulations |
required |
dur_step |
int
|
duration of one stimulation |
required |
Returns:
Name | Type | Description |
---|---|---|
return_dict |
dict
|
dictionary containing:
|
Source code in src/CompNeuroPy/simulation_functions.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
|