astropy / reproject

Python-based Astronomical image reprojection :milky_way: - maintainer @astrofrog
https://reproject.readthedocs.io
BSD 3-Clause "New" or "Revised" License
107 stars 66 forks source link

Mosaic wcs #258

Open MarianaRubet opened 2 years ago

MarianaRubet commented 2 years ago

Hello, I set up a mosaic using reproject_and_coadd, but the mosaic has no wcs configured. Is there any way to preserve the wcs of the original images in the mosaic? I need a mosaic with accurate wcs. Can reproject_and _coadd do this?

meindertsma commented 2 years ago

The wcs you use in reproject_and_coadd can be used in the fits file of the mosaic. If it is a wcs object, it has a to_header method, and if it is a header you can use astropy.io.fits.PrimaryHDU to convert it to a proper header to save with the array. You can also try uploading to nova.astrometry.net to get a wcs.