Official code repository for the paper "A data-driven approach for extracting exoplanetary atmospheric features" - M. Giordano Orsini et al., 2025
- Paper figures are stored in the folder
paper/images
and inexperiments/inpainting
subfolders. - Experimental results are extracted from text files in
experiments/comparison
. - The file
make_plots.py
provides the code for reproducing some plots shown in the paper.
We provide instructions in order to reproduce the experimental results of the proposed work.
conda env create -f environment.yml
conda activate ganastro
Prerequisite: a set of real nights extracted from some data archive.
Launch augment.py
for generating a synthetic dataset for model training.
To train a DCGAN model, first you need to provide a configuration file. The json file dcgan.json
contains the model specifications actually used for obtaining the experimental results proposed in the paper.
python train.py --config dcgan.json
In a time-limited session, you can resume the model training for a given checkpoint by using:
python train.py --resume <path-to-checkpoint> --config <path-to-config>
N.B.: To get the weights of the pretrained model used for the experiments in the paper, please contact me at [email protected]
Please put the downloaded file in pretrained/
.
Once trained, the generator
To perform semantic image inpainting, first you need to prepare a configuration file for the inpainting settings. The json file inpainting.json
provides the inpainting configuration used in our work.
python inpaint.py --resume pretrained/0920_170346/checkpoint-epoch250.pth --config inpainting.json
The following schema describes the comparison process between DCGAN and PCA-based detrending algorithm. More details in the paper.
We perform the PCA decomposition by computing the optimal number of principal components retaining the 90% of the total variance. However, this hyperparameter can be specified by setting the option --energy_threshold
.
To perform the comparison, launch:
python comparison.py --energy_threshold 90
If you found this work useful for your research, please consider citing the corresponding paper:
@article{giordanoorsini_detrending_2025,
title = {A data-driven approach for extracting exoplanetary atmospheric features},
journal = {Astronomy and Computing},
volume = {52},
pages = {100964},
year = {2025},
issn = {2213-1337},
doi = {https://doi.org/10.1016/j.ascom.2025.100964},
url = {https://www.sciencedirect.com/science/article/pii/S221313372500037X},
author = {Massimiliano {Giordano Orsini} and Alessio Ferone and Laura Inno and Paolo Giacobbe and Antonio Maratea and Angelo Ciaramella and Aldo Stefano Bonomo and Alessandra Rotundi},
keywords = {Exoplanetary atmospheres, High-resolution spectroscopy, Deep learning, Detrending},
}