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

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)

WARNING: 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]
MAIN_ID      RA         DEC     ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE    
          "h:m:s"     "d:m:s"   ...                                            
------- ----------- ----------- ... -------- -------------- -------------------
  M   1 05 34 31.94 +22 00 52.2 ...        C              R 2011A&A...533A..10L

Auteur: Leraut Alain

Created: 2020-04-23 jeu. 09:19

Validate