astropy / astropy/astroquery

coordinates issue for query_cross_id/query_cross_id_async

Open
#1,494 18 comments 0 reactions 0 assignees View on GitHub
bug vsa
Dominant language
Python
Stars
791
Forks
451
Avg merge
1d 3h
Merged PRs (30d)
4

Description

I tried to use the query_cross_id_async from the astroquery.vsa package to query the VIKING database. According to the documentation, the coordinates argument in query_cross_id_async should be "an array of one or more astropy SkyCoord objects specifying the objects to crossmatch against" (as an example, coordinates=[SkyCoord(117, -25, unit='deg')]). However, this return "TypeError: Argument cannot be parsed as a coordinate". [error coming from /astroquery/wfau/core.pyc in _args_to_payload(self, *args, **kwargs); C = commons.parse_coordinates(args[0]).transform_to(coord.ICRS))]

If indeed I used as input a SkyCoord object instead of an array (coordinates=SkyCoord(117, -25, unit='deg')), this raise an other error but later in the code "TypeError: Scalar 'SkyCoord' object has no len()".

So what should be used as coordinates input?

Contributor guide

Open the contributing guide

Research direction

Reproduce the documented query_cross_id_async examples in astroquery.vsa, comparing an array of SkyCoord objects with a scalar SkyCoord. Trace the coordinate handling through wfau/core.pyc _args_to_payload and commons.parse_coordinates; done means the accepted input form is documented or corrected and the VIKING query completes without either TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.