Astrometry.net warning about unit
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
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
Contributor guide
Research direction
Start in astroquery/astrometry_net/core.py at the linked code around line 384 and trace how the image is read with CCDData. Determine how to prevent the irrelevant unit INFO message without changing astrometry.net image handling. Done means using an image with a conflicting FITS unit no longer produces this warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100