spynnaker8.models package

Module contents

class spynnaker8.models.Projection(pre_synaptic_population, post_synaptic_population, connector, synapse_type=None, source=None, receptor_type=None, space=None, label=None)[source]

Bases: spynnaker.pyNN.models.pynn_projection_common.PyNNProjectionCommon

sPyNNaker 8 projection class

Parameters:
  • pre_synaptic_population (PopulationBase) –
  • post_synaptic_population (PopulationBase) –
  • connector (AbstractConnector) –
  • synapse_type (AbstractStaticSynapseDynamics) –
  • source (None) – Unsupported; must be None
  • receptor_type (str) –
  • space (Space) –
  • label (str) –
get(attribute_names, format, gather=True, with_address=True, multiple_synapses='last')[source]

Get a parameter for PyNN 0.8

Parameters:
  • attribute_names (str or iterable(str)) – list of attributes to gather
  • format (str) – "list" or "array"
  • gather (bool) –

    gather over all nodes

    Note

    SpiNNaker always gathers.

  • with_address (bool) – True if the source and target are to be included
  • multiple_synapses (str) – What to do with the data if format=”array” and if the multiple source-target pairs with the same values exist. Currently only “last” is supported
Returns:

values selected

getDelays(format='list', gather=True)[source]

DEPRECATED

getSynapseDynamics(parameter_name, format='list', gather=True)[source]

DEPRECATED

getWeights(format='list', gather=True)[source]

DEPRECATED

label
Return type:str
post

The post-population.

Return type:PopulationBase
pre

The pre-population.

Return type:PopulationBase
printDelays(file, format='list', gather=True)[source]

DEPRECATED

Print synaptic weights to file. In the array format, zeros are printed for non-existent connections.

printWeights(file, format='list', gather=True)[source]

DEPRECATED

save(attribute_names, file, format='list', gather=True, with_address=True)[source]

Print synaptic attributes (weights, delays, etc.) to file. In the array format, zeros are printed for non-existent connections. Values will be expressed in the standard PyNN units (i.e., millivolts, nanoamps, milliseconds, microsiemens, nanofarads, event per second).

Parameters:
  • attribute_names (str or list(str)) –
  • file (str or file) –
  • format (str) –
  • gather (bool) –

    Ignored

    Note

    SpiNNaker always gathers.

  • with_address (bool) –
saveConnections(file, gather=True, compatible_output=True)[source]

DEPRECATED

set(**attributes)[source]

NOT IMPLEMENTED

weightHistogram(min=None, max=None, nbins=10)[source]

DEPRECATED

Return a histogram of synaptic weights. If min and max are not given, the minimum and maximum weights are calculated automatically.

class spynnaker8.models.Recorder(population)[source]

Bases: spynnaker.pyNN.models.recording_common.RecordingCommon

Parameters:population (Population) – the population to record for
cache_data()[source]

Store data for later extraction

read_in_signal(segment, block, signal_array, data_indexes, view_indexes, variable, recording_start_time, sampling_interval, units, label)[source]

Reads in a data item that’s not spikes (likely v, gsyn e, gsyn i) and saves this data to the segment.

Parameters:
  • segment (Segment) – Segment to add data to
  • block (Block) – neo block
  • signal_array (ndarray) – the raw signal data
  • data_indexes (list(int)) – The indexes for the recorded data
  • view_indexes (list(int) or None) – The indexes for which data should be returned. If None all data (view_index = data_indexes)
  • variable (str) – the variable name
  • recording_start_time (float or int) – when recording started
  • sampling_interval (float or int) – how often a neuron is recorded
  • units (quantities.quantity.Quantity or str) – the units of the recorded value
  • label (str) – human readable label
read_in_spikes(segment, spikes, t, n_neurons, recording_start_time, sampling_interval, indexes, label)[source]

Converts the data into SpikeTrains and saves them to the segment.

Parameters:
  • segment (Segment) – Segment to add spikes to
  • spikes (ndarray) – Spike data in raw sPyNNaker format
  • t (int) – last simulation time
  • n_neurons (int) – total number of neurons including ones not recording
  • recording_start_time (int) – time recording started
  • sampling_interval (int) – how often a neuron is recorded
  • label (str) – recording elements label