os.remove(fileTrunk + suffix) except: raise Exception('Could not create PDF Table.') # ! Simple network # ! ============== # ! This is a simple network with two layers A and B; layer B has two # ! populations, E and I. On the NEST side, we use only synapse type # ! ``static_synapse``. ConnPlotter then infers that synapses with positive # ! weights should have type ``exc``, those with negative weight type ``inh``. # ! Those two types are know to ConnPlotter. # ! Obtain layer, connection and model list from the example set s_layer, s_conn, s_model = ex.simple() # ! Create Connection Pattern representation s_cp = cpl.ConnectionPattern(s_layer, s_conn) # ! Show pattern as textual table (we cheat a little and include PDF directly) showTextTable(s_cp, 'simple_tt') # $ \centerline{\includegraphics{simple_tt.pdf}} # ! Show pattern in full detail # ! --------------------------- # ! A separate patch is shown for each pair of populations. # ! # ! - Rows represent senders, columns targets. # ! - Layer names are given to the left/above, population names to the right
import pylab as cpy import ConnPlotter as c import ConnPlotter.examples as cex sl,sc,sm=cex.simple() print sl scp=c.ConnectionPattern(sl,sc) scp.plot() cpy.show()
os.remove(fileTrunk + suffix) except: raise Exception('Could not create PDF Table.') # ! Simple network # ! ============== # ! This is a simple network with two layers A and B; layer B has two # ! populations, E and I. On the NEST side, we use only synapse type # ! ``static_synapse``. ConnPlotter then infers that synapses with positive # ! weights should have type ``exc``, those with negative weight type ``inh``. # ! Those two types are know to ConnPlotter. # ! Obtain layer, connection and model list from the example set s_layer, s_conn, s_model = ex.simple() # ! Create Connection Pattern representation # p is evaluated, in case it is a Parameter for i in range(len(s_conn)): s_conn[i][2]['p'] = eval(str(s_conn[i][2]['p'])) s_cp = cpl.ConnectionPattern(s_layer, s_conn) # ! Show pattern as textual table (we cheat a little and include PDF directly) showTextTable(s_cp, 'simple_tt') # $ \centerline{\includegraphics{simple_tt.pdf}} # ! Show pattern in full detail # ! --------------------------- # ! A separate patch is shown for each pair of populations.
import pylab as cpy import ConnPlotter as c import ConnPlotter.examples as cex sl, sc, sm = cex.simple() print sl scp = c.ConnectionPattern(sl, sc) scp.plot() cpy.show()