HEASoft and XSPEC are now available as conda packages. See details ....
API and Command Line Access
The catalogs and astronomical archives of the HEASARC are accessible through different Application Programming Interfaces (APIs) and Command Line Interfaces (CLI)
-
Virtual Observatory API
HEASARC data is accessible through the Virtual Observatory (VO) protocols, which includes:- Cone search
- Simple Image Access (SIA)
- Simple Spectral Access (SSA)
- Table Access Protocol (TAP)
-
Custom APIs
The XAMIN catalog and archive interface allows users to query the HEASARC catalogs, plot the results and download the the associated data products. It includes both a web API and a Command Line interface.-
The command line interface runs like
runquery key1=value1 key2=value2 -
The corresponding web interface is:
https://heasarc.gsfc.nasa.gov/xamin/query?key1=value1&key2=value2
-
The command line interface runs like
-
Astroquery
The HEASARC also supports access to the archive products throught theastroquery.heasarc
module (version >= 0.4.8). Examples include:from astroquery.heasarc import Heasarc catalogs = Heasarc.list_catalogs(master=True) from astropy.coordinates import SkyCoord position = SkyCoord.from_name('ngc 3783') table = Heasarc.query_region(position, catalog='numaster') links = Heasarc.locate_data(table) Heasarc.download_data(links)
Other resources
- Command line tools for data downloads - A download script can be useful, and we also have tips on using wget and curl.