Skip to content

Commit 96b9734

Browse files
authored
Merge pull request #18 from SWIFTSIM/fix_bug_in_compare_runs_at_different_z
Fix the bug in comparing runs with the same names at different z
2 parents b214d29 + c3a169e commit 96b9734

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

swift-pipeline

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ if __name__ == "__main__":
178178
else:
179179
# First, check if the snapshots are all at the same redshift
180180
redshifts = {data.metadata.redshift for data in snapshots}
181-
if len(redshifts) == len(snapshots):
182-
# All different redshifts!
181+
# If the size of the set is one, then all redshifts are the same
182+
if len(redshifts) == 1:
183+
# All redshifts are the same! No need to modify runs' names
183184
run_names = [data.metadata.run_name for data in snapshots]
185+
# If the size of the set > 1, then at least two runs have different redshifts
184186
else:
185187
# Need to append appropriate redshifts to names.
186188
run_names = [

0 commit comments

Comments
 (0)