Kernel attributes (nest.NestModule)

The NEST kernel can be controlled from the PyNEST interface by getting or setting attributes on the nest module:

# set a single kernel attribute
nest.resolution = 0.1

# set multiple attributes at once
nest.set(min_delay=0.1, max_delay=2.0)

# if you have the attributes in a dictionary
params = {'min_delay': 0.1, 'max_delay': 2.0}
nest.set(**params)

Here is a list of attributes that can be get and/or set on the nest module:

class nest.NestModule(name)

A module class for the nest root module to control the dynamic generation of module level attributes such as the KernelAttributes, lazy loading some submodules and importing the public APIs of the lib submodules.

T_max

The largest representable time value.

read only

Type:

float

T_min

The smallest representable time value.

read only

Type:

float

adaptive_target_buffers

Whether MPI buffers for communication of connections resize on the fly, defaults to True.

Type:

bool

biological_time

The current simulation time (in ms).

Type:

float

buffer_size_spike_data

Total size of MPI buffer for communication of spikes, defaults to 2.

Type:

int

buffer_size_target_data

Total size of MPI buffer for communication of connections, defaults to 2.

Type:

int

connection_rules

The list of available connection rules.

read only

Type:

list[str]

data_path

A path, where all data is written to, defaults to current directory.

Type:

str

data_prefix

A common prefix for all data files.

Type:

str

dict_miss_is_error

Whether missed dictionary entries are treated as errors, defaults to True.

Type:

bool

get(*args)

Forward kernel attribute getting to GetKernelStatus().

growth_curves

The list of the available structural plasticity growth curves.

read only

Type:

list[str]

growth_factor_buffer_target_data

If MPI buffers for communication of connections resize on the fly, grow them by this factor each round, defaults to 1.5.

Type:

float

keep_source_table

Whether to keep source table after connection setup is complete, defaults to True.

Type:

bool

kernel_status

Get the complete kernel status.

read only

Type:

dict

local_num_threads

The local number of threads, defaults to 1.

Type:

int

local_spike_counter

Number of spikes fired by neurons on a given MPI rank during the most recent call to Simulate(). Only spikes from “normal” neurons are counted, not spikes generated by devices such as poisson_generator. Resets on each call to Simulate or Run..

read only

Type:

int

max_buffer_size_target_data

Maximal size of MPI buffers for communication of connections, defaults to 16777216.

Type:

int

max_delay

The maximum delay in the network, defaults to 0.1.

Type:

float

max_num_syn_models

Maximal number of synapse models supported.

read only

Type:

int

max_update_time

Longest wall-clock time measured so far for a full update step [seconds].

read only

Type:

float

min_delay

The minimum delay in the network, defaults to 0.1.

Type:

float

min_update_time

Shortest wall-clock time measured so far for a full update step [seconds].

read only

Type:

float

ms_per_tic

The number of milliseconds per tic. Calculated by ms_per_tic = 1 / tics_per_ms.

read only

Type:

float

network_size

The number of nodes in the network.

read only

Type:

int

node_models

The list of the available node (i.e., neuron or device) models.

read only

Type:

list[str]

num_connections

The number of connections in the network.

read only, local only

Type:

int

num_processes

The number of MPI processes.

read only

Type:

int

off_grid_spiking

Whether to transmit precise spike times in MPI communication.

read only

Type:

bool

overwrite_files

Whether to overwrite existing data files, defaults to False.

Type:

bool

print_time

Whether to print progress information during the simulation, defaults to False.

Type:

bool

raster_plot = <module 'nest.raster_plot' from '/home/docs/checkouts/readthedocs.org/user_builds/nest-simulator/checkouts/stable/pynest/nest/raster_plot.py'>
recording_backends

List of available backends for recording devices.

read only

Type:

list[str]

recv_buffer_size_secondary_events

Size of MPI recv buffers for communicating secondary events (in bytes, per MPI rank, for developers).

read only

Type:

int

resolution

The resolution of the simulation (in ms), defaults to 0.1.

Type:

float

rng_seed

