title | emoji | colorFrom | colorTo | sdk | python_version | pinned |
---|---|---|---|---|---|---|
Photo-z predictor |
🌌 |
blue |
red |
docker |
3.11 |
false |
This repository contains a neural network to predict photometric redshifts. The neural network incorporates domain adaptation, a methodology to mitigate the impact of sample bias in the spectroscopic training samples.
The model is deployed and available here (WiP). The model in production enables making predictions for new galaxies with the pretrained models. One can also run the code locally
python app.py
This opens a Gradio interface to make predictions for new galaxies.
Documentation is available here.
You will also need to clone the repository to your local environment by executing the following commands:
git clone https://github.com/lauracabayol/TEMPS
cd TEMPS
We recommend using a conda environment with Python 3.10 by executing the following commands:
conda create -n temps -c conda-forge python=3.10
conda activate temps
Once your environment is ready, proceed with the installation of the package:
pip install -e .
This will already install the dependencies.
The repository contains notebooks to reproduce the figures in the paper (TBD) The notebooks are loaded on GitHub as .py files. To convert them to .ipynb use
jupytext --to ipynb notebooks/*.py
The model can be trained using the train.py script at the repo main directory.
python scripts/train.py --config-file data/config.yml
More information on the training script can be found in the docs
To make predictions for new galaxies, you can use the predict.py script (TBD).
This project is licensed under the MIT License. You are free to use, modify, and distribute this project as long as you adhere to the license terms.