csiborgtools/notebooks/test_mmain.ipynb
Richard Stiskalek fdb0df8d4c
Add mmain and other major updates (#44)
* Move paths to a separate file

* Add mmain reader

* Add a verbosity flag

* Fix imports

* Fix bug

* Rename files

* Return ultimate parents

* Add script to generate mmain

* Remove mmain path

* edit path

* Add mmain path

* Change function name

* Rename function

* Turn off verbose

* Fix list requirement

* Edit init match paths

* Fix init pathing

* Edit paths docs

* Edit dumpdir name

* Rename path

* Fix split paths

* Remove unused import

* Add comment

* Update readme

* remove read mmain

* Rename haloatalogue

* Fix minor bugs

* Update nbs

* Add create directory option

* Move split jobs

* Move spliot jobs

* Remove splitting

* Add import

* Edit script

* Deeper split folder

* Fix paths bug

* Rename catalogue

* Rename Catalogue

* Add new clumpread

* Edit paths

* add knn paths

* Update commenting

* Update imports

* Add more conversions

* Update temp file

* Add a note

* Add catalogue

* Cooment

* Update TODO

* Update script

* add nb

* Update

* pep8

* edit paths & pep8

* Fix knn auto paths

* add paths docs

* Add auto and cross knn paths

* Add new paths

* Simplify tpcf reading

* pep8 patch

* update readme

* Update progress

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* pep8

* Pep 8 and restructure

* add lambda spin

* add clump and halo

* add checks

* Edit halo profile fit

* Update gitignore

* backup script
2023-04-18 11:02:36 +02:00

6 KiB

In [1]:
import numpy as np
%matplotlib notebook
import matplotlib.pyplot as plt
# import fortranfile as ff
from os import listdir

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

import galomatch

%load_ext autoreload
%autoreload 2

from copy import copy
In [2]:
simpath = galomatch.io.get_sim_path(9844)
In [3]:
arr = galomatch.io.read_clumps(1016, simpath)
galomatch.io.convert_mass_cols(arr, "mass_cl")
galomatch.io.convert_position_cols(arr, ["peak_x", "peak_y", "peak_z"])
In [12]:
arr["peak_x"]
Out[12]:
array([298.56982526, 330.92112924, 322.92393181, ..., 671.12820648,
       340.09090577, 354.01700821])
In [20]:
plt.figure()
# plt.scatter(arr["peak_x"], arr["peak_y"], s=0.00001)

plt.hist(np.log10(arr["mass_cl"]), bins="auto")

plt.show()
No description has been provided for this image
In [ ]:

In [ ]: