Changeset 29083 in project


Ignore:
Timestamp:
06/13/13 04:58:21 (8 years ago)
Author:
Ivan Raikov
Message:

nemo: fixes to Golgi netstim protocol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/nemo/trunk/examples/Golgi/Golgi_DeSouza10.nemo

    r29082 r29083  
    16331633vec_sizes = (prelength+mainlength)/dt + 1       // recorded traces are all this size
    16341634
     1635strdef logfn
     1636objref ns, iklog, inalog, icalog, ica2log, Vlog, tlog, logfile
     1637
    16351638objref stim_rates // input stimulus rates
    1636 stim_rates = new Vector (5)
     1639
     1640nrates = 5
     1641stim_rates = new Vector (nrates)
    16371642stim_rates.x[0] = 1
    16381643stim_rates.x[1] = 20
     
    16411646stim_rates.x[4] = 200
    16421647
    1643 for i=0, stim_rates.size()-1 {
    1644 
    1645   objref ns
     1648for (k=0; k < nrates; k = k + 1) {
     1649
    16461650  ns = new NetStim()
    16471651  ns.start    = 1000
    16481652  ns.number   = 100000
    16491653  ns.noise    = 1
    1650   ns.interval = (1 / stim_rates.x[i]) * 1000
     1654  ns.interval = (1 / stim_rates.x[k]) * 1000
    16511655
    16521656  goc.nclist.append (new NetCon(ns,goc.syn[0],-20,1,0.1))
     
    16541658  goc.nclist.append (new NetCon(ns,goc.syn[2],-20,15,0.1))
    16551659
    1656   objref  iklog
    16571660  iklog = new Vector(vec_sizes)
    16581661  iklog.record (&goc.soma.ik(0.5))
    16591662
    1660   objref  inalog
    16611663  inalog = new Vector(vec_sizes)
    16621664  inalog.record (&goc.soma.ina(0.5))
    16631665
    1664   objref  icalog
    16651666  icalog = new Vector(vec_sizes)
    16661667  icalog.record (&goc.soma.ica(0.5))
    16671668
    1668   objref  ica2log
    16691669  ica2log = new Vector(vec_sizes)
    16701670  ica2log.record (&goc.soma.ica2(0.5))
    16711671
    1672   objref  Vlog
    16731672  Vlog = new Vector(vec_sizes)
    16741673  Vlog.record (&goc.soma.v(0.5))
    16751674
    1676   objref tlog
    16771675  tlog = new Vector(vec_sizes,0)
    16781676  tlog.record (&t)
    16791677
    1680   objref logfile
     1678  sprint (logfn, "Golgi_netstim_protocol_%d_Hz.dat", stim_rates.x[k] )
     1679
    16811680  logfile = new File()
    1682   logfile.wopen ( sprintf ("Golgi_netstim_protocol_%d_Hz.dat", input_rates.x[i] ) )
     1681  logfile.wopen ( logfn )
    16831682
    16841683  simulate(logfile,tlog,Vlog,iklog,inalog,icalog,ica2log)
     
    17571756vec_sizes = (prelength+mainlength)/dt + 1       // recorded traces are all this size
    17581757
     1758strdef logfn
     1759objref ns, iklog, inalog, icalog, ica2log, Vlog, tlog, logfile
     1760
    17591761objref stim_rates // input stimulus rates
    1760 stim_rates = new Vector (5)
     1762
     1763nrates = 5
     1764stim_rates = new Vector (nrates)
    17611765stim_rates.x[0] = 1
    17621766stim_rates.x[1] = 20
     
    17651769stim_rates.x[4] = 200
    17661770
    1767 for i=0, stim_rates.size()-1 {
    1768 
    1769    objref ns
     1771for (k=0; k < nrates; k = k + 1) {
     1772
    17701773   ns = new NetStim()
    17711774   ns.start    = 1000
    17721775   ns.number   = 1000000
    17731776   ns.noise    = 1
    1774    ns.interval = (1 / stim_rates.x[i]) * 1000
     1777   ns.interval = (1 / stim_rates.x[k]) * 1000
    17751778   ns.seed (1)
    17761779
     
    17791782   goc.nclist.append (new NetCon(ns,goc.syn[2],-20,15,0.1))
    17801783
    1781    objref  iklog
    17821784   iklog = new Vector(vec_sizes)
    17831785   iklog.record (&goc.soma.ik(0.5))
    17841786
    1785    objref  inalog
    17861787   inalog = new Vector(vec_sizes)
    17871788   inalog.record (&goc.soma.ina(0.5))
    17881789
    1789    objref  icalog
    17901790   icalog = new Vector(vec_sizes)
    17911791   icalog.record (&goc.soma.ica(0.5))
    17921792
    1793    objref  ica2log
    17941793   ica2log = new Vector(vec_sizes)
    17951794   ica2log.record (&goc.soma.ica2(0.5))
    17961795
    1797    objref  Vlog
    17981796   Vlog = new Vector(vec_sizes)
    17991797   Vlog.record (&goc.soma.v(0.5))
    18001798
    1801    objref tlog
    18021799   tlog = new Vector(vec_sizes,0)
    18031800   tlog.record (&t)
    18041801
    1805    objref logfile
     1802   sprint (logfn, "Golgi_reduced_netstim_protocol_%d_Hz.dat", stim_rates.x[k])
     1803
    18061804   logfile = new File()
    1807    logfile.wopen ( sprintf ("Golgi_reduced_netstim_protocol_%d_Hz.dat", stim_rates.x[i]) )
     1805   logfile.wopen ( logfn )
    18081806
    18091807   simulate(logfile,tlog,Vlog,iklog,inalog,icalog,ica2log)
Note: See TracChangeset for help on using the changeset viewer.