mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2025-04-17 21:00:54 +00:00
Simplify
This commit is contained in:
parent
c70d0479c6
commit
f267885833
1 changed files with 4 additions and 5 deletions
|
@ -116,11 +116,10 @@ def prepare_swift(snapshot_path, temporary_output_path):
|
|||
h = src["Cosmology"].attrs["h"][0]
|
||||
npart = src["Header"].attrs["NumPart_Total"][1]
|
||||
|
||||
mpart = src["Header"].attrs["InitialMassTable"][1] * 1e10 # Msun
|
||||
mpart *= h # Msun / h
|
||||
|
||||
boxsize = src["Header"].attrs["BoxSize"][0] # Mpc
|
||||
boxsize *= h # Mpc / h
|
||||
# Convert to Msun / h
|
||||
mpart = src["Header"].attrs["InitialMassTable"][1] * 1e10 * h
|
||||
# Convert to Mpc / h
|
||||
boxsize = src["Header"].attrs["BoxSize"][0] * h
|
||||
|
||||
print(f"{'Boxsize':<20}: {boxsize}")
|
||||
print(f"{'Npart':<20}: {npart}")
|
||||
|
|
Loading…
Add table
Reference in a new issue