mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-05-21 01:51:11 +00:00
Fix PHEW empty clumps
This commit is contained in:
parent
b49d9852ff
commit
ed554cc877
2 changed files with 16 additions and 7 deletions
|
@ -327,8 +327,12 @@ def make_phew_halo_catalogue(nsim, find_ultimate_parent, verbose):
|
|||
f.close()
|
||||
|
||||
for nsnap in tqdm(snapshots, disable=not verbose, desc="Snapshot"):
|
||||
data = reader.read_phew_clumps(nsnap, nsim, find_ultimate_parent=False,
|
||||
verbose=False)
|
||||
try:
|
||||
data = reader.read_phew_clumps(
|
||||
nsnap, nsim, find_ultimate_parent=find_ultimate_parent,
|
||||
verbose=False)
|
||||
except FileExistsError:
|
||||
continue
|
||||
|
||||
with h5py.File(fname, "r+") as f:
|
||||
grp = f.create_group(str(nsnap))
|
||||
|
@ -364,7 +368,7 @@ def main(nsim, args):
|
|||
calculate_initial(nsim, args.simname, args.halofinder, True)
|
||||
|
||||
if args.make_phew:
|
||||
make_phew_halo_catalogue(nsim, True, True)
|
||||
make_phew_halo_catalogue(nsim, False, True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue