//============================================================================== // // Simulation of recurrent networks of simple IAF neurons // (placed on a regular lattice, randomly connected) // Based on example 7 from tutorial by M. Rudolph // Advanced Course in Computational Neuroscience // Obidos, Portugal, 2004 // //============================================================================== //------------------- general simulation settings------------------------ dt = 0.025 tstart = 0 tstop = 100 // -------------------procedures for adding graphs------------------------- load_file("addGraphs.hoc") //----------------------------creating cells---------------------------------- load_file("createCells.hoc") //---------------------------creating network---------------------------------- load_file("createNetwork.hoc") //---------------------------adding network input------------------------------- load_file("addNetworkInput.hoc") // -------------------------- initialization----------------------------------- proc init() { finitialize() fcurrent() } //---------------------------access origin of network--------------------------- access neuron[0].soma //--------------------------------adding graphs--------------------------------- addgraph("neuron[0].IAF.M", -2, 3) addgraph("neuron[1].IAF.M", -2, 3) //modify step() procedure from stdrun.hoc proc step() { local i for i=1, nstep_steprun { advance() } Plot() // to allow ShapePlots for network activity for i=0, NumberCells-1 { neuron[i].soma.v(0.5) = neuron[i].IAF.M } } //---------------------------creating rasterplot------------------------------- //load_file("record.hoc") //---------------------------running simulation------------------------------- proc go() { init() run() //plotraster() }