An array where each value has an associated time.
Initialisation arguments:
Note that if the clock, or start time and dt, of the array should be the default clock values, then you should not specify clock, start or dt (see Technical notes below).
Arbitrary slicing of the array is supported, but the clock will only be preserved where the intervals can be guaranteed to be fixed, that is except for the case where lists or numpy arrays are used on the time index.
Timed arrays can be called as if they were a function of time if the array times are based on a clock (but not if the array times are arbitrary as the look up costs would be excessive). If x(t) is called where times[i]<=t<times[i]+dt for some index i then x(t) will have the value x[i]. You can also call x(t) with t a 1D array. If x is 1D then x(t)[i]=x(t[i]), if x is 2D then x(t)[i]=x(t[i])[i].
Has one method:
See also TimedArraySetter, set_group_var_by_array() and NeuronGroup.
Technical notes
Note that specifying a new clock, or values of start and dt, will mean that if you use this TimedArray to set the value of a NeuronGroup variable, it will be updated on the schedule of this clock, which can (due to floating point errors) induce some timing problems. This rarely happens, but if an occasional inaccuracy of order dt might conceivably be critical for your simulation, you should use RegularClock objects instead of Clock objects.
Sets NeuronGroup values with a TimedArray.
At the beginning of each update step, this object will set the values of a given state variable of a group with the value from the array corresponding to the current simulation time.
Initialisation arguments:
Sets NeuronGroup values with a TimedArray.
Creates a TimedArraySetter, see that class for details.
Used for linking one NeuronGroup variable to another.
Sample usage:
G = NeuronGroup(...)
H = NeuronGroup(...)
G.V = linked_var(H, 'W')
In this scenario, the variable V in group G will always be updated with the values from variable W in group H. The groups G and H must be the same size (although subgroups can be used if they are not the same size).
Arguments: