Skip to content

LSSTDESC/Delight

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

365 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delight

Template

PyPI GitHub Workflow Status Codecov Read The Docs Benchmarks

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.

alt tag alt tag Documentation Status Latest PDF Coverage Status

Tests: pytest for unit tests, PEP8 for code style, coveralls for test coverage.

Content

./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

Requirements

Python 3.5, cython, numpy, scipy, pytest, pylint, coveralls, matplotlib, astropy, mpi4py

Authors

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;%%"
}

License

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.

Installation and maintenance of this package

This package is maintained by the LSSTDESC collaboration and the DESC-RAIL team. This project is handled under the LINCC-Framework.

Usual installation

The package can be installed with a single command pip:

>> pip install .

or

>> pip install -e .

Perform the control tests

Basic user tests in python scripts

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

Unitary tests

pytest -v tests/*.py

Install the Delight documentation

  • 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).

Learn through the tutorials

Some basic tutorials are provided in docs/notebooks:

docs/notebooks/Tutorial-getting-started-with-Delight.ipynb
docs/notebooks/Tutorial_interfaces_rail-with-Delight.ipynb

More on the python project LINCC Framework

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.

Dev Guide - Getting Started

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:

  1. ./.setup_dev.sh will 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
  2. Install pandoc allows 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

About

Photometric redshift via Gaussian processes with physical kernels

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • ReScript 80.2%
  • Python 12.3%
  • Wolfram Language 3.4%
  • TeX 3.4%
  • Other 0.7%