Skip to content

Commit

Permalink
possible fix for issue 3191
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Jan 28, 2025
1 parent b005fc9 commit 5e914f1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions astroquery/xmatch/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def query_async(self, cat1, cat2, max_distance, *, colRA1=None, colDec1=None,
raise ValueError('max_distance argument must not be greater than 180')
payload = {'request': 'xmatch',
'distMaxArcsec': max_distance.to(u.arcsec).value,
'radius': max_distance.to(u.arcsec).value,
'xmatchMethod': fixedRadius
'RESPONSEFORMAT': 'votable',
**kwargs}

Expand Down Expand Up @@ -127,7 +129,9 @@ def _prepare_sending_table(self, cat_index, payload, kwargs, cat, colRA, colDec)
catstr = 'cat{0}'.format(cat_index)
if isinstance(cat, str):
payload[catstr] = cat
payload[f'typeCat{cat_index}'] = 'vizier'
else:
payload[f'typeCat{cat_index}'] = 'file' # is this correct?
# create the dictionary of uploaded files
if "files" not in kwargs:
kwargs["files"] = {}
Expand Down Expand Up @@ -164,9 +168,9 @@ def _prepare_area(self, payload, area):
elif isinstance(area, CircleSkyRegion):
payload['area'] = 'cone'
cone_center = area.center
payload['coneRA'] = cone_center.icrs.ra.deg
payload['coneDec'] = cone_center.icrs.dec.deg
payload['coneRadiusDeg'] = area.radius.to_value(u.deg)
payload['areaCenter'] = f'{cone_center.icrs.ra.deg} {cone_center.icrs.dec.deg}'
payload['areaRadius'] = cone_center.icrs.dec.deg
payload['areaRadiusUnit'] = 'deg'
else:
raise ValueError('Unsupported area {}'.format(str(area)))

Expand Down

0 comments on commit 5e914f1

Please sign in to comment.