Notes on installation:
Delight sometimes has issues with installation, a new issue that has popped up occasionally is when trying to import delight you may see an error message saying something like duplicate LC_RPATH. This may or may not be remedied by running the following command before installing Delight:
export LDSHARED ="$CC -bundle -undefined dynamic_lookup
then running
python setup.py build_ext --inplace
or pip installing Delight.
Photometric redshift via Gaussian processes with physical kernels.
Read the documentation here: http://delight.readthedocs.io
Warning: this code is still in active development and is not quite ready to be blindly applied to arbitrary photometric galaxy surveys. But this day will come.
Tests: pytest for unit tests, PEP8 for code style, coveralls for test coverage.
./paper/: journal paper describing the method
./delight/: main code (Python/Cython)
./tests/: test suite for the main code
./notebooks/: demo notebooks using delight
./data/: some useful inputs for tests/demos
./docs/: documentation
./other/: useful mathematica notebooks, etc
Python 3.5, cython, numpy, scipy, pytest, pylint, coveralls, matplotlib, astropy, mpi4py
Boris Leistedt (NYU)
David W. Hogg (NYU) (Flatiron)
Please cite [Leistedt and Hogg (2016)] (https://arxiv.org/abs/1612.00847) if you use this code your research. The BibTeX entry is:
@article{delight,
author = "Boris Leistedt and David W. Hogg",
title = "Data-driven, Interpretable Photometric Redshifts Trained on Heterogeneous and Unrepresentative Data",
journal = "The Astrophysical Journal",
volume = "838",
number = "1",
pages = "5",
url = "http://stacks.iop.org/0004-637X/838/i=1/a=5",
year = "2017",
eprint = "1612.00847",
archivePrefix = "arXiv",
primaryClass = "astro-ph.CO",
SLACcitation = "%%CITATION = ARXIV:1612.00847;%%"
}
Copyright 2016-2017 the authors. The code in this repository is released under the open-source MIT License. See the file LICENSE for more details.
This package is maintained by the LSSTDESC collaboration and the DESC-RAIL team. This project is handled under the LINCC-Framework.
The package can be installed with a single command pip:
>> pip install .
or
>> pip install -e .
Very basic tests can be run from top level of Delight package using the scripts in scripts/ as follow:
python scripts/processFilters.py tests/parametersTest.cfg
python scripts/processSEDs.py tests/parametersTest.cfg
python scripts/simulateWithSEDs.py tests/parametersTest.cfg
pytest -v tests/*.py
- install the python package
pandoceither with conda or with pip, - install sphinx packages as follow:
Under docs/ by selecting the sphinx packages specified in the requirements.txt file :
>> pip install -r requirements.txt
(In principe one should be able to install doc environnement from pyproject.toml file as follow but some sphinx packages may be missing.)
>> pip install -e .'[doc]'
Then build the sphinx doc by doing:
>> make html
And finnally open the sphinx documentation:
>> open ../_readthedocs/html/index.html
(For developpers, if you plan to modify the package, please install the pre-commit hook. Refer to the sphinx doc).
Some basic tutorials are provided in docs/notebooks:
docs/notebooks/Tutorial-getting-started-with-Delight.ipynb
docs/notebooks/Tutorial_interfaces_rail-with-Delight.ipynb
This project was automatically generated using the LINCC-Frameworks python-project-template.
A repository badge was added to show that this project uses the python-project-template, however it's up to you whether or not you'd like to display it!
For more information about the project template see the documentation.
Before installing any dependencies or writing code, it's a great idea to create a
virtual environment. LINCC-Frameworks engineers primarily use conda to manage virtual
environments. If you have conda installed locally, you can run the following to
create and activate a new environment.
>> conda create -n <env_name> python=3.10
>> conda activate <env_name>
Once you have created a new environment, you can install this project for local development using the following commands:
>> ./.setup_dev.sh
>> conda install pandoc
Notes:
./.setup_dev.shwill initialize pre-commit for this local repository, so that a set of tests will be run prior to completing a local commit. For more information, see the Python Project Template documentation on pre-commit- Install
pandocallows you to verify that automatic rendering of Jupyter notebooks into documentation for ReadTheDocs works as expected. For more information, see the Python Project Template documentation on Sphinx and Python Notebooks