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_spike_buffers

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

Type:

bool

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

growth_curves

The list of the available structural plasticity growth curves.

read only

Type:

list[str]

growth_factor_buffer_spike_data

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

Type:

float

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

ll_api = <module 'nest.ll_api' from '/home/docs/checkouts/readthedocs.org/user_builds/nest-test/checkouts/separate-api/pynest/nest/ll_api.py'>
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_spike_data

Maximal size of MPI buffers for communication of spikes, defaults to 8388608.

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, defaults to 0.001.

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-test/checkouts/separate-api/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

set_communicator()

Set global communicator for NEST.

Parameters:

comm (MPI.Comm from mpi4py) –

Raises:

_kernel.NESTError

sort_connections_by_source

Whether to sort connections by their source; increases construction time of presynaptic data structures, decreases simulation time if the average number of outgoing connections per neuron is smaller than the total number of threads, defaults to True.

Type:

bool

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.0.

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, defaults to 1000.0.

Type:

float

tics_per_step

The number of tics per simulation time step, defaults to 100.

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; requires nest.sort_connections_by_source = True, defaults to True.

Type:

bool

use_wfr

Whether to use waveform relaxation method, defaults to True.

Type:

bool

visualization = <module 'nest.visualization' from '/home/docs/checkouts/readthedocs.org/user_builds/nest-test/checkouts/separate-api/pynest/nest/visualization.py'>
voltage_trace = <module 'nest.voltage_trace' from '/home/docs/checkouts/readthedocs.org/user_builds/nest-test/checkouts/separate-api/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