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.
Read the docs at kdelf.readthedocs.io.
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.
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 .
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
Please cite the following papers if you found this code useful in your research: