Currently, the convention is to name a ConnectionSet after the ConnectionStrategy. If there are multiple cell types involved, and the ConnectionStrategy does not give a specific tag to name the set, a {base}_{pre_ct_name}_to_{post_ct_name} convention is used, where base is the conn strat name.
If we want to have a predictable link between a connection strategy and the connection sets it will produce, an optional output_naming attribute to the base ConnectionStrategy. The options are:
Not specified: The default convention is used, base = conn strat name
A single string: A different base is used
A list of strings: Treat each item in the list as a base, and merge all output names.
A double map is given from to to:
Every from-to pair that appears in the map is overridden by the key.
Each value can also be an array, specifying that multiple from-to sets for the same cell types will be produced
Each value can be null, specifying that this pair of cells will not produce any output connections
Combinations that don't appear follow the default convention
Combinations that don't exist raise ConfigurationError
Calls to strategy.connect_cells with a tag= kwarg that isn't corroborated by the output naming is rejected.
A new function get_output_names will be added to the base strategy class
A component can override it
Will be called with the cell type pair, to get its output name:
If an array is returned, tag must be specified.
if a single value is returned tag is optional, and when given must match the value exactly.
When called without arguments must return all possible output names
When cell types are input that aren't part of the connection strategy, it should ValueError.
When a null value is encountered it should return None
Examples
SIngle cell convention
wow:
strategy: my_very_wow_strategy
presynaptic:
cell_types:
- A
postsynaptic:
cell_types:
- C
would allow the following connection set tags: wow.
Setting output_naming: different would yield different. Setting output_naming: [x, y] would yield [x, y]
Default convention
wow:
strategy: my_very_wow_strategy
presynaptic:
cell_types:
- A
- B
postsynaptic:
cell_types:
- C
- D
would allow the following connection set tags: wow_A_to_C, wow_A_to_D, wow_B_to_C, wow_B_to_D.
Setting output_naming: different changes each occurence of wow in the above tags to different. Setting output_naming: [x, y] would yield 8 labels, 4 with x_* and 4 with y_*.
Others
wow:
strategy: my_very_wow_strategy
presynaptic:
cell_types:
- A
- B
postsynaptic:
cell_types:
- C
- D
- E
output:
- A:
- C: wow_A_to_C
- D: A_to_D
- B:
- C: ["B_to_C:type_1", "B_to_C:type_2", "anomalies"]
- D: null
would allow the following connection set tags: wow_A_to_C, wow_A_to_D, wow_A_to_E (implicitly), B_to_C:type_1, B_to_C:type_2, anomalies, (B to D is disabled), wow_B_to_E (implicitly)
Currently, the convention is to name a
ConnectionSet
after theConnectionStrategy
. If there are multiple cell types involved, and theConnectionStrategy
does not give a specific tag to name the set, a{base}_{pre_ct_name}_to_{post_ct_name}
convention is used, wherebase
is the conn strat name.If we want to have a predictable link between a connection strategy and the connection sets it will produce, an optional
output_naming
attribute to the baseConnectionStrategy
. The options are:base
= conn strat namebase
is usedbase
, and merge all output names.from
toto
:from-to
pair that appears in the map is overridden by the key.from-to
sets for the same cell types will be producednull
, specifying that this pair of cells will not produce any output connectionsConfigurationError
strategy.connect_cells
with atag=
kwarg that isn't corroborated by the output naming is rejected.get_output_names
will be added to the base strategy classtag
must be specified.tag
is optional, and when given must match the value exactly.ValueError
.null
value is encountered it should returnNone
Examples
SIngle cell convention
would allow the following connection set tags:
wow
.Setting
output_naming: different
would yielddifferent
. Settingoutput_naming: [x, y]
would yield[x, y]
Default convention
would allow the following connection set tags:
wow_A_to_C
,wow_A_to_D
,wow_B_to_C
,wow_B_to_D
.Setting
output_naming: different
changes each occurence ofwow
in the above tags todifferent
. Settingoutput_naming: [x, y]
would yield 8 labels, 4 withx_*
and 4 withy_*
.Others
would allow the following connection set tags:
wow_A_to_C
,wow_A_to_D
,wow_A_to_E
(implicitly),B_to_C:type_1
,B_to_C:type_2
,anomalies
, (B to D is disabled),wow_B_to_E
(implicitly)