Python tool for interactively digitising an astrophysical sky map and converting it to a different projection or coordinate system.
By default, supports the Equatorial (icrs) and Galactic coordinate systems and the Hammer, Aitoff, and Sinusoidal projections.
| Example image (see credit) | ![]() |
|---|---|
| Input pane | ![]() |
| Control pane | ![]() |
| Output pane | ![]() |
conda env create -f environment.yaml
conda activate skymapconv
python skymap-digitiser-converter.py samples/apjad843bf1_lr.jpgalternatively, for a Jupyter experience:
jupyter lab demo.ipynb- Use the alignment sliders to centre the overlaid axes over the correct part of your image.
- Use the toggles and sliders on the left to configure the overlaid axes until they match the format of the input image. Note that the "Hammer" and "Aitoff" projections are hard to distinguish unless there are gridlines in the input image.
- When you are satisfied with the alignment of the axes and the choice of projection, coordinate system, and central longitude, click "Extract data with current alignment".
- Use the toggles and sliders on the right to configure the output image to your liking. The "Smoothing" slider changes the radius of the circles imitating each pixel in the output image. If the output image looks jagged, then set this slider to a lower value.
We take advantage of Matplotlib's transformations system. In essence, this lets us convert the position of each pixel into a SkyCoord which we associate with the colour of that pixel. Then, we can draw those SkyCoords on a new projection. We draw each coordinate as a circle with the colour of the pixel from the original image.
This could all be made much more clever, but it also works surprisingly well considering the simplicity of it.
The demo image "apjad843bf1_lr.jpg" is used under a Creative Commons Attribution 4.0 license from Pierre Auger Collaboration (2024) "Large-scale Cosmic-ray Anisotropies with 19 yr of Data from the Pierre Auger Observatory", The Astrophysical Journal, Volume 976, Number 1. DOI: 10.3847/1538-4357/ad843b.



