csiborgtools/notebooks/match_observation/harry_clusters.ipynb
Richard Stiskalek 779f2e76ac
Calculate upglade redshifts (#128)
* Update redshift reading

* Add helio to CMB redshift

* Update imports

* Update nb

* Run for Quijote

* Add script

* Update

* Update .gitignore

* Update imports

* Add Peery estimator

* Add bulk flow scripts

* Update typs

* Add comment

* Add blank space

* Update submission script

* Update description

* Add barriers

* Update nb

* Update nb

* Rename script

* Move to old

* Update imports

* Add nb

* Update script

* Fix catalogue key

* Update script

* Update submit

* Update comment

* Update .gitignore

* Update nb

* Update for stationary obsrevers

* Update submission

* Add nb

* Add better verbose control

* Update nb

* Update submit

* Update nb

* Add SN errors

* Add draft of the script

* Update verbosity flags

* Add submission script

* Debug script

* Quickfix

* Remove comment

* Update nb

* Update submission

* Update nb

* Processed UPGLADE
2024-06-20 14:33:00 +01:00

12 KiB

In [1]:
import sys
import numpy as np
import matplotlib.pyplot as plt
import joblib
import scienceplots
sys.path.append("../")
import csiborgtools

plt.style.use(["science", "notebook"])
%matplotlib widget
%load_ext autoreload
%autoreload 2
In [2]:
d = np.load("/mnt/extraspace/rstiskalek/csiborg/split/clumps_07444_00951.npz")
In [12]:
%timeit d["232"]
772 µs ± 4.01 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
In [ ]:

In [2]:
paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)
# cat = csiborgtools.read.ClumpsCatalogue(7444, paths)
In [3]:
paths.knn_path(7444, "auto", "la")
Out[3]:
'/mnt/extraspace/rstiskalek/csiborg/knn/auto/knncdf_07444_la.npz'
In [8]:
np.savez("test.npz", a=np.random.rand(510, 510, 510), b=np.random.rand(510, 510, 510))
In [15]:
d = np.load("test.npz")
In [16]:
d.files
Out[16]:
['a', 'b']
In [7]:
d.files
Out[7]:
['a', 'b']
In [ ]:

In [26]:
np.save("test.npy", np.array([]))
In [27]:
np.load("test.npy")
Out[27]:
array([], dtype=float64)
In [ ]:

In [ ]:

In [21]:
# paths.split_path(123, 7444, 952)
Out[21]:
'/mnt/extraspace/rstiskalek/csiborg/split/ic_00952/out_07444_123.npz'
In [4]:
nsim = 7444
nsnap = max(paths.get_snapshots(7444))
reader = csiborgtools.read.ParticleReader(paths)
In [14]:
# clumpind = reader.read_clumps(nsnap, nsim, cols="index")["index"]
In [ ]:

In [ ]:

In [17]:
parts = np.load("/mnt/extraspace/rstiskalek/csiborg/initmatch/clump_7468_particles.npy", allow_pickle=True)
In [ ]:

In [ ]: