mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-05-12 13:41:13 +00:00
Fix reading varysmall (#103)
* Fix paths * Add new chains options * Remove old imports
This commit is contained in:
parent
b4a29aea85
commit
78443e30b5
4 changed files with 22 additions and 15 deletions
|
@ -319,6 +319,9 @@ class CSiBORG2Reader(BaseReader):
|
|||
raise ValueError(f"Unknown kind `{kind}`.")
|
||||
self.base_dir = f"/mnt/extraspace/rstiskalek/csiborg2_{kind}"
|
||||
|
||||
if kind == "varysmall":
|
||||
self.nsim = f"16417_{str(self.nsim).zfill(3)}"
|
||||
|
||||
if which_snapshot == "initial":
|
||||
self.nsnap = 0
|
||||
elif which_snapshot == "final":
|
||||
|
@ -327,19 +330,19 @@ class CSiBORG2Reader(BaseReader):
|
|||
raise ValueError(f"Unknown snapshot option `{which_snapshot}`.")
|
||||
|
||||
self.source_dir = join(
|
||||
self.base_dir, f"chain_{nsim}", "output",
|
||||
self.base_dir, f"chain_{self.nsim}", "output",
|
||||
f"snapshot_{str(self.nsnap).zfill(3)}_full.hdf5")
|
||||
if which_snapshot == "initial":
|
||||
self.source_dir = self.source_dir.replace("_full.hdf5", ".hdf5")
|
||||
|
||||
self.output_dir = join(self.base_dir, f"chain_{nsim}", "output")
|
||||
self.output_dir = join(self.base_dir, f"chain_{self.nsim}", "output")
|
||||
self.output_snap = join(
|
||||
self.output_dir,
|
||||
f"snapshot_{str(self.nsnap).zfill(3)}_sorted.hdf5")
|
||||
self.output_cat = None
|
||||
|
||||
self.offset_path = join(
|
||||
self.base_dir, f"chain_{nsim}", "output",
|
||||
self.base_dir, f"chain_{self.nsim}", "output",
|
||||
f"fof_subhalo_tab_{str(self.nsnap).zfill(3)}_full.hdf5")
|
||||
|
||||
def read_info(self):
|
||||
|
|
|
@ -15,9 +15,13 @@
|
|||
from os import system
|
||||
|
||||
if __name__ == "__main__":
|
||||
chains = [15717, 15817, 15917, 16017, 16117, 16217, 16317, 16417, 16517,
|
||||
16617, 16717, 16817, 16917, 17017, 17117, 17217, 17317, 17417]
|
||||
simname = "csiborg2_main"
|
||||
# chains = [15717, 15817, 15917, 16017, 16117, 16217, 16317, 16417, 16517,
|
||||
# 16617, 16717, 16817, 16917, 17017, 17117, 17217, 17317, 17417]
|
||||
# simname = "csiborg2_main"
|
||||
# mode = 1
|
||||
|
||||
chains = [1] + [25 + n * 25 for n in range(19)]
|
||||
simname = "csiborg2_varysmall"
|
||||
mode = 1
|
||||
|
||||
# chains = [7444 + n * 24 for n in range(1, 101)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue