brian-team / brian2

Brian is a free, open source simulator for spiking neural networks.
http://briansimulator.org
Other
920 stars 218 forks source link

Manual annotations/descriptions for objects #1250

Open mstimberg opened 3 years ago

mstimberg commented 3 years ago

In the context of automatic model descriptions, it would be useful to be able to give additional descriptions/annotations to objects such as NeuronGroup. Currently, the only type of annotation you can use is name, but since this name is used inside generated code it is quite restricted (e.g. you could call a group 'l23_neurons' but not 'Layer 2/3 neurons'). In the ANNarchy simulator you can have a human-readable name + a description. We could add a description field as well, but I wonder whether we should not rather directly go for something generic like a metadata attribute which holds an arbitrary dictionary. I could imagine other things that could be useful in the future, in particular with models imported from somewhere else. For example, in some applications it could be useful to have some kind of reference/publication field (or just orcid) with a link to the publication describing the model. Or when importing a model from NeuroML, it might make sense to still keep the NeuroML code around for reference.

Of course we could also take some middle ground, e.g. name + description as direct arguments and everything else in a generic metadata dictionary.

kernfel commented 3 years ago

I guess metadata wouldn't have to be a dictionary, right? You could just leave it up to the user whether that's a string, or a dict, or anything else. Then again, would that be any different from just using add_attribute after the definition?

thesamovar commented 3 years ago

I think metadata as a dict is probably good, but we should also lay out some standard keys (title, description, publication, etc.). We could even consider supporting one of the standards for this. Isn't there a new one on reporting neural modelling?