Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ntolley authored and jasmainak committed May 19, 2021
1 parent f2ed3de commit 43e97d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hnn_core/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 43e97d6

Please sign in to comment.