Recording Conductances using Vector Record

The basics of how to develop, test, and use models.
Post Reply
bscoventry

Recording Conductances using Vector Record

Post by bscoventry »

Hi all,

I am currently using Rudolph and Destexhe's Ornstein-Uhlenbeck noise process in my model(from ModelDB). I would like to record the excitatory and inhibitory conductances so that I can plot a sample path plot.

Looking at the .mod file, it appears the g_e and g_i are range variables. However, when I try to plot or record them, I get the following error: "f1 is not a public member of ICcell." Is there a way I can access it using the .hoc file to record?

Code is included below:

Code: Select all

proc init() {
    ndend = 0                    //Architecture for creating multicompartment models in the future
    create soma
    nclist = new List()          //Used for cell communication
    /* GEOMETRY & BIOPHYSICS*/
    Soma {
... lots of declarations here...
endtemplate ICcell

/*Creation of Network Cells */
nICcells = 2                       //Change to create larger/smaller network
objectvar ICcellnet[nICcells]
for i = 0, nICcells - 1 {
    ICcellnet[i] = new ICcell()
}

/*Insert Point Processes */

objectvar hold[nICcells]
for j = 0, nICcells-1 ICcellnet[j].soma {
  hold[j] = new IClamp(0.5)
  hold[j].del = 0
  hold[j].dur = 1000
  hold[j].amp = 0
}

Loadnetworknoise()
ge = ouge.scanvar()
gi = ougi.scanvar()
stde = ouse.scanvar()
stdi = ousi.scanvar()
taue = oute.scanvar()
taui = outi.scanvar()

objectvar f1[nICcells]
for k = 0, nICcells-1 ICcellnet[k].soma {
  f1[k] = new Gfluct2(0.5)
  f1[k].g_e0 = ge
  f1[k].std_e = stde
  f1[k].g_i0 = gi
  f1[k].std_i = stdi
  f1[k].tau_e = taue
  f1[k].tau_i = taui
}
trans = 00
Dt = 0.02
npoints = 50000
dt = 0.02
tstart = trans
tstop = trans + Dt*npoints
v_init=vin
celsius=34 
steps_per_ms = 1/Dt
      
g[1] = new Graph()                 //Create and set graph parameters
g[1].size(tstart,tstop,-120,40)
g[1].addvar("ICcellnet[0].soma.v(.5)",1,0)
graphList[0].append(g[1])
g[3] = new Graph()
g[3].size(tstart,tstop,-120,40)
g[3].addvar("ICcellnet[0].f1[0].g_e(.5)",1,0)
graphList[0].append(g[3])
ted
Site Admin
Posts: 6302
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Recording Conductances using Vector Record

Post by ted »

The provided code excerpt is insufficient. If the template that defines the cell class is 10-20 lines long, please post it in your reply. Otherwise, email it to me
ted dot carnevale at yale dot edu
and I'll be glad to give you whatever suggestions I can. Also please tell me the accession number of the ModelDB entry for the Rudolph & Destexhe model whose code you have borrowed.
ted
Site Admin
Posts: 6302
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Recording Conductances using Vector Record

Post by ted »

Got your email. The error message "f1 is not a public member of ICcell" is indeed correct. From the template that defines the ICcell class, it is clear that a member of this class has no variable called f1. Instead, f1 is an array of objrefs that is declared at the top level of the interpreter--by this statement
objectvar f1[nICcells]
Consequently each f1 is visible at the top level and you can access any instance's parameters or variables by a statement of the form
objrefname.varname
e.g.
f1.g_e
without any reference to the cell to which it is attached.
Post Reply