Dear Benedikt!
Depending on how you have set it up, you might be able to collect all "from" and all "to" in two NodeCollections and use these when calling GetConnections() to at least avoid having SynapseCollections with only one connection.
If you want, you can send me your code directly, not using the mailing list, and I can see if I detect a way to optimize for NEST 3. You might still have to wait for the PR though.
The connection can still be stored, yes.
The SynapseCollection is not the same as NodeCollection, it is more like a list, while the NodeCollection is like a set. But the problem with SynapseCollection is that we can call Connect with the same nodes several times, and the SynapseCollection can then
contain the same connections, and this is perfectly fine. If we call GetConnections() twice and then add them, then the new SynapseCollection will contain a double of all connections even though we have only called Connect one time, and this will be wrong.
And I don't at the moment see how we could distinguish the two cases.
Best,
Stine
Am 03.03.2020 um 09:41 schrieb Stine Brekke Vennemo <stine.brekke.vennemo@nmbu.no>:
Hi Benedikt!
How are you creating your SynapseCollections? If you call GetConnections() without any arguments, you should receive all connections and then you can call set() on them once. Then you wouldn't need to store the SynapseCollections in a list, all connections would be represented by the SynapseCollection. You can also pass individual/sliced/composite etc. NodeCollections to GetConnections to get specific connections.
Your idea about a composite SynapseCollection is interesting. It is not possible at the moment though. The problem I see is that we have to be careful about what happens if Connect is called between two calls to GetConnections, because the first SynapseCollection might then be invalid. Another problem can occur if you call GetConnections with sources as arguments and store that SynapseCollection, then call GetConnections again without any arguments and store that SynapseCollection. Your second SynapseCollection will then contain the connections of the first SynapseCollection, and a composite SynapseCollection will have too many connections. We cannot have unique connections in a SynapseCollection, because calling Connect several times with the same NodeCollections is allowed.
We don't have any more pages covering the transition from NEST 2 to 3 than the two unfortunately. But, we have tried to go through the documentation as much as possible, so that the pages are updated to fit with NEST 3. You might find this page helpful https://nest-simulator.readthedocs.io/en/latest/ref_material/pynest_apis.html, it contains a list of functions for the PyNEST interface, with descriptions of the functions, the arguments it take and what the function returns.
Best regards,Stine
_______________________________________________
Fra: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
Sendt: 2. mars 2020 22:58
Til: NEST User Mailing List
Emne: [NEST Users] Re: nest3: How to create composite of SynapseCollectionsHello Benedikt!
I will leave it to the SynapseCollection experts to answer your questions about SC-details.
But your question made me wonder if you are building your network from an explicitly specified connectome, i.e., a table with one row per connection, specifying source, target, weight and delay. In that case, our new feature to build connections directly from NumPy arrays may be useful for you (and fast). It is still under review, but you can find it at
Best regards,Hans Ekkehard
Hello everyone!
I am transitioning my Code from nest 2 to nest 3.
In nest 2 I used a list of connections and could use this list with nest.Get/SetStatus().
With nest 3 I now have a list of SynapseCollections instances, where each synapse collection contains only one connection. For node collections, there seems to be an operator to create a composite (https://nest-simulator.readthedocs.io/en/latest/guides/from_nest2_to_nest3.html#composing). For SynapseCollections, however, I was unable to use the plus operator and could not find similar documentation as in the transition guide. My current workaround is to loop over each instance the list and call Set() on each instance/synapse. What is the recommended way to create a SynapseCollections from many?
Is there somewhere more documentation covering nest 3 than the two pages covering the changes form nest 2 to 3?
Kind regards,
Benedikt S. Vogler
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org
--
Prof. Dr. Hans Ekkehard PlesserHead, Data Science Section
Faculty of Science and TechnologyNorwegian University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560
Email hans.ekkehard.plesser@nmbu.no
Home http://arken.nmbu.no/~plesser
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org