BlueBrain / snap

The Blue Brain Pythonic Simulation and Network Analysis Productivity layer
https://bluebrainsnap.readthedocs.io/
GNU Lesser General Public License v3.0
18 stars 10 forks source link

Node ids returned from the edge functions #105

Open tomdele opened 3 years ago

tomdele commented 3 years ago

The edge properties() can return the source and target node ids but this does not return the population of the node ids. I need to do something about that.

asanin-epfl commented 3 years ago

source_node_id and target_node_id must have node population names in their attributes, no?

tomdele commented 3 years ago

Indeed and I am using this to define : EdgePopulation.source and EdgePopulation.target

So maybe the idea is to add a SOURCE|TARGET_NODE_POPULATION field to the sonata_constant.Edge container.

tomdele commented 3 years ago

Basically this issue is :

when you return the source and target node ids from the get functions:

from bluepysnap.sonata_constants import  Edge
edge.get(edge_ids, properties=[Edge.SOURCE_NODE_ID, Edge.TARGET_NODE_ID])

You don t know the population attached to the node ids. So maybe (maybe the access to the edge.source.name is enough ?) it would be great to add the population as a member of the Edge enum and something to return this value.

I will let you judge if this is mandatory or not.