Seed value used as base for seeding NEST random number generators (\(1 \leq s\leq 2^{32}-1\)), defaults to 143202461.

Type:

int

rng_type

Name of random number generator type used by NEST, defaults to mt19937_64.

Type:

str

rng_types

List of available random number generator types.

read only

Type:

list[str]

send_buffer_size_secondary_events

Size of MPI send buffers for communicating secondary events (in bytes, per MPI rank, for developers).

read only

Type:

int

property server

Wrap lazy loaded property.

set(**kwargs)

Forward kernel attribute setting to SetKernelStatus().

spike_buffer_grow_extra

When spike exchange buffer needs to be expanded, resize to (1 + spike_buffer_grow_extra) * required_buffer_size, defaults to 0.5.

Type:

float

spike_buffer_resize_log

Information on spike buffer resizing as a dictionary. It contains the times of the resizings (simulation clock in steps, always multiple of min_delay), global_max_spikes_sent, that is, the observed spike number that triggered the resize, and the new_buffer_size. Sizes are for the section addressing one rank..

read only

Type:

dict

spike_buffer_shrink_limit

If the largest number of spikes sent from any rank to any rank is less than spike_buffer_shrink_limit * buffer_size, then reduce buffer size. spike_buffer_shrink_limit == 0 means that buffers never shrink. See spike_buffer_shrink_factor for how much buffer shrinks, defaults to 0.0.

Type:

float

spike_buffer_shrink_spare

When the buffer needs to shrink, set the new size to (1 + spike_buffer_shrink_spare) * required_buffer_size. See spike_buffer_shrink_limit for when buffers shrink, defaults to 0.1.

Type:

float

stimulation_backends

List of available backends for stimulation devices.

read only

Type:

list[str]

structural_plasticity_synapses

Defines all synapses which are plastic for the structural plasticity algorithm. Each entry in the dictionary is composed of a synapse model, the presynaptic element and the postsynaptic element.

Type:

dict

structural_plasticity_update_interval

Defines the time interval in ms at which the structural plasticity manager will make changes in the structure of the network ( creation and deletion of plastic synapses), defaults to 10000.

Type:

int

synapse_models

The list of the available synapse models.

read only

Type:

list[str]

tics_per_ms

The number of tics per millisecond. Change of tics_per_ms requires simultaneous specification of resolution, defaults to 1000.0.

Type:

float

tics_per_step

The number of tics per simulation time step. Calculated as tics_per_step = resolution * tics_per_ms.

read only

Type:

int

to_do

The number of steps yet to be simulated.

read only

Type:

int

total_num_virtual_procs

The total number of virtual processes, defaults to 1.

Type:

int

update_time_limit

Maximum wall-clock time for one full update step [seconds]. This can be used to terminate simulations that slow down significantly. Simulations may still get stuck if the slowdown occurs within a single update step, defaults to inf.

Type:

float

use_compressed_spikes

Whether to use spike compression; if a neuron has targets on multiple threads of a process, this switch makes sure that only a single packet is sent to the process instead of one packet per target thread; it implies that connections are sorted by source., defaults to True.

Type:

bool

use_wfr

Whether to use waveform relaxation method, defaults to True.

Type:

bool

userdict = {}

The variable userdict allows users to store custom data with the NEST kernel.

Example: nest.userdict[“nodes”] = [1,2,3,4]

visualization = <module 'nest.visualization' from '/home/docs/checkouts/readthedocs.org/user_builds/nest-simulator/checkouts/stable/pynest/nest/visualization.py'>
voltage_trace = <module 'nest.voltage_trace' from '/home/docs/checkouts/readthedocs.org/user_builds/nest-simulator/checkouts/stable/pynest/nest/voltage_trace.py'>
wfr_comm_interval

Desired waveform relaxation communication interval, defaults to 1.0.

Type:

float

wfr_interpolation_order

Interpolation order of polynomial used in wfr iterations, defaults to 3.

Type:

int

wfr_max_iterations

Maximal number of iterations used for waveform relaxation, defaults to 15.

Type:

int

wfr_tol

Convergence tolerance of waveform relaxation method, defaults to 0.0001.

Type:

float