Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ esa.jwst

- Minor fixes, documentation updated. [#2257]

gaia
^^^^

- The ``query_object()`` and ``query_object_async()`` methods of
``astroquery.gaia.Gaia`` no longer ignore their ``columns`` argument when
``radius`` is specified. [#2249]

Infrastructure, Utility and Other Changes and Additions
-------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions astroquery/gaia/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ def __query_object(self, coordinate, radius=None, width=None, height=None,
coord = self.__getCoordInput(coordinate, "coordinate")
job = None
if radius is not None:
job = self.__cone_search(coord, radius,
async_job=async_job, verbose=verbose)
job = self.__cone_search(coord, radius, async_job=async_job,
verbose=verbose, columns=columns)
else:
raHours, dec = commons.coord_to_radec(coord)
ra = raHours * 15.0 # Converts to degrees
Expand Down
9 changes: 9 additions & 0 deletions astroquery/gaia/tests/test_gaia_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
from .. import GaiaClass


@pytest.mark.remote_data
def test_query_object_columns_with_radius():
# Regression test: `columns` were ignored if `radius` was provided [#2025]
Gaia = GaiaClass()
sc = SkyCoord(ra=0*u.deg, dec=0*u.deg)
table = Gaia.query_object_async(sc, radius=10*u.arcsec, columns=['ra'])
assert table.colnames == ['ra', 'dist']


@pytest.mark.remote_data
def test_query_object_row_limit():
Gaia = GaiaClass()
Expand Down