Skip to content

Commit

Permalink
Update arepo_catalog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tberlok committed Mar 1, 2024
1 parent d32d38e commit 2a0fa9f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions paicos/readers/arepo_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ def load_all_data(self):
assert False

# read group data
for ikey in file["Group"].keys():
self.Group[ikey][skip_gr:skip_gr + ng] = file["Group/" + ikey]
if ng > 0:
for ikey in file["Group"].keys():
self.Group[ikey][skip_gr:skip_gr + ng] = file["Group/" + ikey]

# read subhalo data
for ikey in file["Subhalo"].keys():
self.Sub[ikey][skip_sub:skip_sub + ns] = file["Subhalo/" + ikey]
if ns > 0:
for ikey in file["Subhalo"].keys():
self.Sub[ikey][skip_sub:skip_sub + ns] = file["Subhalo/" + ikey]

skip_gr += ng
skip_sub += ns
Expand Down

0 comments on commit 2a0fa9f

Please sign in to comment.