Skip to content

Commit

Permalink
Sorted pre_types for consistency when assigning GIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
danilobenozzo committed Jul 16, 2024
1 parent ab15f29 commit 6f9e511
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bsb_neuron/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _map_transceivers(self, simulation, simdata):
transmap = {}

pre_types = set(cs.pre_type for cs in simulation.get_connectivity_sets().values())
for pre_type in pre_types:
for pre_type in sorted(pre_types, key=lambda pre_type: pre_type.name):
data = []
for cm, cs in simulation.get_connectivity_sets().items():
if cs.pre_type != pre_type:
Expand All @@ -188,6 +188,7 @@ def _map_transceivers(self, simulation, simdata):
for cm, cs in simulation.get_connectivity_sets().items():
if cs.pre_type != pre_type:
continue

# Now look up which transmitters are on our chunks
pre_t, _ = cs.load_connections().from_(simdata.chunks).as_globals().all()
our_cm_transmitters = np.unique(pre_t[:, :2], axis=0)
Expand Down

0 comments on commit 6f9e511

Please sign in to comment.