astropy / astropy/pyvo

("IMAGE/JPEG") is either illegal or unsupported when searching 2MASS

Open
#394 3 comments 0 reactions 0 assignees View on GitHub
bug upstream
Dominant language
Python
Stars
88
Forks
64
Avg merge
38m
Merged PRs (30d)
1

Description

I am modifying the image search cheat-sheet to look at 2MASS images, and it failed because the 2MASS ASKY AT / 2MASS All-Sky Atlas Image Service doesn't appear to support jpeg images. Here is what I ran (still labelled uvot even though I changed to IR, sorry!)

```
from astropy import coordinates as coord
import pyvo as vo

uvot_services = vo.regsearch(servicetype='sia',waveband='infrared',keywords=['2MASS'])
uvot_services.to_table()['ivoid','short_name','res_title']

coords = coord.SkyCoord.from_name("Cl* NGC 2632 JS364")
print(coords)

im_table = uvot_services[0].search(pos=coords,size=0.2,format='image/jpeg')
```

And then that returns
> DALQueryError: getSIAFormat() ../src/wsvc/2MASS/IM/imapp.c:531
> Simple Image Access FORMAT query parameter value ("IMAGE/JPEG") is either illegal or unsupported

I discussed with @bsipocz and it seems like this should return an empty result if an archive contains no data in that format, rather than throwing an error.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the Python and pyvo snippet in the issue, then trace how the SIA search handles the FORMAT parameter and unsupported image formats. Verify that a service without JPEG support returns an empty result rather than raising DALQueryError.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.