Closed kaya4me2 closed 1 day ago
Resolved looking at some older posting 👍 at : https://gist.github.com/elnjensen/20e9b7bd9c18444be6ea63b131d5d329
The following functions now correctly with the Gaia database query(s) which is not obvious in the Astropy Coordinate 1 tutorial or the ESA Gaia Python query examples at https://astroquery.readthedocs.io/en/latest/gaia/gaia.html
import warnings warnings.filterwarnings("ignore", module='astropy.io.votable.tree') warnings.filterwarnings("ignore", message='.*unclosed..socket')
from future import print_function, division from astropy.coordinates import (SkyCoord, Distance, Galactic, EarthLocation, AltAz) import astropy.coordinates as coord from astropy.coordinates import ICRS, Galactic, FK4, FK5 # Low-level frames from astropy.coordinates import Angle, Latitude, Longitude # Angles from astropy import units as u
from astropy.time import Time
from astroquery.gaia import Gaia
Gaia.MAIN_GAIA_TABLE = "gaiadr3.gaia_source" # Reselect Data Release 3, default
Gaia.ROW_LIMIT = 50
object_name = 'T Tauri' zap = SkyCoord.from_name(object_name)
coord = SkyCoord(ra=zap.ra, dec=zap.dec, unit=(u.degree, u.degree), frame='icrs') print(coord) j = Gaia.cone_search_async(coord, radius=u.Quantity(1.0, u.deg)) r = j.get_results() r.pprint()
RETURNS NOW SUCCESSFULLY COMPLETED
<SkyCoord (ICRS): (ra, dec) in deg
(65.49763328, 19.53512011)>
INFO: Query finished. [astroquery.utils.tap.core]
solution_id designation source_id ... libname_gspphot dist
...
------------------- -------------------------- ----------------- ... --------------- --------------------
1636148068921376768 Gaia DR3 48192969034959232 48192969034959232 ... MARCS 7.44373348693752e-05
I couldn't reproduce the first traceback, and it seems the issue has been resolved for the OP, too, so I'm closing.
Attempt to execute a query of the Gaia catalogs using examples posted at https://learn.astropy.org/tutorials/1-Coordinates-Intro and also at https://astroquery.readthedocs.io/en/latest/gaia/gaia.html
system configuration MacOSX M3 14.2.1
print(astropy.version) print(astroquery.version) astropy 6.0.0 astroquery 0.4.8.dev9321
Code snippet
However getting an commons.py:112 error