yuanzunli / kdeLF

A Flexible Method for Estimating Luminosity Functions via Kernel Density Estimation
MIT License
0 stars 1 forks source link

kdeLF

kdeLF is an MIT licensed Python implementation of Yuan et al.’s Kernel Density Estimation (KDE) method for estimating luminosity functions. It is a wrapper to compiled fortran code that does the heavy lifting, and is therefore relatively fast. We are open to all questions, feedback, commentary, and suggestions as long as they are constructive. Discussions should always come in the form of git issues.

Documentation

Read the docs at kdelf.readthedocs.io.

Installation and test

Using pip

The recommended way to install the stable version of kdeLF is using pip:

pip install -U kdeLF

We have uploaded several .whl files to the PyPI web to support as many platforms as possible. If your platforms happens to be an exception, then the pip installation may fail. In this situation, you need to install the Intel fortran Compiler first, and then try the pip installation again. Note that the version of NumPy library should ≥ 1.21.0. If you use the latest Intel fortran Compiler, then a higher version (≥ 1.22) of NumPy is required. If you have problems installing, please open an issue at GitHub.

From source

You can also install kdeLF after a download from GitHub. Note that this requires a Intel fortran Compiler to be installed in advance.

git clone https://github.com/yuanzunli/kdeLF.git
cd kdeLF
pip install .

Test the installation

To make sure that the installation went alright, you can execute the built-in test program in kdeLF by running the following command:

python3 -m kdeLF.test_kdeLF

Citation

Please cite the following papers if you found this code useful in your research:

  1. Yuan, Z., Zhang, X., Wang, J., Cheng, X., & Wang, W. 2022, ApJS, 260, 10 (arXiv, ADS, BibTeX).
  2. Yuan, Z., Jarvis, M. J., & Wang, J. 2020, ApJS, 248, 1 (arXiv, ADS, BibTeX).