AllenInstitute/bmtk

How to target specific nodes in add_edges function ?

MargauxCalice opened this issue · 1 comments

Is it possible, when using the add_edges function, to specify the node ids (in source and target) on which we want to apply the the connection rule ?

Because when we only specify the target and source by the node characteristics (name, excitatory/inhibitory type, etc.) it automatically uses brute force (test all combinaisons between all the source nodes and the target nodes) even if we want to only use the connection rule for a subset of these target nodes and/or these source nodes.

You can try using this syntax to specify specific node id's:

net.add_edges(
    source={'node_id': [12,13]}, target={'pop_name': 'Scnn1a'},
    connection_rule=6,
    syn_weight=5e-05,
    weight_function='gaussianLL',
    weight_sigma=50.0,
    distance_range=[30.0, 150.0],
    target_sections=['basal', 'apical'],
    delay=2.0,
    dynamics_params='AMPA_ExcToExc.json',
    model_template='exp2syn'
)