Olfactory bulb microcircuits model with dual-layer inhibition (Gilra & Bhalla 2015)

 Download zip file 
Help downloading and running models
A detailed network model of the dual-layer dendro-dendritic inhibitory microcircuits in the rat olfactory bulb comprising compartmental mitral, granule and PG cells developed by Aditya Gilra, Upinder S. Bhalla (2015). All cell morphologies and network connections are in NeuroML v1.8.0. PG and granule cell channels and synapses are also in NeuroML v1.8.0. Mitral cell channels and synapses are in native python.
1 . Gilra A, Bhalla US (2015) Bulbar microcircuit model predicts connectivity and roles of interneurons in odor coding. PLoS One 10:e0098045 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Olfactory bulb;
Cell Type(s): Olfactory bulb main mitral GLU cell; Olfactory bulb main interneuron periglomerular GABA cell; Olfactory bulb main interneuron granule MC GABA cell;
Channel(s): I A; I h; I K,Ca; I Sodium; I Calcium; I Potassium;
Gap Junctions:
Receptor(s): AMPA; NMDA; Gaba;
Transmitter(s): Gaba; Glutamate;
Simulation Environment: Python; MOOSE/PyMOOSE;
Model Concept(s): Sensory processing; Sensory coding; Markov-type model; Olfaction;
Implementer(s): Bhalla, Upinder S [bhalla at ncbs.res.in]; Gilra, Aditya [aditya_gilra -at- yahoo -period- com];
Search NeuronDB for information about:  Olfactory bulb main mitral GLU cell; Olfactory bulb main interneuron periglomerular GABA cell; Olfactory bulb main interneuron granule MC GABA cell; AMPA; NMDA; Gaba; I A; I h; I K,Ca; I Sodium; I Calcium; I Potassium; Gaba; Glutamate;
# -*- coding: utf-8 -*-

import math, os
import pickle

from pylab import *

## USAGE: python2.6 plot_morph_weights.py
## You must run fit_odor_morphs.py on the below filelist
## before calling this script, so that _param0 and _param1 files are present.


from networkConstants import * # has central_glom

seeds = [
filelist = [

coeffs = [0,0.2,0.4,0.6,0.8,1]
NUMWTS = len(coeffs[1:-1])

def constrain0to1(x):
    return math.exp(x)/(1+math.exp(x))

def get_weights(params, NUMBINS):
    #### for the weights also, we use exactly what is done by Mukund and Adil in matlab:
    #### constrain weights to be between 0 and 1
    #### sort the weights to ensure monotonicity
    inputsA = [ constrain0to1(x) for x in params[3*NUMBINS:(3*NUMBINS+NUMWTS)] ]
    inputsA.sort() # in place sort
    inputsB = [ constrain0to1(x) for x in params[(3*NUMBINS+NUMWTS):(3*NUMBINS+2*NUMWTS)] ]
    inputsB.sort(reverse=True) # weights of odor B need to be used in reverse
    return (inputsA,inputsB)

fig = figure(facecolor='none') # 'none' is transparent
## A super axes to set common x and y axes labels
bigAxes = axes(frameon=False) # hide frame
xticks([]) # don't want to see any ticks on this axis
text(-0.05,0.3,'fitted weights', fontsize=24, rotation='vertical')
text(0.4,-0.11,'real weights', fontsize=24, rotation='horizontal')

plotnum = 1
for filenum,filename in enumerate(filelist):
    for mitnum in [central_glom,central_glom+1]:
        filenamefull = '../results/odor_morphs/'+filename+'_params'+str(mitnum)
        f = open(filenamefull,'r')
        params = pickle.load(f)
        NUMBINS = len(params[:-9])/3
        inputsA,inputsB = get_weights(params,NUMBINS)
        maxerror = sqrt(sum(array([0.8,0.6,0.4,0.2])**2)/4.0) # max rms error
        ## normalized score = 1 - norm-ed rms error
        scoreA = 1 - sqrt( sum( (inputsA[1:-1]-arange(0.2,0.81,0.2))**2 )/4.0 )/maxerror
        scoreB = 1 - sqrt( sum( (inputsB[1:-1]-arange(0.8,0.19,-0.2))**2 )/4.0 )/maxerror    
        fig.add_subplot(3,4,plotnum) ### hardcoded - I know there are 5 files each with 2 mits
        plotnum += 1
        ylim(-0.01,1.01) #### very important to give it after the plot functions else autoscales
        ## or set autoscaling off - gca().set_autoscale_on(False)
        ## - taken from http://old.nabble.com/ylim-does-not-work-td19000814.html
        title( str(seeds[filenum])+' '+'mit'+str(mitnum)+'  %.2f'%scoreA + ' '+'%.2f'%scoreB, size='large')