Python package to access ZTF data
This package is made to ease access to Zwicky Transient Facility data and data-products. It is maintained by M. Rigault (CNRS/IN2P3) and S. Reusch (DESY).
ztfquery: a python tool to access ztf (and SEDM) data
ztfquery contains a list of tools:
ZTF products: a wrapper of the IRSA web API that enable to get ztf data (requires access for full data, but not public data):
Marshal/Fritz: Download the source information and data, such as lightcurves, spectra, coordinates and redshift:
ZTF alert: Currently only a simple alert reader. See the
Mickael Rigault. (2018, August 14). ztfquery, a python tool to access ZTF data (Version doi). Zenodo. http://doi.org/10.5281/zenodo.1345222
If you have used
ztfquery for a research you are publishing, please include the following in your acknowledgments:
"The ztfquery code was funded by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement n°759194 - USNAC, PI: Rigault)."
python >= 3.8
Install the code
pip install ztfquery (favored)
or for the latest version:
go wherever you want to save the folder and then
git clone https://github.com/MickaelRigault/ztfquery.git cd ztfquery poetry install
Set your environment
You should also create the global variable
$ZTFDATA (usually in your
~/.cshrc). Data you will download from IRSA will be saved in the directory indicated by
$ZTFDATA following the IRSA data structure.
Login and Password storage
Your credentials will requested the first time you need to access a service (IRSA, Marshal, etc.). They will then be stored, crypted, under ~/.ztfquery.
ztfquery.io.set_account(servicename) to reset it.
You can also directly provide account settings when running
download_data using the
auth=[your_username, your_password] parameter. Similarly, directly provide the username and password to the ztf ops page when loading
NightSummary using the
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for ztfquery-1.26.1-py3-none-any.whl