Skip to content

Commit

Permalink
fix another bug in unit conversion. convert string to float before op…
Browse files Browse the repository at this point in the history
…erating
  • Loading branch information
mtremmel committed Dec 19, 2024
1 parent b2a9c26 commit 15121a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tangos/tools/changa_bh_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _generate_halolinks(self, pairs):
l_split = l.split()
#convert time to Gyr and account for negative times
#(for "fake" mergers but we'd still want them if the BHs actually make it to the database)
t = float(np.abs(l_split[6]))*gyr_ratio
t = np.abs(float(l_split[6]))*gyr_ratio
bh_dest_id = int(l_split[0])
bh_src_id = int(l_split[1])
ratio = float(l_split[4])
Expand Down

0 comments on commit 15121a7

Please sign in to comment.