astroquery

repository·main·Indexed 21 days ago

https://github.com/astropy/astroquery

An Astropy-affiliated package providing functions and classes to access various online astronomical databases and web services. It includes specialized sub-packages for services such as SIMBAD, ALMA, and ALFALFA, and provides a framework for handling HTTP requests, caching, and authentication for astronomical data resources.

Tokens
130.5K
Snippets
470
Records
543
Agent score
73%

What's inside astroquery

  1. Overview of MAST Queries in astroquery.mast

    main

    The astroquery.mast module provides a programmatic interface to the Barbara A. Mikulski Archive for Space Telescopes (MAST). It offers five primary service interfaces:

    • Observation Queries: Search for observations across missions, filter results, and retrieve data products using the Portal API.
    • Mission-Specific Queries: Access mission-specific metadata (e.g., Hubble, James Webb) via the MAST Search API.
    • Catalogs Queries: Search for sources in MAST-hosted catalogs like Pan-STARRS or the Hubble Source Catalog.
    • Image Cutouts: Create and download image cutouts for specific regions of interest from TESS and Hubble data.
    • Advanced MAST Queries: Provides low-level, direct access to the Portal API for custom services or functionality not covered by higher-level classes.
  2. Use the image cutout services in `astroquery.image_cutouts`

    main
    The astroquery.image_cutouts submodule provides access to various astronomical image cutout services. These services allow you to request specific sub-sections (cutouts) of astronomical images from different data providers. The available services are organized by the project that provides them. You can import services either through the astroquery.image_cutouts namespace or directly from their specific top-level modules.
  3. Use IRSA Moving Object and Dust Extinction services

    main

    The astroquery.ipac.irsa package includes specialized modules for other IRSA services:

    • Moving Object Searches: Use the most module to determine if images from specific surveys intersect in space and time with the orbit of a known solar system object or user-defined orbital parameters.
    • Dust Extinction Service: Use the irsa_dust module to query Galactic dust reddening values for various filters at specified sky coordinates.
  4. Access the ESA JWST Archive via TAP+

    main

    The astroquery.esa.jwst module provides access to metadata and datasets from the European Space Agency (ESA) JWST Archive. It utilizes the TAP+ (Table Access Protocol extension) service, which supports Astronomical Data Query Language (ADQL) for querying, similar to SQL.

    Query Modes

    TAP+ supports two operation modes which can be toggled using the async_job parameter:

    • Synchronous (async_job=False): The server generates a response immediately. Warning: Do not use this for queries expected to return large amounts of data.
    • Asynchronous (async_job=True): The server starts a background job. The initial response provides a link to monitor the job status. Results are retrieved once the job is complete.

    Access Modes

    • Public: Standard TAP access. Users can execute ADQL queries and upload temporary tables for 'on-the-fly' queries. Results are visible to other users and are stored on the server for a limited time.
    • Authenticated: Restricted access for registered users. Results and ADQL queries are saved in a private user space. Authenticated users also gain access to:
      • Cross-match operations: Catalog cross-matching with results saved privately.
      • Persistent uploaded tables: Tables uploaded to a private space that can be reused in future queries or cross-matches.
  5. Explore available Astroquery services by category

    main

    Astroquery provides access to a wide variety of astronomical services categorized as follows:

    Archives

    Provide data, typically in FITS images or spectra. They usually return a table listing available data first. Examples include alma, heasarc, mast, sdss, and eso.

    Simulations

    Query databases of simulated or synthetic data. Examples include besancon and cosmosim.

    Line List Services

    Provide atomic or molecular line lists, cross sections, and collision rates. Examples include hitran, nist, lamda, and splatalogue.

    Other Services

    Includes services like astrometry_net, jplhorizons, and nasa_ads.

    Topical Collections

    Grouped services for specific topics, such as solarsystem or image_cutouts.

  6. Access IMCCE Solar System services

    main

    The astroquery.solarsystem.imcce submodule provides access to various Solar System-related services provided by the Institut de Mécanique Céleste et de Calcul des Éphémérides (IMCCE).

    Services within this submodule can be accessed in two ways:

    1. By importing them as part of the astroquery.solarsystem.imcce submodule.
    2. By importing them directly from their specific top-level modules.

    Refer to the main imcce documentation for a complete list of available services.

  7. Access JPL Solar System Services via astroquery

    main

    The astroquery.solarsystem.jpl submodule provides access to various Solar System-related services provided by the Jet Propulsion Laboratory (JPL).

    Users can access these services through two primary interfaces:

    1. JPL Small-Body Database (SBDB): Accessible via astroquery.jplsbdb.
    2. JPL Horizons: Accessible via astroquery.jplhorizons.

    Modules and classes can be imported either through the astroquery.solarsystem.jpl submodule or directly from their respective top-level modules.

  8. Access Solar System services via astroquery.solarsystem

    main

    The astroquery.solarsystem submodule provides access to various Solar System-related data services, organized by the providing organization. You can access these services by importing them from the astroquery.solarsystem submodule or directly from their specific top-level modules.

    Available service providers include:

    • IMCCE: Institut de Mécanique Céleste et de Calcul des Éphémérides
    • JPL: Jet Propulsion Laboratory
    • MPC: Minor Planet Center
    • NEODyS: Near Earth Object Dynamic Site
    • PDS: Planetary Data System
  9. Use the JPLSpec module for spectroscopy queries

    main

    The astroquery.linelists.jplspec module provides a query interface for the JPL Molecular Spectroscopy Catalog. It allows you to perform searches similar to the JPL web interface's browser form. Results are returned as an astropy.table.Table.

    Note on current availability: Due to ongoing issues with the JPL web interface (as of late 2025), the module currently uses a workaround that involves downloading full catalog files. This means:

    • Data transfers may be larger than expected.
    • Results may be unfiltered (returning full-table results).
    • Some metadata might differ from the original web interface.
  10. Access the Cologne Database for Molecular Spectroscopy (CDMS) via astroquery

    main
    The astroquery.linelists.cdms module provides a programmatic interface to the Search and Conversion Form of the Cologne Database for Molecular Spectroscopy. It allows you to query molecular spectroscopy data and returns the results as an astropy.table.Table. This module is designed to mimic the search criteria available in the CDMS web browser form.
  11. Access the ESA Herschel Science Archive with astroquery.esa.hsa

    main
    The astroquery.esa.hsa module provides programmatic access to the Herschel Science Archive (HSA), which contains approximately 37,000 science observations and 6,600 calibration observations from the Herschel space mission. This package allows users to retrieve Herschel data, observation products, postcards, and metadata via TAP (Table Access Protocol) queries.
  12. Get started with Minor Planet Center (MPC) queries

    main

    The astroquery.mpc module (or astroquery.solarsystem.MPC) provides a wrapper for three IAU Minor Planet Center services:

    1. Minor Planet Center Web Service: For querying comet and asteroid orbits and parameters.
    2. Minor Planet Ephemeris Service: For obtaining comet and asteroid ephemerides.
    3. Minor Planet Center Observations Database: For obtaining observations of asteroids and comets reported to the MPC.

    Additionally, the module provides access to the MPC's hosted list of IAU Observatory Codes.