navis.interfaces.neuron.network.PointNetwork.add_stimulus¶
- PointNetwork.add_stimulus(ids, start, frequency, stop=None, duration=None, randomness=0.5, independent=True, label=None, weight=1)[source]¶
Add stimulus to given neurons.
Important
Stimuli are implemented via a NetStim object which provides the specified stimulation (i.e. start, stop, frequency). This NetStim is then connected to the neuron(s) via a NetCon. The response of the neuron to the stimulus depends heavily on the weight of that connection: too low and you won’t elicit any spikes, too high and you will produce higher frequencies than expected. The “correct” weight depends on the model & parameters you use for your point processes, and I highly recommend you check if you get the expected stimulation.
- Parameters:
ids (int | iterable) – IDs of neurons to add stimulus to.
start (int) – Start time [ms] for the stimulus. Note that the exact start and stop time will vary depending on randomness.
stop/duration (int) – Either stop time or duration of stimulus [ms]. Must provide one or the other but not both.
frequency (int | iterable) – Frequency [Hz] of background noise . If iterable must match length of ids. Values <= 0 are silently skipped.
randomness (float [0-1]) – Randomness of spike timings.
independent (bool) – If True (default), each neuron will get its own independent stimulus.
label (str, optional) – A label to identify the stimulus.
weight (float) – Weight for the connection between the stimulator and the neuron. This really should be 1 to make sure each spike in the stimulus elicits a spike in the target.