ANNarchy 4.8.2
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • Reference
  • Core components
    • Population
    • Projection
    • Neuron
    • Synapse
    • Monitor
    • PopulationView
    • Dendrite
    • Network
  • Configuration
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
  • Simulation
    • simulate
    • simulate_until
    • step
    • parallel_run
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
  • Neuron models
    • LeakyIntegrator
    • Izhikevich
    • IF_curr_exp
    • IF_cond_exp
    • IF_curr_alpha
    • IF_cond_alpha
    • HH_cond_exp
    • EIF_cond_alpha_isfa_ista
    • EIF_cond_exp_isfa_ista
  • Synapse models
    • STP
    • STDP
    • Hebb
    • Oja
    • IBCM
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • IO
    • save
    • load
    • save_parameters
    • load_parameters
  • Utilities
    • report
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions and Constants
    • add_function
    • functions
    • Constant
    • get_constant
  • Plotting
    • raster_plot
    • histogram
    • inter_spike_interval
    • coefficient_of_variation
    • population_rate
    • smoothed_rate
  • Callbacks
    • every
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks
  • Convolution
    • Convolution
    • Pooling
    • Transpose
    • Copy
  • BOLD monitoring
    • BoldMonitor
    • BoldModel
    • balloon_RN
    • balloon_RL
    • balloon_CN
    • balloon_CL
    • balloon_maith2021
    • balloon_two_inputs
  • Tensorboard logging
    • Logger
  • ANN-to-SNN conversion
    • ANNtoSNNConverter

On this page

  • SpikeSourceArray
    • Parameters

SpikeSourceArray

inputs.SpikeSourceArray.SpikeSourceArray(
    self,
    spike_times,
    name=None,
    copied=False,
)

Spike source generating spikes at the times given in the spike_times array.

Depending on the initial array provided, the population will have one or several neurons, but the geometry can only be one-dimensional.

You can later modify the spike_times attribute of the population, but it must have the same number of neurons as the initial one.

The spike times are by default relative to the start of a simulation (ANNarchy.get_time() is 0.0). If you call the reset() method of a SpikeSourceArray, this will set the spike times relative to the current time. You can then repeat a stimulation many times.

# 2 neurons firing at 100Hz with a 1 ms delay
times = [
    [ 10, 20, 30, 40],
    [ 11, 21, 31, 41]
]
inp = ann.SpikeSourceArray(spike_times=times)

ann.compile()

# Spikes at 10/11, 20/21, etc
ann.simulate(50)

# Reset the internal time of the SpikeSourceArray
inp.reset()

# Spikes at 60/61, 70/71, etc
ann.simulate(50)

Parameters

Name Type Description Default
spike_times list[float] a list of times at which a spike should be emitted if the population should have only 1 neuron, a list of lists otherwise. Times are defined in milliseconds, and will be rounded to the closest multiple of the discretization time step dt. required
name str optional name for the population. None
TimedPoissonPopulation
HomogeneousCorrelatedSpikeTrains
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker