Mesoscopic dynamics from AdEx recurrent networks (Zerlaut et al JCNS 2018)

 Download zip file 
Help downloading and running models
We present a mean-field model of networks of Adaptive Exponential (AdEx) integrate-and-fire neurons, with conductance-based synaptic interactions. We study a network of regular-spiking (RS) excitatory neurons and fast-spiking (FS) inhibitory neurons. We use a Master Equation formalism, together with a semi-analytic approach to the transfer function of AdEx neurons to describe the average dynamics of the coupled populations. We compare the predictions of this mean-field model to simulated networks of RS-FS cells, first at the level of the spontaneous activity of the network, which is well predicted by the analytical description. Second, we investigate the response of the network to time-varying external input, and show that the mean-field model predicts the response time course of the population. Finally, to model VSDi signals, we consider a one-dimensional ring model made of interconnected RS-FS mean-field units.
1 . Zerlaut Y, Chemla S, Chavane F, Destexhe A (2018) Modeling mesoscopic cortical dynamics using a mean-field model of conductance-based networks of adaptive exponential integrate-and-fire neurons. J Comput Neurosci 44:45-61 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s): Abstract integrate-and-fire adaptive exponential (AdEx) neuron;
Gap Junctions:
Simulation Environment: Brian 2; Python;
Model Concept(s): Vision;
import matplotlib.pylab as plt
from matplotlib.backends.backend_pdf import PdfPages
import numpy as np
import string, datetime

import svgutils.compose as sg # SVG
import fpdf # PDF
from PIL import Image # BITMAP (png, jpg, ...)

def put_list_of_figs_to_svg_fig(FIGS, CAP_SIZE=14,\
                                fig_name="fig.svg", visualize=True,\
                                transparent=True, correc_factor=70.):
    """ take a list of figures and make a multi panel plot"""
    label = list(string.ascii_uppercase)[:len(FIGS)]

    SIZE = []
    for fig in FIGS:
    width = np.max([s[0] for s in SIZE])
    height = np.max([s[1] for s in SIZE])

    LABELS, XCOORD, YCOORD = [], [], []
    # saving as svg
    for i in range(len(FIGS)):
        ff = 'f.svg'
        FIGS[i].savefig('/tmp/'+str(i)+'.svg', format='svg',

    PANELS = []
    for i in range(len(FIGS)):
            sg.Text(LABELS[i], 25, 20, size=12, weight='bold').move(\
    sg.Figure(str(.3*3.*width)+"cm", str(.3*height*int(len(FIGS)/3))+"cm",\

    if visualize:
        _ = True

def put_list_of_figs_to_multipage_pdf(FIGS,
    adapted from:
    # Create the PdfPages object to which we will save the pages:
    # The with statement makes sure that the PdfPages object is closed properly at
    # the end of the block, even if an Exception occurs.
    with PdfPages(pdf_name) as pdf:
        for fig in FIGS:
            pdf.savefig(fig)  # saves the current figure into a pdf page

        # We can also set the file's metadata via the PdfPages object:
        d = pdf.infodict()
        d['Title'] = pdf_title
        d['Author'] = u'Y. Zerlaut'
        # d['Keywords'] = 'PdfPages multipage keywords author title subject'
        d['CreationDate'] = datetime.datetime(2009, 11, 13)
        d['ModDate'] =

def concatenate_pngs(PNG_LIST, ordering='vertically', figname='fig.png'):
    images = map(, PNG_LIST)
    widths, heights = zip(*(i.size for i in images))

    if ordering=='vertically':
        total_height = sum(heights)
        max_width = max(widths)
        new_im ='RGB', (max_width, total_height))
        y_offset = 0
        for fig in PNG_LIST:
            im =
            new_im.paste(im, (0, y_offset))
            y_offset += im.size[1]

if __name__=='__main__':

    from my_graph import *
    fig1, _ = plt.subplots(figsize=(2,2))
    add_errorbar(plt.gca(), [0], [1], [.2])
    fig2, _ = plt.subplots(figsize=(2,2))
    add_errorbar(plt.gca(), [0], [1], [.2])
    put_list_of_figs_to_multipage_pdf([fig1, fig2])

Loading data, please wait...