nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Composing NodeCollections with spatial metadata

Open ackurth opened this issue 3 years ago • 8 comments

Is your feature request related to a problem? Please describe. In our work (@jasperalbers), we want to compose multiple non-overlapping NodeCollections that have spatial metadata, i.e. they are distributed in 2D space and 'tile' it. Each 'tile-collection' has a specific neuroscientific meaning and a particular shape, therefore they are generated independently in the same physical space. To establish - among others - connections that do not discriminate different tiles but are isotropic in space we want to define one large NodeCollection containing all 'tile-collections'. Adding the NodeCollections naively is not possible. Converting the NodeCollections to lists removes all spatial metadata.

Describe the solution you'd like We would like to be able to compose non-overlapping NodeCollections with spatial locations.

Describe alternatives you've considered One can loop over the 'tile-collections' to connect them with each other. This necessitates many loops and does not seem to be a 'pythonic' solution. We assume that the resulting large number of connect calls ( ~ 5000 in our case) have a negative impact on the performance of the network creation. Moreover, one cannot use a connections scheme with a fixed number of synapses (e.g. 'fixed_outdegree').

ackurth avatar Mar 24 '21 15:03 ackurth

When planning the implementation for NodeCollections (then called GIDCollections) it was decided that it should not be possible to join collections containing different metadata (see this comment). Joining two NodeCollections containing spatial data is also not as straightforward as one might think, because of the underlying layer-implementation for the spatial data. However, I do think that this could be a useful feature and might be worth some effort to implement. @heplesser @stinebuu @jougs @terhorstd Do you have any thoughts on this?

hakonsbm avatar Apr 07 '21 14:04 hakonsbm

I agree that it would be useful to allow joining Node Collections with spatial metadata to support use cases as the one described above. @hakonsbm: can you give us a rough estimate of how much some effort to implement would be?

jougs avatar Apr 12 '21 17:04 jougs

@jougs Positions from spatial metadata of the two NodeCollections would have to be extracted, and a new spatial metadata object containing positions corresponding to the nodes in the joined NodeCollection would have to be created. The metadata object would then have to be assigned to the joined NodeCollection.

There is already an example of how to extract positions and create a new metadata object in the slice function, which can be used as a reference.

One complication is how we should handle composite NodeCollections. Currently, metadata in a composite NodeCollection is defined as the same (pointer equal) metadata for all primitives it contains. This would have to change if we implement joining of metadata.

hakonsbm avatar Apr 13 '21 07:04 hakonsbm

Issue automatically marked stale!

github-actions[bot] avatar Sep 03 '21 08:09 github-actions[bot]

See also the related question on the mailing list: https://www.nest-initiative.org/mailinglist/hyperkitty/list/[email protected]/thread/E2G4IJLHDB5QVYVKQJ5AKANTWHKU2K5F/

hakonsbm avatar Mar 22 '22 14:03 hakonsbm

Issue automatically marked stale!

github-actions[bot] avatar May 22 '22 08:05 github-actions[bot]

@hakonsbm Ping!

heplesser avatar Nov 25 '22 13:11 heplesser

Issue automatically marked stale!

github-actions[bot] avatar Apr 05 '23 08:04 github-actions[bot]