CANDELS galaxy blender dataset
==============================

Dataset to be used to create realistic galaxy blends with [`candels-blender`](https://github.com/aboucaud/candels-blender)

Content
-------

This dataset is based on the CANDELS bulge/disk decomposition catalogue and images from Dimauro et al. (2018). Our main addition to this dataset, was to perform a visual inspection of all the 2 823 stamps and rejects all those for which
- the central galaxy is possibly blended
- the neighbouring sources are too close or too diffuse
- the segmentation map does not cover well the sources in the stamp
- weird artefacts are present in the stamp.

This process removed around 800 stamps to leave 2 001 entries, available in this tarball as

- `candels_img.npy`  
  Numpy binary array of shape (2001, 128, 128) containing 2 001 stamps (128 x 128 pixels) extracted from CANDELS F160W images, centered around isolated galaxies with a well defined morphology.
- `candels_seg.npy`  
  Numpy binary array of shape (2001, 128, 128) containing 2 001 segmentation maps (128 x 128 pixels) associated with the above stamps and obtained via SExtractor (Bertin et al. 1996).
- `candels_cat.csv`  
  The catalogue of corresponding central sources, based on the catalogue obtained via SExtractor, containing the CANDELS ID, FIELD and (RA, DEC) position, the F160W magnitude and its estimated error, the F160W estimated radius, the spectroscopic redshift of the galaxy, and augmented with the galaxy type and the segmentation value of the central galaxy.


Usage
-----
Load the array files in Python using numpy as:
```
import numpy as np
stamps = np.load("candels_img.npy")
segmaps = np.load("candels_seg.npy")
```

Catalogue is standard comma-separated CSV which can be conveniently parsed by tools like e.g. pandas
```
import pandas as pd
cat = pd.read_csv("candels_cat.csv")
```
or astropy
```
from astropy.io import ascii
table = ascii.read("candels_cat.csv")
```

Authors
-------
Alexandre Boucaud - aboucaud at apc.in2p3.fr
Marc Huertas-Company - mhuertas at obspm.fr
Emille E. O. Ishida - emille at cosmostatistics-initiative.org

Reference
---------
The original CANDELS bulge/disk decomposition catalogue can be obtained at https://lerma.obspm.fr/huertas/form_CANDELS