mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 22:18:01 +00:00
Update dumping
This commit is contained in:
parent
f135a69b40
commit
8f3220bff7
1 changed files with 5 additions and 5 deletions
|
@ -75,14 +75,14 @@ def extract_positions(nsim, paths, kind):
|
||||||
fpath = paths.observer_peculiar_velocity("PCS", 512, nsim)
|
fpath = paths.observer_peculiar_velocity("PCS", 512, nsim)
|
||||||
vpec_observer = numpy.load(fpath)["observer_vp"][0, :]
|
vpec_observer = numpy.load(fpath)["observer_vp"][0, :]
|
||||||
cat = csiborgtools.read.CSiBORGHaloCatalogue(
|
cat = csiborgtools.read.CSiBORGHaloCatalogue(
|
||||||
nsim, paths, load_fitted=True, load_initial=False,
|
nsim, paths, bounds={"dist": (0, 155.5)}, load_fitted=True,
|
||||||
observer_velocity=vpec_observer)
|
load_initial=False, observer_velocity=vpec_observer, )
|
||||||
|
|
||||||
if kind == "halos":
|
if kind == "halos":
|
||||||
return cat.position()
|
return cat.position() - 677.7 / 2
|
||||||
|
|
||||||
if kind == "halos_rsp":
|
if kind == "halos_rsp":
|
||||||
return cat.redshift_space_position()
|
return cat.redshift_space_position() - 677.7 / 2
|
||||||
|
|
||||||
raise ValueError(f"Unknown kind `{kind}`. Allowed values are: "
|
raise ValueError(f"Unknown kind `{kind}`. Allowed values are: "
|
||||||
"`particles`, `particles_rsp`, `halos`, `halos_rsp`.")
|
"`particles`, `particles_rsp`, `halos`, `halos_rsp`.")
|
||||||
|
@ -113,4 +113,4 @@ if __name__ == "__main__":
|
||||||
def _main(nsim):
|
def _main(nsim):
|
||||||
main(nsim, paths, args.kind)
|
main(nsim, paths, args.kind)
|
||||||
|
|
||||||
work_delegation(main, nsims, MPI.COMM_WORLD)
|
work_delegation(_main, nsims, MPI.COMM_WORLD)
|
||||||
|
|
Loading…
Reference in a new issue