Add better diagnostics & plotting (#67)

* Add caching functions

* Add limts

* Add new mass runs

* Update .gitignore

* Edit which CDFs are loaded

* Stop saving cross hindxs

* Change dist to half precision

* New nearest path

* Add neighbour counting

* Add neighbour kwargs

* Update work in progress

* Add new counting

* Add how dist is built

* Collect dist to 1 file

* Update reading routine

* Delete Quijote files

* Remove file

* Back to float32

* Fix bugs

* Rename utils

* Remove neighbuor kwargs

* Rename file

* Fix bug

* Rename plt utils

* Change where nghb kwargs from

* line length

* Remove old notebooks

* Move survey

* Add white space

* Update TODO

* Update CDF calculation

* Update temporarily plotting

* Merge branch 'add_diagnostics' of github.com:Richard-Sti/csiborgtools into add_diagnostics

* Start adding documentation to plotting

* Remove comments

* Better code documentation

* Some work on tidal tensor

* Better plotting

* Add comment

* Remove nb

* Remove comment

* Add documentation

* Update plotting

* Update submission

* Update KL vs KS plots

* Update the plotting routine

* Update plotting

* Update plotting routines
This commit is contained in:
Richard Stiskalek 2023-06-16 14:33:27 +01:00 committed by GitHub
parent 004d9629a2
commit ccbbbd24b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1075 additions and 32121 deletions

View file

@ -19,7 +19,7 @@ import matplotlib.pyplot as plt
import numpy
import scienceplots # noqa
import utils
import plt_utils
try:
import csiborgtools
@ -40,7 +40,7 @@ def plot_knn(runname):
paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)
reader = csiborgtools.read.kNNCDFReader(paths)
with plt.style.context(utils.mplstyle):
with plt.style.context(plt_utils.mplstyle):
plt.figure()
# Quijote kNN
@ -92,9 +92,9 @@ def plot_knn(runname):
plt.ylabel(r"$P(k | V = 4 \pi r^3 / 3)$")
for ext in ["png"]:
fout = join(utils.fout, f"knn_{runname}.{ext}")
fout = join(plt_utils.fout, f"knn_{runname}.{ext}")
print("Saving to `{fout}`.".format(fout=fout))
plt.savefig(fout, dpi=utils.dpi, bbox_inches="tight")
plt.savefig(fout, dpi=plt_utils.dpi, bbox_inches="tight")
plt.close()