PyNEST API listing

Connection module

Functions for connection handling

Connect

Connect pre nodes to post nodes.

TripartiteConnect

Connect pre nodes to post nodes and a third-factor nodes.

Disconnect

Disconnect connections in a SynapseCollection, or pre neurons from post neurons.

GetConnections

Return a SynapseCollection representing the connection identifiers.

Info module

Functions to get information on NEST.

authors

Print the authors of NEST.

get_argv

Return argv as seen by NEST.

GetStatus

Return the parameter dictionaries of nodes or connections.

get_verbosity

Return verbosity level of NEST's messages.

help

Display the help page for the given object in a pager.

helpdesk

Open the NEST documentation index in a browser.

message

Print a message using message system of NEST.

SetStatus

Set parameters of nodes or connections.

set_verbosity

Change verbosity level for NEST's messages.

sysinfo

Print information on the platform on which NEST was compiled.

Models module

Functions for model handling

ConnectionRules

Return a tuple of all available connection rules, sorted by name.

CopyModel

Create a new model by copying an existing one.

GetDefaults

Return defaults of the given model or recording backend.

Models

Return a tuple of neuron, device, or synapse model names.

SetDefaults

Set defaults for the given model or recording backend.

Node module

Functions for node handling

Create

Create one or more nodes.

GetLocalNodeCollection

Get local nodes of a NodeCollection as a new NodeCollection.

GetNodes([properties, local_only])

Return all nodes with the given properties as NodeCollection.

PrintNodes

Print the node ID ranges and model names of all the nodes in the network.

Parallel computing module

Functions for parallel computing

NumProcesses

Return the overall number of MPI processes.

Rank

Return the MPI rank of the local process.

GetLocalVPs

Return iterable representing the VPs local to the MPI rank.

SetAcceptableLatency

Set the acceptable latency (in ms) for a MUSIC port.

SetMaxBuffered

Set the maximum buffer size for a MUSIC port.

SyncProcesses

Synchronize all MPI processes.

Simulation module

Functions for simulation control

Cleanup

Cleans up resources after a Run calls.

DisableStructuralPlasticity

Disable structural plasticity for the network simulation

EnableStructuralPlasticity

Enable structural plasticity for the network simulation

GetKernelStatus

Obtain parameters of the simulation kernel.

Install

Load a dynamically linked NEST module.

Prepare

Calibrate the system before a Run call.

ResetKernel

Reset the simulation kernel.

Run

Simulate the network for t milliseconds.

RunManager()

ContextManager for Run

SetKernelStatus

Set parameters for the simulation kernel.

Simulate

Simulate the network for t milliseconds.

Sonata module

Functions to build and simulate networks with the SONATA format

SonataNetwork(config[, sim_config])

Class for building and simulating networks represented by the SONATA format.

Spatial module

Functions relating to spatial properties of nodes

CreateMask(masktype, specs[, anchor])

Create a spatial mask for connections.

Displacement(from_arg, to_arg)

Get vector of lateral displacement from node(s)/Position(s) from_arg to node(s) to_arg.

Distance(from_arg, to_arg)

Get lateral distances from node(s)/position(s) from_arg to node(s) to_arg.

DumpLayerConnections(source_layer, ...)

Write connectivity information to file.

DumpLayerNodes(layer, outname)

Write node ID and position data of layer to file.

FindCenterElement(layer)

Return NodeCollection of node closest to center of layer.

FindNearestElement(layer, locations[, find_all])

Return the node(s) closest to the locations in the given layer.

GetPosition(nodes)

Return the spatial locations of nodes.

GetTargetNodes(sources, tgt_layer[, syn_model])

Obtain targets of sources in given target population.

GetSourceNodes(src_layer, targets[, syn_model])

Obtain sources of targets in given src_layer population.

GetTargetPositions(sources, tgt_layer[, ...])

Obtain positions of targets to a given NodeCollection of sources.

GetSourcePositions(src_layer, targets[, ...])

Obtain positions of sources to a given NodeCollection of targets.

PlotLayer(layer[, fig, nodecolor, nodesize])

Plot all nodes in a layer.

PlotProbabilityParameter(source[, ...])

Create a plot of the connection probability and/or mask.

PlotTargets(src_nrn, tgt_layer[, syn_type, ...])

Plot all targets of source neuron src_nrn in a target layer tgt_layer.

PlotSources(src_layer, tgt_nrn[, syn_type, ...])

Plot all sources of target neuron tgt_nrn in a source layer src_layer.

SelectNodesByMask(layer, anchor, mask_obj)

Obtain the node IDs inside a masked area of a spatially distributed population.

Types module

Classes defining the different PyNEST types

CollocatedSynapses(*args)

Class for collocated synapse specifications.

Compartments(node_collection, elements)

CreateParameter(parametertype, specs)

Create a parameter.

Mask(datum)

Class for spatial masks.

NodeCollection([data])

Class for NodeCollection.

Parameter(datum)

Class for parameters

Receptors(node_collection, elements)

serialize_data(data)

Serialize data for JSON.

SynapseCollection(data)

Class for Connections.

to_json(data, **kwargs)

Convert the object to a JSON string.

Logic module

conditional(condition, param_if_true, ...)

Yields one value or another, based on the condition.

Math module

exp(parameter)

Calculate the exponential of the parameter

sin(parameter)

Calculate the sine of the parameter

cos(parameter)

Calculate the cosine of the parameter

min(parameter, value)

