Connecting Cells#

connect(pre, post, synapse_type)[source]#

Connect two compartments with a chemical synapse.

The pre- and postsynaptic compartments must be different compartments of the same network.

Parameters:
  • pre (View) – View of the presynaptic compartment.

  • post (View) – View of the postsynaptic compartment.

  • synapse_type (Synapse) – The synapse to append

connectivity_matrix_connect(pre_cell_view, post_cell_view, synapse_type, connectivity_matrix)[source]#

Appends multiple connections which build a custom connected network.

Connects pre- and postsynaptic cells according to a custom connectivity matrix. Entries > 0 in the matrix indicate a connection between the corresponding cells. Connections are from branch 0 location 0 to a randomly chosen branch and loc.

Parameters:
  • pre_cell_view (View) – View of the presynaptic cell.

  • post_cell_view (View) – View of the postsynaptic cell.

  • synapse_type (Synapse) – The synapse to append.

  • connectivity_matrix (ndarray[bool]) – A boolean matrix indicating the connections between cells.

fully_connect(pre_cell_view, post_cell_view, synapse_type)[source]#

Appends multiple connections which build a fully connected layer.

Connections are from branch 0 location 0 to a randomly chosen branch and loc.

Parameters:
  • pre_cell_view (View) – View of the presynaptic cell.

  • post_cell_view (View) – View of the postsynaptic cell.

  • synapse_type (Synapse) – The synapse to append.

sparse_connect(pre_cell_view, post_cell_view, synapse_type, p)[source]#

Appends multiple connections which build a sparse, randomly connected layer.

Connections are from branch 0 location 0 to a randomly chosen branch and loc.

Parameters:
  • pre_cell_view (View) – View of the presynaptic cell.

  • post_cell_view (View) – View of the postsynaptic cell.

  • synapse_type (Synapse) – The synapse to append.

  • p (float) – Probability of connection.