Skip to article frontmatterSkip to article content
SPHEREx Archive at IRSA

SPHEREx Data Access

IRSA serves SPHEREx data from two locations: (1) on premises at IPAC; and (2) on the cloud via Amazon Web Services (AWS). IRSA provides layered access to these data to support a variety of use cases and users. These layers include:

Each of these data access layers is described in greater detail in the subsections below.

Browsable Directories

SPHEREx data products are laid out in directories that can be navigated with standard web browsers. This is convenient for users to get a quick sense of the types of data products that are available, to quickly download some examples by clicking through the directory tree, and to script bulk downloads using wget or curl.

The root of the SPHEREx QR2 on-premises data directories is: https://irsa.ipac.caltech.edu/ibe/data/spherex/qr2. For QR1, replace ‘/qr2’ with ‘/qr’. All of the data products are also available on the cloud via AWS. Please see our instructions for accessing on-cloud SPHEREx data.

The public data products are organized into subdirectories based on the following organizational scheme:

The content of each subdirectory and the filename formats are described in greater detail in the Data Products section of this user guide and in the SPHEREx Explanatory Supplement.

Application Program Interfaces (APIs)

IVOA Simple Image Access V2 Protocol

IRSA provides API access to SPHEREx Spectral Image Multi-Extension FITS files (MEFs) and associated calibration files through version 2 of the VO Simple Image Access (SIA2) protocol. SIA2 allows users to query for a list of images that satisfy constraints based on position(s) on the sky, band, time, ID, and instrument. The list returned by the service includes a data access URL for each image. These can be used to retrieve the on-prem-hosted images using wget or curl. The returned list also returns cloud access information. A brief summary of SIA2 for accessing SPHEREx data for IRSA is given below. Additional documentation on IRSA’s SIA2 service can be found on the IRSA website.

IRSA’s generic SIA2 endpoint is:

https://irsa.ipac.caltech.edu/SIA?

Users must add a COLLECTION parameter to this endpoint to specify which dataset to search. There are three SPHEREx-related SIA2 collections:

You can use wget or curl to submit SIA2 queries from the command line. For example:

See the section on Python packages to learn how to use Python wrappers around IRSA’s SIA2 service.

Cutouts of SPHEREx Spectral Image MEFs

If you have identified the access URL for an on-premises Spectral Image MEF using SIA2 as described above, you can request a cutout of this MEF by appending a query string containing the center and size parameters. The parameters are described in more detail at https://irsa.ipac.caltech.edu/ibe/cutouts.html.

Example:

curl -o cutout.fits "https://irsa.ipac.caltech.edu/ibe/data/spherex/qr2/level2/2025W19_2B/l2b-v20-2025-247/3/level2_2025W19_2B_0073_2D3_spx_l2b-v20-2025-247.fits?center=156.09328159,-41.64466331&size=0.1"

This cutout service is also invoked by the SPHEREx Data Collection Explorer Spectral Image Search when users select the cutout option upon download.

This cutout service can also be invoked via Python, as illustrated in the Python Tutorial notebook titled Download a collection of SPHEREx Spectral Image cutouts as a multi-extension FITS file. Information on how to work with the PSF extension in these cutouts is documented in the Cutouts of Spectral Image MEFs of this User Guide and demonstrated in the Python Tutorial notebook titled Understanding and Extracting the PSF Extension in a SPHEREx Cutout.

Python packages: PyVO & Astroquery

If you would like to take advantage of IRSA’s SIA2 service for querying SPHEREx images, but prefer to use Python rather than the command line, you may be interested in using one of two Python libraries:

PyVO
This module lets you find and retrieve astronomical data available from archives that support standard IVOA protocols.
Astroquery
This module provides access to IRSA’s public astrophysics data from projects such as SPHEREx, Euclid, Spitzer, WISE/NEOWISE, SOFIA, IRTF, 2MASS, Herschel, IRAS, and ZTF.

Examples of data queries using both of these libraries can be found in IRSA’s Python Notebook Tutorial Repository. For example:

The notebook titled Introduction to SPHEREx Spectral Images shows how to use the Astroquery library to execute an IVOA Simple Image Access (SIA2) query for SPHEREx spectral images that cover the specified coordinates and collection.

The notebook titled Download a collection of SPHEREx Spectral Image cutouts as a multi-extension FITS file demonstrates how to use the PyVO library to execute an IVOA Table Access Protocol (TAP) query for SPHEREx spectral images that cover the specified coordinates and match the specified bandpass.

SPHEREx Data Explorer Web Application

Users who prefer an interactive graphical user interface (GUI) for specifying search constraints, submitting queries, and visualizing the results should consider the SPHEREx Data Explorer, which includes its own context-sensitive help.