-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Problem:
Terminology is ambiguous and confusing around a Network
's "connections", and this extends to method names as well.
Context:
I was looking at
hnn-core/hnn_core/tests/test_network.py
Lines 1042 to 1043 in 0279e31
net.clear_connectivity() | |
assert len(net.connectivity) == 4 # 2 drives x 2 target cell types |
Network.clear_connectivity()
. I was surprised to see that this method does not completely clear the net.connectivity
data. Instead, it only removes the non-drive members of Connectivity, which in HNN parlance are called "connections". This terminology needs to be changed for the following reasons:
-
This use of "connections" to refer to only a subset of Connectivity is too confusing IMO. A new user will probably expect that a "connection" is an element in the container of
net.connectivity
, or something similar. Our existing documentation (such as at https://jonescompneurolab.github.io/textbook/content/08_using_hnn_api/modifying_local_connectivity.html ) doesn't make the term "connection" as clearly distinguished from drive, and sometimes explicitly refers to drive members of Connectivity as connections (which is the opposite use of the word as we use it elsewhere). If you try to read that example page (which is currently the main one that describes how to interact with our connections in detail), and read it from the perspective that you do not know how a connection is different from a drive, it is confusing. -
The code is inconsistent with its use:
Network.clear_connectivity
removes the cell->cell "connections", but does not remove the drives from theconnectivity
attribute. However,pick_connection
(fromnetwork.py
) DOES return values for drives, in addition to cell->cell "connections", despite being named for connections.
Solution:
It's not a good idea to introduce more differences between drives vs. cell->cell connections in the code just for naming purposes. Instead, I think we should keep the net.connectivity
data attribute itself mostly unchanged, but change our documentation and some functions names that interact with it to be more clear. Some options to use, instead of using "connection" to refer to cell->cell members of net.connectivity
and "drive" to refer to drive->cell members of net.connectivity
:
cell_cell_con
vsdrive_cell_con
internal_connection
vsexternal_drive
synapse
vsdrive
(even though they're both actually "synapses" ...which is similar to how they're both "connections"...)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status