This is a repository to generate stamps of different sizes filled randomly or not with a chosen number of galaxies in LSST and Euclid filters.
The images are generated with GalSim (github, doc) from parametric models fitted to real galaxies from the HST COSMOS catalog (which can be found from here).
- Clone the repository
git clone https://github.com/BastienArcelin/image_generation_GalSim
cd image_generation_GalSim
- Install
conda env create -f ressources/environment.yml
conda activate img_generation
- with pip
- Install most of the required packages
python3 -m pip install -r ressources/requirements.txt
- Install fftw3 following the instructions presented here
- Install GalSim
pip install galsim
- Add a
IMGEN_DATA
environment variable, in the shell you are running, which points to the directory where you want your data to be stored.
Example, add to your .bashrc
:
export IMGEN_DATA='/path/to/img_gen/data'
- You need to download the COSMOS catalog. You can find it here. You can chose the
COSMOS_25.2_training_sample.tar.gz
(4.4 GB). - Save this file in the directory chosen for storing data (i.e. at
IMGEN_DATA
).
You can find a notebook briefly describing the generation process and how to use the functions in image_generator.py
can be found here
- Photutils
- GalSim
- multiprocess (if you want to multiprocess the image generation)
- pandas
- matplotlib
- numpy
- scipy
Bastien Arcelin - arcelin at apc.in2p3.fr