Connecting Cells
connect(pre, post, synapse_type)
¶
Connect two compartments with a chemical synapse.
The pre- and postsynaptic compartments must be different compartments of the same network.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pre |
CompartmentView
|
View of the presynaptic compartment. |
required |
post |
CompartmentView
|
View of the postsynaptic compartment. |
required |
synapse_type |
Synapse
|
The synapse to append |
required |
Source code in jaxley/connect.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
connectivity_matrix_connect(pre_cell_view, post_cell_view, synapse_type, connectivity_matrix)
¶
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:
Name | Type | Description | Default |
---|---|---|---|
pre_cell_view |
CellView
|
View of the presynaptic cell. |
required |
post_cell_view |
CellView
|
View of the postsynaptic cell. |
required |
synapse_type |
Synapse
|
The synapse to append. |
required |
connectivity_matrix |
ndarray[bool]
|
A boolean matrix indicating the connections between cells. |
required |
Source code in jaxley/connect.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
fully_connect(pre_cell_view, post_cell_view, synapse_type)
¶
Appends multiple connections which build a fully connected layer.
Connections are from branch 0 location 0 to a randomly chosen branch and loc.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pre_cell_view |
CellView
|
View of the presynaptic cell. |
required |
post_cell_view |
CellView
|
View of the postsynaptic cell. |
required |
synapse_type |
Synapse
|
The synapse to append. |
required |
Source code in jaxley/connect.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
get_pre_post_inds(pre_cell_view, post_cell_view)
¶
Get the unique cell indices of the pre- and postsynaptic cells.
Source code in jaxley/connect.py
9 10 11 12 13 14 15 |
|
is_same_network(pre, post)
¶
Check if views are from the same network.
Source code in jaxley/connect.py
26 27 28 29 30 |
|
pre_comp_not_equal_post_comp(pre, post)
¶
Check if pre and post compartments are different.
Source code in jaxley/connect.py
18 19 20 21 22 23 |
|
sample_comp(cell_view, cell_idx, num=1, replace=True)
¶
Sample a compartment from a cell.
Returns View with shape (num, num_cols).
Source code in jaxley/connect.py
33 34 35 36 37 38 39 40 |
|
sparse_connect(pre_cell_view, post_cell_view, synapse_type, p)
¶
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:
Name | Type | Description | Default |
---|---|---|---|
pre_cell_view |
CellView
|
View of the presynaptic cell. |
required |
post_cell_view |
CellView
|
View of the postsynaptic cell. |
required |
synapse_type |
Synapse
|
The synapse to append. |
required |
p |
float
|
Probability of connection. |
required |
Source code in jaxley/connect.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|