Perfect Integrate and fire with noisy adaptation or fractional noise (Richard et al 2018)

 Download zip file 
Help downloading and running models
Accession:235054
"Here we show that a purely Markovian integrate-and-fire (IF) model, with a noisy slow adaptation term, can generate interspike intervals (ISIs) that appear as having Long-range dependency (LRD). However a proper analysis shows that this is not the case asymptotically. For comparison, we also consider a new model of individual IF neuron with fractional (non-Markovian) noise. The correlations of its spike trains are studied and proven to have LRD, unlike classical IF models."
Reference:
1 . Richard A, Orio P, Tanré E (2018) An integrate-and-fire model to generate spike trains with long-range dependence Journal of Computational Neuroscience
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;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: Python;
Model Concept(s):
Implementer(s): Orio, Patricio [patricio.orio at uv.cl]; Richard, Alexandre ;
/
Codes-modeldb
README.txt
fBm.py
hurst2_solo.py
kpss.py
main.py
mainPlots.py
tests.py
                            
# -*- coding: utf-8 -*-
"""
functions to generate spikes from the fLIF model with or without adaptation variable

cf description of the model in the paper "An integrate-and-fire model to generate spike trains with long memory"
by A.Richard, P.Orio and E.Tanré

last modif: 5/09/17
"""

import numpy as np
import numpy.random as npr

def autocov(k,H):
    return 0.5*(np.absolute(k-1)**(2*H) + np.absolute(k+1)**(2*H) - 2*np.absolute(k)**(2*H))


def fracNoise(n,H):
    # generates 2^n points of a fractional noise (ie increments of fractional Brownian motion) of Hurst parameter H.
    # by Davies-Harte method 

    n=min(25,n)
    N=2**n
    C =  np.zeros([2*N])
    k = np.arange(0,N)
    C = np.concatenate((autocov(k,H),np.zeros([1]),autocov(k[:0:-1],H)),axis=0)
    EigV = np.fft.fft(C)
    EigV = EigV.real
    V1 = npr.normal(size=N)   
    V2 = npr.normal(size=N)
    V=(V1[1:N]+V2[1:N]*1j)/np.sqrt(2)
    EigV = np.sqrt(EigV)/np.sqrt(2*N)
    W =  np.concatenate((EigV[0:1]*V1[0:1],EigV[1:N]*V,EigV[N:N+1]*V2[0:1],EigV[N+1:2*N]*V[::-1].conjugate()),axis=0)  
    ZZ = np.fft.fft(W)
    Z = ZZ[0:N].real
    return Z

def fracNoiseN(N,H):
    # generates N points of a fractional noise (ie increments of fractional Brownian motion) of Hurst parameter H.
    # by Davies-Harte method 
    
    N=int(N)
    C =  np.zeros([2*N])
    k = np.arange(0,N)
    C = np.concatenate((autocov(k,H),np.zeros([1]),autocov(k[:0:-1],H)),axis=0)
    EigV = np.fft.fft(C)
    EigV = EigV.real
    V1 = npr.normal(size=N)   
    V2 = npr.normal(size=N)
    V=(V1[1:N]+V2[1:N]*1j)/np.sqrt(2)
    EigV = np.sqrt(EigV)/np.sqrt(2*N)
    W =  np.concatenate((EigV[0:1]*V1[0:1],EigV[1:N]*V,EigV[N:N+1]*V2[0:1],EigV[N+1:2*N]*V[::-1].conjugate()),axis=0)  
    ZZ = np.fft.fft(W)
    Z = ZZ[0:N].real
    return Z
    
    

Loading data, please wait...