gpz_pype
This is a python package for running Gaussian Mixture Model augmented photometric redshift estimation. It is designed to be used with the gpz++ implementation of GPZ (Almosallam et al. 2016a,2016b,2017).
Features
- A simple python interface for running gpz++ on a dataset.
- Simplified data augmentation through Gaussian Mixture models (GMMs) following the approach presented in Hatfield et al. (2020) and Duncan (2023).
- Implementation of cost-sensitive learning weights and sample division from GMM inputs.
Installation
This code assumes a working installation of gpz++. To install the package, clone the repository and run
make install
Or install using pip with
pip install gpy_pype
(Not yet available.)
To use the core features of the package, you will need to set the environment variable GPZPATH
to point to the location of the gpz++ executable. For example, in bash you can do this with
export GPZPATH=/path/to/gpzpp
Alternatively, you can set it in your python script with
import os
os.environ['GPZPATH'] = '/path/to/gpzpp'
or using the convenience function
from gpz_pype.utilities import set_gpz_path
set_gpz_path('/path/to/gpzpp')
Usage
Basic usage for running GPz is demonstrated in gpz, while the data augmentation features are demonstrated in gmm.
Acknowledgements
The gpz++ C++ version of GPz was developed by Corentin Schreiber for the Euclid space mission, with funding from the UK Space Agency, under the supervision of Matt Jarvis.
If you use this code for your own work, please cite this repository and gpz++. The underlying GPz algorithm is presented in Almosallam et al. (2016a,2016b) where GPz was first introduced, with Almosallam (2017) outlining additional features incorporated into GPz v2.0 that are incorporated into gpz++.