Skip to content

jsuarez314/cosmicweb_bsk

Repository files navigation

Cosmic Web Classification from the beta-skeleton

The goal of this code is to reconstruct the cosmic web of Dark Matter (DM) using the galaxy's position and magnitude luminosity.

Using the HackingLSSCode code to compute the beta-skeleton (bsk) over a distribution of galaxies and using the features extracted from the bsk-graph jointly with the magnitude luminosity of the galaxies, this code evaluate the model, a Random Forest algorithm to classify the galaxies in the four enviroments of the DM cosmic web: peaks, filaments, sheets or voids.

The 01_Compute_bsk.ipynb notebook allows to compute the bsk and the bsk-features of the galaxies. This notebook needs as input a hdf5 file with the values of (x,y,z) positions of the galaxies. An example mock file are stored in ./data/example_test_mock.hdf5. This notebook creates the example_pos_mock.BSKIndex file that contains the bsk graph and the example_features.hdf5 file with the bsk-features.

Bsk

The 02_Features_Visualization.ipynb notebook allows visually to explore the correlations between the bsk-features.

The 03_Model_Evaluation.ipynb notebook evaluates our trained model computing the confusion matrix and the features importance. It is an example where we know the environment.

Evaluation of the model

The 04_Model.ipynb notebook run our trained model and compute the environments of a set of test galaxies. The script also plots the environments of the cosmic web founded.

Cosmic Web classification founded by the model

Notes

The requirements.txt file lists all Python libraries that you need to run the notebooks, they will be installed using:

pip install -r requirements.txt

Cite

Please cite our paper if you use this code in your own work:

@article{suarez2021bsk,
  title={The four cosmic tidal web elements from the $\beta$-skeleton},
  author={Su\'arez-P\'erez, John F. and Camargo, Yeimy and Li, Xiao-Dong and Forero-Romero, Jaime E.},
  journal={arXiv preprint arXiv:2108.10351},
  year={2021}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published