From: Mathieu D. <mat...@li...> - 2009-04-27 10:45:48
|
Hi Dejan, Thanks for the answer. > >> Hello PCSIMers, >> >> Sorry to bother you again but I was wondering why ConnectionsProjection >> doesn't inherit from SimObjectPopulation? >> >> I ask the question because I often want to create recorders for a whole >> ConnectionsProjection (for instance to record the psr). With a >> SimObjectPopulation, it's easy: the record method is here for that. But >> AFAIK there is no equivalent method in ConnectionsProjection. So I often >> have to create a population from a ConnectionsProjection with something >> like syn_popul = SimObjectPopulation( proj.idVector() ). >> >> > The is not any strong reason why ConnectionsProjection does not > inherit from SimObjectPopulation. There is a difference in the > behavior of ConnectionsProjection in distributed modes of simulation > that does not conform to the definition of the SimObjectPopulation, > like for example, it's possible to specify collectIDs = false, > in the ConnectionsProjection which saves memory by not storing > the ids of the synapses. Also in some distributed construction algorithms, > a ConnectionsProjection instance on one MPI node stores the IDs of the > synapses > that are located on the particular node, whereas a SimObjectPopulation > in distributed > mode is expected to hold the all IDs of SimObjects over all nodes. > Nevertheless, in spite of these differences which can be explicitly > pointed out in the documentation > in order to avoid confusion and reconciled with error messages in the > interface if the IDs are not present > in the projection, it should be in principle possible to make > ConnectionsProjection inherit from SimObjectPopulation, > and we have considered it. It's not done since other things had higher > priority. > For recording variables from synapses I also create a > SimObjectPopulation from the ID vector of synapses. > It's possible that the interface is extended with this feature in the > future. > OK. I'll continue to use the SimObjectPopulation trick (I have probably borrowed it from an example :). I'll be happy to test this feature in a future release. >> Also why ConnectionsProjection doesn't store information about the >> source and destination populations? Therefore we could write something >> like proj.getSourcePopulation (which again could be useful in my case). >> >> > This is also a possibility that is not yet implemented. Usually in a > script when you create a ConnectionsProjection, > you can keep the python references to both source and dest. populations > that you can use afterwards, therefore we > didn't consider it important or necessary to add it so far. > However, I have noted this, and we will consider to change this in the > future. > OK. One reason for that is that I have written some simple functions to get some properties of the network. For instance a function to list which neurons (identified by their local indexes in the population) are connected by a ConnectionsProjection (see attachment). As the ConnectionsProjection itself doesn't store information about the populations it connects I have to pass those populations as arguments. As an aside this could probably be done via NeuroML but I have never used it. > Thank you for your suggestions. > I have seen a "Feature Request" on the SourceForge page. Would that help if I submit those suggestions here? Best regards, Mathieu |