ztfquery is a Python library maintained by M. Rigault (CNRS/IN2P3) and S. Reusch (DESY) that provides a unified interface to the Zwicky Transient Facility (ZTF) data ecosystem. Whether you need science images from IRSA, photometric light curves, spectra from Fritz or the Marshal, SEDM IFU cubes, or observing logs, ztfquery wraps the underlying web APIs so you can focus on your science.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MickaelRigault/ztfquery/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install ztfquery with pip and configure your environment in minutes.
Authentication
Set up credentials for IRSA, Fritz, Marshal, and Pharos securely.
Query IRSA
Search ZTF science images, raw data, and reference images via the IRSA API.
Fritz Integration
Download light curves, spectra, alerts, and source data from Fritz (SkyPortal).
What ztfquery provides
ztfquery covers the full ZTF data ecosystem through dedicated modules:IRSA Query
Metadata queries and data download for science, raw, reference, and calibration products.
Light Curves
Retrieve IRSA epochal catalog light curves by sky position or source ID.
Fritz / SkyPortal
Access photometry, spectra, alerts, and group sources from fritz.science.
Marshal
Query the ZTF-I Growth Marshal for target tables, spectra, and light curves.
SEDM Spectroscopy
Download SEDM IFU cubes and extracted spectra from the Pharos archive.
Alerts
Load and visualise ZTF alert packets in Avro format.
Observing Logs
Access ZTF nightly observing logs via SkyVision’s CompletedLog.
Field Tools
Work with ZTF field geometry, CCD/quadrant layouts, and sky visualisation.
Get started in three steps
Install ztfquery
Set up credentials
On the first call to any authenticated service, ztfquery will prompt for your username and password and store them encrypted in
~/.ztfquery. You can also set them programmatically:If you use ztfquery in published research, please cite Rigault 2018 and include the ERC acknowledgment text described in the Introduction.