Python Notebooks

We have created a number of Python notebooks showing concrete examples of how to query archives using VO protocols. We use the Astropy-affiliated PyVO package for the queries we demonstrate. The notebooks are summarized below. In every case, the idea is to allow you to find data at any archive rather than knowing where to start (as in Astroquery). Though we are a NASA organization and highlight NASA data, the methods apply to all VO-compatible archives.

newFor an introduction to an archive-agnostic workflow and our tutorials, we have a recording of a webinar we gave at the AAS Winter 2021 meeting hosted by the Astropy booth. This video is now hosted on the IRSA IPAC YouTube channel: You can also simply view the slides as a PDF introduction.

These notebooks are available on our GitHub site at You can simply click on the links below to visualize them as rendered HTML, or browse them here. You can run them two ways: clone the GitHub repository locally and run them with Jupyter notebook or JupyterLab; alternatively, from the GitHub site, you can click on the "launch binder" button at the bottom that will take you to a cloud service where these will run in a temporary session.

Basic NASA-NAVO Services

  • Images: The Simple Image Access protocol allows you to download and visualize regions of the sky from a variety of sources. We demonstrate how to do this with our Image Access notebook.

  • Catalogs: The Simple Cone Search protocol performs simple searches of catalogs based on a given coordinate and radius. For more complicated queries, e.g., if you wish to search, match, and cross-correlate catalog data, the VO provides a more powerful Table Access Protocol. We demonstrate both in our Catalog Queries notebook that uses our Cone and TAP query classes.

  • Spectra: The Simple Spectral Access protocol allows you to download and visualize spectra of a given object from a variety of archives. We demonstrate how to do this within python in our Spectral Access notebook.

Science Use Cases

We have prepared realistic science use cases as well, i.e., notebooks that perform a complete task from data discovery to visualization of images or spectra.


For help with using PyVO, you can post questions to the pyvo channel on the Astropy Slack space. If the issue is archive-specific (i.e., it works for other archives' services but not the one you're interested in), then contact the archive itself through its own help desk.

We also run workshops at AAS meetings on how to access NAVO data through Python, where we help users run and modify these notebooks for their own needs.

(The notebooks we developed for the first workshop are still available on GitHub, though they have evolved significantly. The earliest are still available at the old notebook site. They include examples specific to each archive and do not use PyVO, while the above notebooks are generic.)