Skip to content

Commit

Permalink
Use require_group in hdf5 formatter instead of convoluted logic (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Feb 10, 2021
1 parent 8d5ba0e commit 861a15c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions bsb/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,18 +814,9 @@ def store_cell_positions(self, cells_group):
)

def store_cell_connections(self, cells_group):
if "connections" not in cells_group:
connections_group = cells_group.create_group("connections")
else:
connections_group = cells_group["connections"]
if "connection_compartments" not in cells_group:
compartments_group = cells_group.create_group("connection_compartments")
else:
compartments_group = cells_group["connection_compartments"]
if "connection_morphologies" not in cells_group:
morphologies_group = cells_group.create_group("connection_morphologies")
else:
morphologies_group = cells_group["connection_morphologies"]
connections_group = cells_group.require_group("connections")
compartments_group = cells_group.require_group("connection_compartments")
morphologies_group = cells_group.require_group("connection_morphologies")
for tag, connectome_data in self.scaffold.cell_connections_by_tag.items():
related_types = list(
filter(
Expand Down

0 comments on commit 861a15c

Please sign in to comment.