Spaces:
Runtime error
Runtime error
Laura Cabayol Garcia
commited on
Commit
·
94d19ef
1
Parent(s):
1a00a72
deploy docs
Browse files- .github/workflows/deploy_docs.yml +1 -1
- docs/index.md +70 -0
.github/workflows/deploy_docs.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
name: deploy_docs
|
2 |
on:
|
3 |
push:
|
4 |
branches:
|
|
|
1 |
+
name: deploy_docs
|
2 |
on:
|
3 |
push:
|
4 |
branches:
|
docs/index.md
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# TEMPS documentation!
|
2 |
+
|
3 |
+
Welcome to the documentation for TEMPS!
|
4 |
+
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.
|
5 |
+
|
6 |
+
The training and validation data are not available in the repository, but the model can be trained with new data. The model is also deployed and available [here](https://huggingface.co/spaces/lauracabayol/TEMPS). The model in production enables making predictions for new galaxies with the pretrained models.
|
7 |
+
|
8 |
+
## Table of Contents
|
9 |
+
|
10 |
+
- [Prerequisites](#prerequisites)
|
11 |
+
- [Installation](#installation)
|
12 |
+
- [Usage](#deployed-model)
|
13 |
+
- [Notebooks](#notebooks)
|
14 |
+
- [Training the Model](#training-the-model)
|
15 |
+
|
16 |
+
## Prerequisites
|
17 |
+
|
18 |
+
Before proceeding, ensure that the following software is installed on your system:
|
19 |
+
|
20 |
+
- Python 3.10
|
21 |
+
- [pip](https://pip.pypa.io/en/stable/installation/)
|
22 |
+
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
23 |
+
|
24 |
+
You will also need to clone the repository to your local environment by executing the following commands:
|
25 |
+
|
26 |
+
```bash
|
27 |
+
git clone https://github.com/lauracabayol/TEMPS
|
28 |
+
cd TEMPS
|
29 |
+
```
|
30 |
+
## Installation
|
31 |
+
|
32 |
+
We recommend using a conda environment with Python 3.10 by executing the following commands:
|
33 |
+
```
|
34 |
+
conda create -n temps -c conda-forge python=3.10
|
35 |
+
conda activate temps
|
36 |
+
```
|
37 |
+
Once your environment is ready, proceed with the installation of the package:
|
38 |
+
|
39 |
+
```
|
40 |
+
pip install -e .
|
41 |
+
```
|
42 |
+
This will already install the dependencies.
|
43 |
+
|
44 |
+
|
45 |
+
## Deployed model
|
46 |
+
Alternatively, one can access the deployed models at [HuggigFace](https://huggingface.co/spaces/lauracabayol/TEMPS). This enbles making predictions from a file with photometric measurements. The format should be a csv file with the following band photometries in this order: G,R,I,Z,Y,H,J.
|
47 |
+
|
48 |
+
|
49 |
+
## Notebooks
|
50 |
+
The repository contains notebooks to reproduce the figures in the paper (to be updated with the link)
|
51 |
+
The notebooks are loaded on GitHub as .py files. To convert them to .ipynb use <jupytext>
|
52 |
+
|
53 |
+
```bash
|
54 |
+
jupytext --to ipynb notebooks/*.py
|
55 |
+
```
|
56 |
+
|
57 |
+
## Training the Model
|
58 |
+
The model can be trained using the train.py script at the repo main directory.
|
59 |
+
|
60 |
+
```
|
61 |
+
python train.py --config-file data/config.yml
|
62 |
+
```
|
63 |
+
One only needs to modify the config file to point at the input files. Make sure to also specify the photometric bands naming, and the spectroscopic and photometric redshift columns.
|
64 |
+
Input catalogs must be in .fits or .csv formats and these should already contain clean photometry.
|
65 |
+
|
66 |
+
If extinction_corr is set to True, one must specify the column namings of the E_VB corrections in the config file.
|
67 |
+
|
68 |
+
## License
|
69 |
+
|
70 |
+
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.
|