Theory and simulation of integrate-and-fire neurons driven by shot noise (Droste & Lindner 2017)

 Download zip file 
Help downloading and running models
Accession:228604
This archive contains source code for the paper "Exact analytical results for integrate-and-fire neurons driven by excitatory shot noise" by Droste and Lindner, 2017. Specifically, it contains a Python implementation of the analytical formulas derived in that paper (allowing to calculate firing rate, CV and stationary voltage distribution of general integrate-and-fire neurons driven by excitatory shot noise, as well as power spectrum and rate-response of leaky integrate-and-fire neurons with such input) and C++ code implementing a Monte-Carlo simulation to estimate these quantities. A sample Jupyter notebook to play around with the analytics is included, as are scripts to reproduce the figures from the paper.
Reference:
1 . Droste F, Lindner B (2017) Exact analytical results for integrate-and-fire neurons driven by excitatory shot noise J. Comp. Neurosci.
Model Information (Click on a link to find other models with that property)
Model Type:
Brain Region(s)/Organism:
Cell Type(s): Abstract integrate-and-fire leaky neuron; Abstract theta neuron;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: C or C++ program; Python;
Model Concept(s):
Implementer(s): Droste, Felix [fedro at posteo.de];
import re
from param_scan import pint_ureg

def read_value_from_str(ostr, key):
    #f_re = r'([+-]?\d+(?:\.\d+)?(?:[eE][+-]\d+)?)'
    #try:
    #    v = float(re.findall("^" + key + " = " + f_re, ostr, re.MULTILINE)[0])
    #except (IndexError):
    #    raise ValueError("key '%s' not in string '%s'" % (key, ostr))
    #return v
    i0 = ostr.find(key)
    if i0 < 0:
        raise ValueError("key '%s' not found" % key)
    i1 = ostr.find("\n", i0)
    if i1 < 0:
        i1 = len(ostr)
    _, v = ostr[i0:i1].split("=")
    if pint_ureg is not None:
        return pint_ureg.parse_expression(v)
    else:
        return float(v)
    

def read_value(filename, key):
    fh = open(filename, "r")
    ostr = fh.read()
    fh.close()
    return read_value_from_str(ostr, key)

def output_contains(filename, s):
    fh = open(filename, "r")
    ostr = fh.read()
    fh.close()
    return s in ostr


Loading data, please wait...