astroquery.mast.Zcut: `get_surveys` breaks at radius=0 and 180
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
astroquery.mast.Zcut's `get_surveys` method breaks when radius is set to default (0) or 180 degrees. For some reason it ends up producing just the root URL without any endpoints, which leads it to crash.
Example 1:
`In [18]: Zcut.get_surveys('83.6333, 22.0144', radius='0d')`
`HTTPError: 500 Server Error: Internal Server Error for url: https://mast.stsci.edu/zcut/api/v0.1/survey`
Example 2:
`Zcut.get_surveys('83.6333, 22.0144', radius='180d')`
`HTTPError: 500 Server Error: Internal Server Error for url: https://mast.stsci.edu/zcut/api/v0.1/survey`
Example 3 (where it doesn't break):
```
In [19]: Zcut.get_surveys('83.6333, 22.0144', radius='2d')
WARNING: NoResultsWarning: Coordinates are not in an available deep field survey. [astroquery.mast.cutouts]
Out[19]: []
```
Contributor guide
Research direction
Start at astroquery.mast.Zcut.get_surveys and reproduce the reported calls with radius='0d', radius='180d', and radius='2d'. Trace how the radius becomes the request URL and compare the failing and working requests; done means the boundary-radius calls no longer produce a root-only URL or HTTP 500, while the 2d example still behaves correctly.
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
- 35/100