nest-simulator
nest-simulator copied to clipboard
Composing NodeCollections with spatial metadata
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'
).
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?
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 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.
Issue automatically marked stale!
See also the related question on the mailing list: https://www.nest-initiative.org/mailinglist/hyperkitty/list/[email protected]/thread/E2G4IJLHDB5QVYVKQJ5AKANTWHKU2K5F/
Issue automatically marked stale!
@hakonsbm Ping!
Issue automatically marked stale!