csiborgtools/notebooks/fits.ipynb
2023-05-14 12:48:24 +01:00

4 MiB

In [1]:
import sys
import numpy as np
import matplotlib.pyplot as plt

sys.path.append("../")
import csiborgtools

%matplotlib widget 
%load_ext autoreload
%autoreload 2
In [2]:
paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)
nsim0 = 7444
nsimx = 7444 + 24
nsnap0 = max(paths.get_snapshots(nsim0))
nsnapx = max(paths.get_snapshots(nsimx))
overlapper  = csiborgtools.match.ParticleOverlap()
In [3]:
halo0_archive = np.load(paths.split_path(nsnap0, nsim0))
halox_archive = np.load(paths.split_path(nsnapx, nsimx))
In [13]:
# delta_bckg = overlapper.make_bckg_delta(halo0_archive, verbose=True)
# delta_bckg = overlapper.make_bckg_delta(halox_archive, delta=delta_bckg, verbose=True)
# np.save("./bckg_{}_{}.npy".format(nsim0, nsimx), delta_bckg)
100%|██████████| 204873/204873 [16:48<00:00, 203.15it/s]
100%|██████████| 204960/204960 [16:42<00:00, 204.55it/s]
In [ ]: