The Deep Learning Identification of Galaxy Hosts in Transients (DELIGHT, Förster et al. 2022) is a library created by the ALeRCE broker to automatically identify host galaxies of transient candidates using multi-resolution images and a convolutional neural network (you can test it with our example notebook, that you can run in Colab). The initial idea for DELIGHT started as a project proposed for the La Serena School of Data Science in 2021.
You can install it using pip install astro-delight, but we recommend cloning this repository and pip install . from there.
The library has a class with several methods that allow you to get the most likely host coordinates starting from given transient coordinates. In order to do this, the delight object needs a list of object identifiers and coordinates (oid, ra, dec). With this information, it downloads PanSTARRS images centered around the position of the transients (2 arcmin x 2 arcmin), gets their WCS solutions, creates the multi-resolution images, does some extra preprocessing of the data, and finally predicts the position of the hosts using a multi-resolution image and a convolutional neural network. It can also estimate the host's semi-major axis if requested taking advantage of the multi-resolution images.
Note that DELIGHT's prediction time is currently dominated by the time to download PanSTARRS images using HiPS2fits HiPS2fits service. In the future, we expect that there will be services that directly provide multi-resolution images, which should be more lightweight with no significant loss of information. Once these images are obtained, the processing times are only milliseconds per host.
If you cannot install some of the dependencies, e.g. tensorflow, you can try running DELIGHT directly from Google Colab (test in this link).
Classes:
- Delight: the main class containing the methods to predict host galaxy positions starting from transient coordinates
Methods (most important):
- init: class constructor, it requires a list of object identifiers, a list of right ascensions, and a list of declinations
- download: downloads PanSTARRS fits files using the HiPS2fits service.
- get_pix_coords: gets the WCS solution in the fits files to move from pixel to celestial coordinates.
- compute_multiresolution: transform the PanSTARRS images to multi-resolution images
- load_model: load DELIGHT's Keras model
- predict: predict the host positions
- plot_host: plot the original host image, the multi-resolution images, and the transient and predicted host position
- get_hostsize: estimate the host semi-major axis
- save: save the resulting dataframe
- load: load the resulting dataframe
Requirements:
- Python >= 3.10
- tensorflow >= 2.16, which provides Keras 3 (https://www.tensorflow.org/install/pip,
pip install tensorflow) - numpy, pandas, scipy, matplotlib >= 3.9
- xarray (
python -m pip install xarray) - astropy (
pip install astropy) - astroquery (
pip install astroquery) - sep (
pip install sep)
All of these are installed automatically by pip install astro-delight.
A note on the model file: versions up to 0.0.11 shipped DELIGHT_v1.h5, a
Keras 2 model file. Keras 3, which every TensorFlow from 2.16 onwards uses,
cannot read it, because it stores the network's rotations and flips as
TFOpLambda layers that no longer exist. From 0.1.0 the architecture is defined
in code (delight/delight/model.py) and the trained weights ship separately as
DELIGHT_v1.weights.h5. The weights are unchanged, and the predictions are the
same to within floating point noise; tests/ checks this against a reference
run of the old version. The original .h5 is kept in the repository for
provenance, and tools/convert_model.py regenerates the weights from it.
DELIGHT's multi-resolution images and prediction vector:
DELIGHT's neural network architecture:
Metadata
Release files for astro-delight 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| astro_delight-0.1.0.tar.gz | 8.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astro_delight-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 MB
Release files / astro_delight-0.1.0.tar.gz
| Download URL | astro_delight-0.1.0.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a0646424eb341e0dc6cc0974f140e9ae11a4a837336a29659dcd13a937dd0f0
|
|
BLAKE2b-256 checksum How to use checksums |
c3e71bed9f0a796cfed2129aa09b9578d6706783bc540973cc2c6a287175742b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / astro_delight-0.1.0-py3-none-any.whl
| Download URL | astro_delight-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7f6a8884a9721151f997e34d7517ec6412e06aedec8ad9689f5c1edd884ad2f
|
|
BLAKE2b-256 checksum How to use checksums |
9813473c00681d68e2396d6cb462c42b30a43a1fd5bc461f836cdedce4ce668d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|