Returned wcs header has 100s of header cards added {astrometry.net}
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
I'm finding that returned solved WCS headers have hundreds of header keys added. Here is an example of the cards numbers:
```
No. Name Ver Type Cards Dimensions Format
0 PRIMARY 1 PrimaryHDU 718 (3072, 2047) int16 (rescales to uint16)
1 MASK 1 ImageHDU 8 (3072, 2047) uint8
2 UNCERT 1 ImageHDU 9 (3072, 2047) float64
```
An example of one of the added keys:
```
COMMENT /data/INDEXES/index-5200-LITE/index-5206-46.fits
COMMENT Index(353):
COMMENT /data/INDEXES/index-5200-LITE/index-5206-47.fits
COMMENT Field name: job.axy
```
It seems that this behaviour comes from this line in the `monitor_submission` function of the astrometryNet class
```
wcs = fits.Header.fromstring(wcs_response.text)
```
Its possible that the response text has both, the useful wcs header information, and some unneeded solve log information that then gets parsed into the header.
Contributor guide
Research direction
Start in the astrometryNet monitor_submission function at the fits.Header.fromstring(wcs_response.text) call, and inspect the response text to distinguish WCS header data from solve-log information. Done means returned WCS headers no longer include unrelated solve-log cards such as index paths and job metadata; verify this against a representative solved response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100