Skip to content

Commit

Permalink
Merge pull request #24 from weiguangcui/patch-2
Browse files Browse the repository at this point in the history
Update linking.py
  • Loading branch information
romeeld committed Jun 3, 2020
2 parents 7b91653 + 445a03e commit b3bda68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions caesar/linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ def create_sublists(obj):

# assign halo sub lists
for halo in obj.halos:
halo.satellite_galaxies = []
halo.central_galaxy = -1
for galaxy in halo.galaxies:
if galaxy.central:
halo.central_galaxy = galaxy
else:
halo.satellite_galaxies.append(galaxy)
halo.central_galaxy = galaxy.GroupID
# else:
# halo.satellite_galaxies.append(galaxy)

# assign galaxy sub lists
for galaxy in obj.galaxies:
if galaxy.central and galaxy.halo is not None:
galaxy.satellites = galaxy.halo.satellite_galaxies
# galaxy.satellites = galaxy.halo.satellite_galaxies
obj.central_galaxies.append(galaxy)
elif galaxy.halo is not None:
galaxy.satellites = []
# galaxy.satellites = []
obj.satellite_galaxies.append(galaxy)
else:
if not hasattr(obj, 'unassigned_galaxies'):
Expand Down

0 comments on commit b3bda68

Please sign in to comment.