weight_recorder – Recording weights from synapses

Description

The change in synaptic weights over time is a key observable property in studies of plasticity in neuronal network models. To access this information, the weight_recorder can be used. In contrast to other recording devices, which are connected to a specific set of neurons, the weight recorder is instead set as a parameter in the synapse model.

After assigning an instance of a weight recorder to the synapse model by setting its weight_recorder property, the weight recorder collects the global IDs of source and target neurons together with the weight for each spike event that travels through the observed synapses.

To only record from a subset of connected synapses, the weight recorder accepts NodeCollections in the parameters senders and targets. If set, they restrict the recording of data to only synapses that fulfill the given criteria.

>>> wr = nest.Create('weight_recorder')
>>> nest.CopyModel("stdp_synapse", "stdp_synapse_rec", {"weight_recorder": wr})

>>> pre = nest.Create("iaf_psc_alpha", 10)
>>> post = nest.Create("iaf_psc_alpha", 10)

>>> nest.Connect(pre, post, syn_spec="stdp_synapse_rec")

Recording time window

The time span during which the recorder actively records can be specified using the properties start and stop. These define the recording period of the device in ms. An additional property origin allows to shift the recording window by a certain time, which can be useful in experimental protocols with repeated simulations. Please note that events with timestamp t = start are not recorded.

Data handling

All recorded data is handed over to the recording backend, selected via the record_to property. More details on available backends and their properties can be found in the guide to recording from simulations.

Recorder properties

label

A string (default: “”) specifying an arbitrary textual label for the device. Recording backends might use the label to generate device specific identifiers like filenames and such.

n_events

The number of events that were collected by the recorder can be read out of the n_events entry. The number of events can be reset to 0. Other values cannot be set.

origin

A positive floating point number (default : 0.0) used as the reference time in ms for start and stop.

record_to

A string (default: “memory”) containing the name of the recording backend where to write data to. An empty string turns all recording of individual events off.

start

A positive floating point number (default: 0.0) specifying the activation time in ms, relative to origin.

stop

A floating point number (default: infinity) specifying the deactivation time in ms, relative to origin. The value of stop must be greater than or equal to start.

See also

Device, Recorder