From: Pecevski D. <de...@ig...> - 2008-06-25 07:08:11
|
Mathieu Dubois wrote: > Hi, > > I would like to plot the networks created with pcsim (with Gnuplot.py). > > I know how to access the neurons (in fact the sub-populations created > with SpatialSimObjectPopulation) but I don't know how to access the > synapses in the network. > The neurons and synapses are treated the same in pcsim, they are both inherited from SimObject base class. If you use populations and projections to construct your model, then syn_handle = projection_handle.object(i) gives you the python handle of the synapse with index i in the projection. To access the synapses and presynaptic and postsynaptic neurons of synapses you must construct the projection by setting the arguments collectIDs and collectPairs to true in the constructor, e.g.: ---------- n_exz_syn_project = ConnectionsProjection( exz_nrn_popul, all_nrn_popul, StaticSpikingSynapse( W=Wexc, tau=5e-3, delay=1e-3 ), RandomConnections( conn_prob = ConnP ), SimpleAllToAllWiringMethod(net), collectIDs = True, collectPairs = True ) ------- > Furthermore how can I find the source and the destination of a synapse? > With pre_post_pair = projection_handle.prePostPair(i) you can get the tuple with the id-s of the presynaptic and postsynaptic neurons the synapse connects. You can access these neurons with net.object(pre_post_pair[0]) etc. cheers, Dejan > Thanks in advance, > Mathieu > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Pcsim-users mailing list > Pcs...@li... > https://lists.sourceforge.net/lists/listinfo/pcsim-users > |