Skip to content

Commit e756776

Browse files
committed
Switching to use VOtable format as the votable reader handles duplicated column names
1 parent 0cc58b7 commit e756776

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

astroquery/xmatch/core.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def query(self, cat1, cat2, max_distance,
7777
**kwargs)
7878
if get_query_payload:
7979
return response
80-
return self._parse_text(response.text)
80+
81+
return Table.read(BytesIO(response.content), format='votable')
8182

8283
@prepend_docstr_nosections("\n" + query.__doc__)
8384
def query_async(self, cat1, cat2, max_distance, colRA1=None, colDec1=None,
@@ -92,12 +93,11 @@ def query_async(self, cat1, cat2, max_distance, colRA1=None, colDec1=None,
9293
if max_distance > 180 * u.arcsec:
9394
raise ValueError(
9495
'max_distance argument must not be greater than 180')
95-
payload = {
96-
'request': 'xmatch',
97-
'distMaxArcsec': max_distance.to(u.arcsec).value,
98-
'RESPONSEFORMAT': 'csv',
99-
**kwargs
100-
}
96+
payload = {'request': 'xmatch',
97+
'distMaxArcsec': max_distance.to(u.arcsec).value,
98+
'RESPONSEFORMAT': 'votable',
99+
**kwargs}
100+
101101
kwargs = {}
102102

103103
self._prepare_sending_table(1, payload, kwargs, cat1, colRA1, colDec1)

0 commit comments

Comments
 (0)