Yields the smallest value of the value of a parameter and a given value

max(parameter, value)

Yields the largest value of the value of a parameter and a given value

redraw(parameter, min, max)

Redraws the value of the parameter if it is outside of the given limits

Kernel attributes (nest.NestModule)

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.

kernel_status

Get the complete kernel status.

resolution

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

biological_time

The current simulation time (in ms).

to_do

The number of steps yet to be simulated.

max_delay

The maximum delay in the network, defaults to 0.1.

min_delay

The minimum delay in the network, defaults to 0.1.

ms_per_tic

The number of milliseconds per tic.

tics_per_ms

The number of tics per millisecond.

tics_per_step

The number of tics per simulation time step.

T_max

The largest representable time value.

T_min

The smallest representable time value.

rng_types

List of available random number generator types.

rng_type

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

rng_seed

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

total_num_virtual_procs

The total number of virtual processes, defaults to 1.

local_num_threads

The local number of threads, defaults to 1.

num_processes

The number of MPI processes.

off_grid_spiking

Whether to transmit precise spike times in MPI communication.

adaptive_target_buffers

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

send_buffer_size_secondary_events

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

recv_buffer_size_secondary_events

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

buffer_size_spike_data

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

buffer_size_target_data

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

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.

max_buffer_size_target_data

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

spike_buffer_grow_extra

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

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_spare

When the buffer shrinks, set the new size to (1 + spike_buffer_shrink_spare) * required_buffer_size.

spike_buffer_resize_log

Log of spike buffer resizing as a dictionary.

use_wfr

Whether to use waveform relaxation method, defaults to True.

wfr_comm_interval

Desired waveform relaxation communication interval, defaults to 1.0.

wfr_tol

Convergence tolerance of waveform relaxation method, defaults to 0.0001.

wfr_max_iterations

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

wfr_interpolation_order

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

max_num_syn_models

Maximal number of synapse models supported.

structural_plasticity_synapses

Defines all synapses which are plastic for the structural plasticity algorithm.

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.

growth_curves

The list of the available structural plasticity growth curves.

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.

data_path

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

data_prefix

A common prefix for all data files.

overwrite_files

Whether to overwrite existing data files, defaults to False.

print_time

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

network_size

The number of nodes in the network.

num_connections

The number of connections in the network.

connection_rules

The list of available connection rules.

node_models

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

synapse_models

The list of the available synapse models.

local_spike_counter

Number of spikes fired by neurons on a given MPI rank during the most recent call to Simulate().

recording_backends

List of available backends for recording devices.

stimulation_backends

List of available backends for stimulation devices.

dict_miss_is_error

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

keep_source_table

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

min_update_time

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

max_update_time

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

update_time_limit

Maximum wall-clock time for one full update step [seconds].

eprop_update_interval

Task-specific update interval of the e-prop plasticity mechanism [ms]., defaults to 1000.0.

eprop_learning_window

Task-specific learning window of the e-prop plasticity mechanism [ms]., defaults to 1000.0.

eprop_reset_neurons_on_update

If True, reset dynamic variables of e-prop neurons upon e-prop update., defaults to True.

Random module

exponential([beta])

Draws samples from an exponential distribution.

lognormal([mean, std])

Draws samples from a log-normal distribution.

normal([mean, std])

Draws samples from a normal distribution.

uniform([min, max])

Draws samples from a uniform distribution.

uniform_int(max)

Draws integer samples from a uniform distribution.

Raster_plot module

Functions for raster plotting.

extract_events(data[, time, sel])

Extract all events within a given time interval.

from_data(data[, sel])

Plot raster plot from data array.

from_device(detec, **kwargs)

Plot raster from a spike recorder.

from_file(fname, **kwargs)

Plot raster from file.

from_file_numpy(fname, **kwargs)

Use numpy.

from_file_pandas(fname, **kwargs)

Use pandas.

Server module

app

The flask object implements a WSGI application and acts as the central object.

do_exec(args, kwargs)

set_mpi_comm(comm)

run_mpi_app([host, port])

nestify(call_name, args, kwargs)

Get the NEST API call and convert arguments if neccessary.

Spatial positions functions

grid(shape[, center, extent, edge_wrap])

Defines grid-based positions for nodes.

free(pos[, extent, edge_wrap, num_dimensions])

Defines positions for nodes based on a list of positions, or a Parameter object.

pos()

Position of node in a specific dimension.

source_pos()

Position of the source node in a specific dimension.

target_pos()

Position of the target node in a specific dimension.

Spatial distribution functions

exponential(x[, beta])

Applies an exponential distribution on a Parameter.

gaussian(x[, mean, std])

Applies a gaussian distribution on a Parameter.

gaussian2D(x, y[, mean_x, mean_y, std_x, ...])

Applies a bivariate gaussian distribution on two Parameters, representing values in the x and y direction.

gamma(x[, kappa, theta])

Applies a gamma distribution on a Parameter.

gabor(x, y[, theta, gamma, std, lam, psi])

Applies a rectified Gabor function on two Parameters, representing displacements in the x and y direction.

Visualization module

Functions to visualize a network built in NEST.

plot_network(nodes, filename[, ext_conns, ...])

Plot the given nodes and the connections that originate from them.

Voltage_trace module

Functions to plot voltage traces.

from_device(detec[, neurons, title, ...])

Plot the membrane potential of a set of neurons recorded by the given voltmeter or multimeter.

from_file(fname[, title, grayscale])

Plot voltage trace from file.