ACCÉDER AUX CATALOGUES DIRECTEMENT AVEC PYTHON
Table des matières
1 Astroquery
1.1 Sites de référence et installation
Voir ici. https://astroquery.readthedocs.io/en/latest
La démarche suggérée pour l'installation
conda install -c astropy astroquery conda install -n environnement -c astropy astroquery
Ne semble pas convenir.
En utilisant conda install -h
, on a trouvé le site
https://anaconda.org/conda-forge/astroquery
qui, lui, propose la ligne de commande :
conda install -c conda-forge/label/cf202003 astroquery
… que l'on peut adapter à l'environnement du mooc
conda install -n mooc-rr-emacs -c conda-forge/label/cf202003 astroquery
1.2 Exemple d'usage :
2 Vérification de l'installation
Le code suivant doit s'exécuter et donner un résultat.
from astroquery.simbad import Simbad result_table = Simbad.query_object("m1") result_table.pprint(show_unit=True)
[0;33mWARNING[0m: WrongDBMModuleWarning: Existing astropy cache is in an unsupported format, either install the appropriate package or use astropy.utils.data.clear_download_cache() to delete the whole cache; db type is dbm.gnu, but the module is not available [astropy.utils.data] [0;31mMAIN_ID RA DEC ... COO_QUAL COO_WAVELENGTH COO_BIBCODE [0m [0;31m "h:m:s" "d:m:s" ... [0m [0;31m------- ----------- ----------- ... -------- -------------- -------------------[0m M 1 05 34 31.94 +22 00 52.2 ... C R 2011A&A...533A..10L