Hello,
Looking at the documentation, I understand that the output of SelectNodesByMask() is a NodeCollection, and the 'layer' input parameters of DumpLayerConnections() is also a NodeCollection. Hence, I understand that I can combine these two parameters, but when I do it (see code below) I receive the error: nest.lib.hl_api_exceptions.LayerExpected: LayerExpected in SLI function DumpLayerConnections_os_g_g_l
Am I missing something?
Thanks a lot in advance!
Xavier --------
import nest
# Layers creation
pos = nest.spatial.grid(shape = [100,100] )
input_l = nest.Create('iaf_psc_alpha', positions=pos) layer_0 = nest.Create('iaf_psc_alpha', positions=pos)
conn_neur = {'rule':'pairwise_bernoulli', 'mask': {'grid':{'shape':[10,10]}} } syn_0 = {'synapse_model': 'static_synapse'}
nest.Connect(input_l, layer_0, conn_neur, syn_0)
# GetNodesByMask
mask_specs = {'lower_left':[-0.25,-0.25], 'upper_right':[0.25,0.25]} mask_obj = nest.CreateMask(masktype='rectangular', specs=mask_specs, anchor=[0.0,0.0]) center_neur = nest.SelectNodesByMask(layer_0,[0.0,0.0],mask_obj) nest.DumpLayerConnections(input_l,center_neur, 'static_synapse', 'conn.txt')