GithubHelp home page GithubHelp logo

ppppps / brainpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brainpy/brainpy

0.0 0.0 0.0 11.87 MB

A general platform for computational neuroscience and brain-inspired computation

Home Page: https://brainpy.readthedocs.io/

License: GNU General Public License v3.0

Python 100.00%

brainpy's Introduction

Logo

LICENSE Documentation Conda PyPI version Build Status

Why to use BrainPy

BrainPy is an integrative framework for computational neuroscience and brain-inspired computation. Three core functions are provided in BrainPy:

  • General numerical solvers for ODEs and SDEs (support for DDEs and FDEs will come soon).
  • Neurodynamics simulation tools for brain objects, such like neurons, synapses and networks (support for soma and dendrites will come soon).
  • Neurodynamics analysis tools for differential equations, including phase plane analysis and bifurcation analysis (support for continuation analysis and sensitive analysis will come soon).

Moreover, BrainPy is designed to effectively satisfy your basic requirements:

  • Easy to learn and use, because BrainPy is only based on Python language and has little dependency requirements;
  • Highly flexible and transparent, because BrainPy endows the users with the fully data/logic flow control;
  • Simulation can be guided with the analysis, because the same code in BrainPy can not only be used for simulation, but also for dynamics analysis;
  • Efficient running speed, because BrainPy is compatible with the latest JIT compilers or any other accelerating framework you prefer (below we list the speed comparison based on Numba JIT).

Speed Comparison

BrainPy is a backend-independent neural simulator. Users can define models with any backend they prefer. Intrinsically, BrainPy supports the array/tensor-oriented backends such like NumPy, PyTorch, and TensorFlow, it also supports the JIT compilers such as Numba on CPU or CUDA devices. Extending BrainPy to support other backend frameworks you prefer is very easy. The details please see documents coming soon.

Installation

BrainPy is based on Python (>=3.7), and the following packages are required to be installed to use BrainPy:

  • NumPy >= 1.13
  • Matplotlib >= 3.3

Install BrainPy by using pip:

> pip install -U brainpy-simulator

Install BrainPy by using conda:

> conda install brainpy-simulator -c brainpy

Install BrainPy from source:

> pip install git+https://github.com/PKU-NIP-Lab/BrainPy
> # or
> pip install git+https://git.openi.org.cn/OpenI/BrainPy
> # or
> pip install -e git://github.com/PKU-NIP-Lab/[email protected]

Let's start

Here list several simple examples for neurodynamics simulation and analysis. Comprehensive examples and tutorials please see BrainModels.

The Hodgkin–Huxley neuron model.

The AMPA synapse model.

Implementation of the paper: Wang, Xiao-Jing, and György Buzsáki. “Gamma oscillation by synaptic inhibition in a hippocampal interneuronal network model.” Journal of neuroscience 16.20 (1996): 6402-6413.

Implementation of the paper: Van Vreeswijk, Carl, and Haim Sompolinsky. “Chaos in neuronal networks with balanced excitatory and inhibitory activity.” Science 274.5293 (1996): 1724-1726.

Implementation of the paper: Si Wu, Kosuke Hamaguchi, and Shun-ichi Amari. "Dynamics and computation of continuous attractors." Neural computation 20.4 (2008): 994-1025.

Phase plane analysis of the INa,p+-IK model, where "input" is 50., and "Vn_half" is -45..

Codimension 1 bifurcation analysis of FitzHugh Nagumo model, in which "a" is equal to 0.7, and "Iext" is varied in [0., 1.].

Codimension 2 bifurcation analysis of FitzHugh Nagumo model, in which "a" is varied in [0.5, 1.0], and "Iext" is varied in [0., 1.].

brainpy's People

Contributors

chaoming0625 avatar yqianjiang avatar adaliubc avatar charlielam0615 avatar terrypang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.