Skip to content

FabulousFabs/Spike.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spike.jl

Build Status    |    DOCUMENTATION

This package allows simulations of spiking neural networks in Julia. Experimenting with spiking networks typically means working with many changing parts in equations (e.g., most projects will differ slightly in the models used), which can create a lot of unnecessary overhead in (re-)implementing models.

Spike.jl addresses this issue by providing extreme flexibility in model specification by utilising a Brian2-inspired meta-programming approach that allows models to be specified through expressions, whereupon Spike.jl will handle everything else behind the scenes.

How do I get it?

Currently, you will have to clone the repository and build it yourself.

] add https://github.com/FabulousFabs/Spike.jl.git

How do I use it?

Here's a very simple "Hello World!" example of creating a model in Spike.jl:

using Spike;
using Plots;

# enable magic model creation
cast_magic();

# create random spikers
spikers = NeuronGroup(N = 10,
                      eq = :(v_t = rand(N);),
                      method = euler,
                      events = Dict(:spike => (:(v .> 0.95), :(v = v_r;))),
                      parameters = Dict(:v => zeros(10),
                                        :v_r => zeros(10)));

# monitor events
monitor = EventMonitor(obj = spikers, event = :spike);

# run a magic simulation
run(; T = 1.0, dt = 1e-3);

# plot
scatter(monitor.t, monitor.i, markershape = :vline)

For more information, please see the examples and documentation.

About

Create flexible spiking neural network models in Julia.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages