astroquery
astroquery copied to clipboard
Astrometry.net warning about unit
Currently, using astrometry.net with a recent version of astropy on an image will result in the following INFO message:
INFO: using the unit adu passed to the FITS reader instead of the unit adu in the FITS file. [astropy.nddata.ccddata]
(or similar if another unit is present in the FITS file). This is because of this code:
https://github.com/astropy/astroquery/blob/b1fcfff5bf77255a7d24f17eafe0b9f455d5f598/astroquery/astrometry_net/core.py#L384
Since the unit is irrelevant, it would be nice to avoid having this INFO message printed out which can confuse users especially if adu is not the correct unit. I think there are two options:
- Don't rely on CCDData to read in the image - after all it wouldn't be that hard to search for the first ImageHDU manually in the file
- Try and silence the logging output temporarily
another case for using a logger?