diff --git a/hnn_core/network.py b/hnn_core/network.py index 61f7327cb..7fe292c8c 100644 --- a/hnn_core/network.py +++ b/hnn_core/network.py @@ -1100,11 +1100,13 @@ def add_connection(self, src_gids, target_gids, loc, receptor, # Probabilistically define connections if probability != 1.0: - self.connection_probability(conn, probability) + self._connection_probability(conn, probability) + + conn['probability'] = probability self.connectivity.append(deepcopy(conn)) - def connection_probability(self, conn, probability): + def _connection_probability(self, conn, probability): """Remove/keep a random subset of connections. Parameters @@ -1154,8 +1156,6 @@ def connection_probability(self, conn, probability): for src_gid in remove_srcs: conn['gid_pairs'].pop(src_gid) - conn['probability'] = probability - def clear_connectivity(self): """Remove all connections defined in Network.connectivity_list""" self.connectivity = list()