Skip to content

FabrizioMusacchio/neural_dynamics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Release GPLv3 License GitHub last commit GitHub Issues Open GitHub Issues Closed GitHub Issues or Pull Requests GitHub code size in bytes Overview article Zenodo Archive

Neural Dynamics: A collection of educational Python scripts

img

What is neural dynamics?

Neural dynamics studies how the activity of neurons and neural networks evolves over time. It focuses on the mathematical and computational description of spiking behavior, membrane potentials, oscillations, synchronization, attractor states, and learning through synaptic plasticity. Typical approaches include differential-equation-based neuron models, spiking neural networks, and dynamical-systems analysis. Neural dynamics forms a central part of computational neuroscience, providing theoretical tools to understand how neural circuits generate computation, memory, and behavior.

Purpose of this collection

This repository provides a collection of educational Python scripts that explore core concepts in neural dynamics. The focus is on interpretable models and simulations such as integrate-and-fire neurons, spiking neural networks, and plasticity rules. The goal is to offer concise, well-documented examples that support learning, experimentation, and theoretical exploration, rather than large-scale machine-learning frameworks. The scripts are intended for everyone who want to build intuition for dynamical processes in neural systems and reproduce classic results from theoretical neuroscience.

Each script in this repository is accompanied by a detailed blog post that explains the underlying concepts, mathematical formulations, and implementation details. The blog posts provide context and guidance to help you to understand the significance of each simulation and how it relates to broader topics in computational neuroscience.

Contents

All referenced Python scripts listed below can be found in the tutorials/ directory of this repository.

NEST Simulator tutorials

This is a collection of tutorials showing how to use the NEST Simulator. Each tutorial is usually based on the corresponding original tutorial from the NEST Simulator documentation, but modified and expanded to include more explanations and additional examples.

General computational neuroscience scripts

The following scripts are not based on the NEST Simulator, but rather implement models and simulations from scratch using standard Python libraries such as NumPy and Matplotlib (but not limited to them).

Installation

For reproducibility:

conda create -n nest -y python=3.11 mamba
conda activate nest
mamba install -y ipykernel matplotlib numpy pandas nest-simulator

Usage

Each script can be run directly using the Python environment described above. In particular, they are written in such a way, that they can be interactively executed cell-by-cell, e.g., in VS Code's interactive window. You can also place them in a Jupyter notebook for step-by-step execution.

License

This repository is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.

Citation

If you use code from this repository for your own research, teaching material, or derived software, please consider citing the Zenodo archive associated with this repository. Proper citation helps acknowledge the original source, provides context for the implemented physical models and numerical assumptions, and supports reproducibility.

When appropriate, citing the specific blog post that discusses the underlying concepts and numerical methods in detail is encouraged in addition to the repository itself.

If you use substantial parts of the code in an academic publication, a reference to both the repository and the associated blog article is recommended.

Here is the suggested citation format for the repository:

@software{musacchio_neural_dynamics_2026,
  author       = {Musacchio, Fabrizio},
  title        = {Neural Dynamics: A collection of educational Python scripts},
  year         = {2026},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.18449732},
  url          = {https://doi.org/10.5281/zenodo.18449732}
}

Thank you for considering proper citation practices.

Contact and support

For questions or suggestions, please open an issue on GitHub or contact the author via email: Fabrizio Musacchio