-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multisynaptic conns #846
base: development
Are you sure you want to change the base?
Multisynaptic conns #846
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great job! added some suggestions.
If ``synsPerConn`` == 1, and a list of ``loc``s is specified, synapses (one per presynaptic cell) will be placed in locations randomly selected from the list (note that the random section and location will go hand in hand, i.e. the same random index is used for both). | ||
|
||
.. The above only applies for a single target section, ``sec``. If a list of target sections is specified, the ``loc`` value has no effect, and synapses will be distributed uniformly along the specified section(s), taking into account the length of each section. To enforce using always the first location from the list set ``cfg.connRandomSecFromList = False``. | ||
In these multisynapse scenarios, additional parameters become available - see :ref:`Multisynapse connections<multisynapse_conn>` for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be "additional combinations" or "additional options" ? or maybe I'm missing what are the new parameters available...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was referring to connRandomSecFromList and distributeSynsUniformly. Previously, they were briefly mentioned in this paragraph, but not described exhaustively, which I though might lead to confusions, so I moved it to that separate detailed section.
Maybe use "additional combinations and parameters"?
|
||
|
||
* **synMech** (optional) - Label (or list of labels) of target synaptic mechanism(s) on the postsynaptic neuron (e.g. ``'AMPA'`` or ``['AMPA', 'NMDA']``) | ||
|
||
If omitted, employs first synaptic mechanism in the cell's synaptic mechanisms list. | ||
|
||
If you have a list, a separate connection is created to each synMech; and a list of weights, delays and/or locs can be provided. | ||
When using a list of synaptic mechanisms, a separate connection is created for each mechanism. You can optionally provide corresponding lists of weights, delays, and/or locations. See :ref:`Multisynapse connections<multisynapse_conn>` for more details. | ||
|
||
* **synsPerConn** (optional) - Number of individual synaptic connections (*synapses*) per cell-to-cell connection (*connection*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for clarity maybe add somewhere?: (Note: a cell-to-cell connection can include multiple individual synaptic connections or synaptic contacts, e.g., a presynaptic cell axon can branch and form multiple synaptic contacts at different locations of the postsynaptic cell dendrite)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I think it fits well just here in the description of synMech, even without "Note:":)
Alternatively, maybe put it in the beginning fo that separate section with detailed description, to become:
"By default, there is only one synapse created per cell-to-cell connection. However, the connection can include multiple individual synaptic connections or synaptic contacts, e.g., a presynaptic cell axon can branch and form multiple synaptic contacts at different locations of the postsynaptic cell dendrite. This can be achieved by setting synsPerConn
to a value greater than 1, or by defining synMech
as a list, or both."
@@ -409,11 +406,10 @@ Each item of the ``connParams`` ordered dictionary consists of a key and value. | |||
|
|||
The weights, delays and/or locs for each synapse can be specified as a list, or a single value can be used for all. | |||
|
|||
When ``synsPerConn`` > 1 and a single section is specified, the locations of synapses can be specified as a list in ``loc``. | |||
When ``synsPerConn`` > 1 and a *single section* is specified, the locations of synapses can be specified as a list in ``loc``. If a *list of target sections* is specified, ``loc`` should be omitted, and synapses will be distributed uniformly along the specified section(s), taking into account the length of each section. See :ref:`Multisynapse connections<multisynapse_conn>` for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I guess there is no way of providing a fixed location (eg 0.5) for a list of sections eg. synsePerConn=3; secs=[soma, dend1, dend2]; loc=0.5 ?
Not sure this case is required or useful, just double checking. Of course, would require that synsPerConn = len(secs), so might be confusing if it's not the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, passing loc as single value is not possible (in previous version this value was silently ignored, and now exception is raised to attract user's attention). But one can use a workaround by having loc value repeated: loc = [0.5] * 3
This also requires settingdistributeSynsUniformly
to False though (otherwise, loc is not allowed at all). This is described in the extended section.
|
||
When ``synsPerConn`` > 1, if ``loc`` is a single value or omitted, or if a list of target sections is specified, synapses will be distributed uniformly along the specified section(s), taking into account the length of each section. | ||
If you have a list of ``synMechs``, you can have single ``synsPerConn`` value for all, or a list of values, one per synaptic mechanism in the list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be useful to add a specific example similar to the one used for 'loc' above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have exactly this example in the extended session.
Here I can put a 'condensed' version to not distract with extra details:
netParams.connParams['...'] = {
'synMech': ['AMPA', 'GABA'],
'synsPerConn': [2, 1],
# ...
# per each cell-to-cell connections, 2 AMPA synapses and 1 GABA synapse will be created
# This will create 2 synapses: one with weight 0.1, delay 0.1, and loc 0.5 | ||
# and another with weight 0.2, delay 0.1, and loc 1.0. | ||
|
||
When ``synsPerConn`` > 1 and a *single* section is specified, all synapses will be created there, and the locations of synapses can be specified as a list in ``loc`` (one per synapse, e.g., if ``synsPerConn`` = 3: ``[0.4, 0.5, 0.7]``). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"all synapses will be created within that section, and their locations can be specified as a list in loc"
Perhaps also useful to make this and the next paragraph a subheading/subcategory of the above; eg bolding the conditions and using an indented bullet point **
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
# and another with GABA synMech and weight 0.2. Both will have the same delay of 0.1. | ||
|
||
|
||
However, for the sections, no such one-to-one correspondence to ``synMech`` elements applies. Instead, contents of ``secs`` are repeated for each synapse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Instead, the synapses or (sets of synapses) are replicated at each section specified in secs
"
Is this the case? ie. what will happen if in the example codeblock above we add ["soma", "dend"] ? Will it create a total of 4 synapses? Maybe such an example would be useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an error in my description. I meant "Instead, contents of secs
are repeated for each synMech", not "per each synapse".
There is already an example below. Yes, if you have ['AMPA', 'GABA'] and ["soma", "dend"], it will create 2 ampa synapses and 2 gaba synapses, with same locs for corresponding ampa and gaba synapses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh btw, it will be the case is synsPerConn is 2 (will also fix it in the example below). Because if synsPerConn is 1, it will just pick soma for AMPA and soma for GABA, and ignore dend in both cases.
If you want to have different sections, separate connectivity rules (``connParams`` entries) should be defined for each synaptic mechanism. | ||
|
||
* Both ``synMech`` as a list and ``synsPerConn`` > 1 | ||
If you have both a N-element list of ``synMechs`` and ``synsPerConn`` > 1, weights and delays can still be specified as a single value for all synapses, as a list of length N (each value corresponding to ``synMech`` list index), or a 2D list with outer dimension N (corresponding to ``synMechs``) and inner dimension corresponding to ``synsPerConn``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a 2D list with outer dimension N corresponding to synMechs
and inner dimension corresponding to synsPerConn
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
'distributeSynsUniformly': False, | ||
} | ||
|
||
Note that ``synsPerConn`` itself can be a list, so that each ``synMech`` can correspond to a distinct number of synapses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that, as shown in the example, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* Both ``synMech`` as a list and ``synsPerConn`` > 1 | ||
If you have both a N-element list of ``synMechs`` and ``synsPerConn`` > 1, weights and delays can still be specified as a single value for all synapses, as a list of length N (each value corresponding to ``synMech`` list index), or a 2D list with outer dimension N (corresponding to ``synMechs``) and inner dimension corresponding to ``synsPerConn``. | ||
|
||
.. image:: figs/multisyn_1.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe place the top yellow box synapse also on the right hand side of the dendrite, to avoid confusion
Note that ``synsPerConn`` itself can be a list, so that each ``synMech`` can correspond to a distinct number of synapses. | ||
|
||
* Usage with **'connList'** | ||
If, in addition, you are using **'connList'**-based connectivity (explicit list of connections between individual pre- and post-synaptic cells), then the weights, delays, locs, secs are lists that can be described by up to 3-dimensional lists. The outer dimension now corresponds to the length of ``connList`` (i.e., number of cell-to-cell connections). Then the same logic as above applies to each element of this outer list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If, in addition, you want to use 'connList'-based connectivity (explicit list of connections between individual pre- and post-synaptic cells), then weights, delays, locs, and secs can be described as lists of up to three dimensions. The outermost dimension will now correspond to the length of connList
(i.e., the number of cell-to-cell connections). The same logic described above will apply to each element of this outer list."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.