# ztfquery
[![PyPI](https://img.shields.io/pypi/v/ztfquery.svg?style=flat-square)](https://pypi.python.org/pypi/ztfquery)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345222.svg)](https://doi.org/10.5281/zenodo.1345222)
[![CI](https://github.com/mickaelrigault/ztfquery/actions/workflows/ci.yaml/badge.svg)](https://github.com/mickaelrigault/ztfquery/actions/workflows/ci.yaml)
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).
[cite ztfquery](https://ui.adsabs.harvard.edu/abs/2018zndo...1345222R/abstract)
# 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](https://irsa.ipac.caltech.edu/docs/program_interface/ztf_api.html) that enable to get ztf data _(requires access for full data, but not public data)_:
- Images and pipeline products, e.g. catalog ; See the [`ztfquery.query.py` documentation](doc/query.md)
- LightCurves (not from image subtraction): See the [`ztfquery.lightcurve.py` documentation](doc/lightcurve.md)
- ZTF observing logs: See the [`ztfquery.skyvision.py` documentation](doc/skyvision.md)
- **Marshal/Fritz:**
Download the source information and data, such as lightcurves, spectra, coordinates and redshift:
- from the [ZTF-I Marshal](http://skipper.caltech.edu:8080/cgi-bin/growth/marshal.cgi): See the [`ztfquery.marshal.py` documentation](doc/marshal.md)
- from the [ZTF-II Fritz](https://fritz.science/): See the [`ztfquery.fritz.py` documentation](doc/fritz.md)
- **SEDM Data:** tools to download SEDM data, including IFU cubes and target spectra, from [pharos](http://pharos.caltech.edu)
See the [`ztfquery.sedm.py` documentation](doc/sedm.md)
- **ZTF alert:** Currently only a simple alert reader. See the [`ztfquery.alert.py` documentation](doc/alert.md)
***
# Credits
## Citation
Mickael Rigault. (2018, August 14). ztfquery, a python tool to access ZTF data (Version doi). Zenodo. http://doi.org/10.5281/zenodo.1345222
## Acknowledgments
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)."_
## Corresponding Authors:
- M. Rigault: m.rigault@ipnl.in2p3.fr, CNRS/IN2P3
- S. Reusch: simeon.reusch@desy.de, DESY
***
# Installation
ztfquery requires `python >= 3.8`
## Install the code
using pip: `pip install ztfquery` (favored)
or for the latest version:
go wherever you want to save the folder and then
```bash
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 `~/.bash_profile` or `~/.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.
Use `ztfquery.io.set_account(servicename)` to reset it.
You can also directly provide account settings when running `load_metadata` and `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 `ztfops_auth` parameter.
***
# Quick Examples
Raw data
{
"_id": null,
"home_page": "https://github.com/mickaelrigault/ztfquery",
"name": "ztfquery",
"maintainer": "Mickael Rigault",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "m.rigault@ipnl.in2p3.fr",
"keywords": "astrophysics,science,astronomy,ZTF,IPAC",
"author": "Mickael Rigault",
"author_email": "m.rigault@ipnl.in2p3.fr",
"download_url": "https://files.pythonhosted.org/packages/74/fe/122b8ddea6765484757369003837ba2cb793415a0ca33b37762c345342d2/ztfquery-1.27.1.tar.gz",
"platform": null,
"description": "# ztfquery\n\n[![PyPI](https://img.shields.io/pypi/v/ztfquery.svg?style=flat-square)](https://pypi.python.org/pypi/ztfquery)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345222.svg)](https://doi.org/10.5281/zenodo.1345222)\n[![CI](https://github.com/mickaelrigault/ztfquery/actions/workflows/ci.yaml/badge.svg)](https://github.com/mickaelrigault/ztfquery/actions/workflows/ci.yaml)\n\nThis 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).\n\n[cite ztfquery](https://ui.adsabs.harvard.edu/abs/2018zndo...1345222R/abstract)\n\n# ztfquery: a python tool to access ztf (and SEDM) data\n\n`ztfquery` contains a list of tools:\n- **ZTF products:** a wrapper of the [IRSA web API](https://irsa.ipac.caltech.edu/docs/program_interface/ztf_api.html) that enable to get ztf data _(requires access for full data, but not public data)_:\n\t- Images and pipeline products, e.g. catalog ; See the [`ztfquery.query.py` documentation](doc/query.md)\n\t- LightCurves (not from image subtraction): See the [`ztfquery.lightcurve.py` documentation](doc/lightcurve.md)\n\t- ZTF observing logs: See the [`ztfquery.skyvision.py` documentation](doc/skyvision.md)\n\n- **Marshal/Fritz:** \nDownload the source information and data, such as lightcurves, spectra, coordinates and redshift:\n\t- from the [ZTF-I Marshal](http://skipper.caltech.edu:8080/cgi-bin/growth/marshal.cgi): See the [`ztfquery.marshal.py` documentation](doc/marshal.md)\n\t- from the [ZTF-II Fritz](https://fritz.science/): See the [`ztfquery.fritz.py` documentation](doc/fritz.md)\n\n- **SEDM Data:** tools to download SEDM data, including IFU cubes and target spectra, from [pharos](http://pharos.caltech.edu) \nSee the [`ztfquery.sedm.py` documentation](doc/sedm.md)\n\n- **ZTF alert:** Currently only a simple alert reader. See the [`ztfquery.alert.py` documentation](doc/alert.md)\n\n***\n\n# Credits\n\n## Citation\nMickael Rigault. (2018, August 14). ztfquery, a python tool to access ZTF data (Version doi). Zenodo. http://doi.org/10.5281/zenodo.1345222\n\n## Acknowledgments\nIf you have used `ztfquery` for a research you are publishing, please **include the following in your acknowledgments**:\n_\"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\u00b0759194 - USNAC, PI: Rigault).\"_\n\n## Corresponding Authors:\n- M. Rigault: m.rigault@ipnl.in2p3.fr, CNRS/IN2P3\n- S. Reusch: simeon.reusch@desy.de, DESY\n\n***\n\n# Installation\n\nztfquery requires `python >= 3.8`\n\n## Install the code\nusing pip: `pip install ztfquery` (favored)\n\nor for the latest version:\n\ngo wherever you want to save the folder and then\n```bash\ngit clone https://github.com/MickaelRigault/ztfquery.git\ncd ztfquery\npoetry install\n```\n\n## Set your environment\n\nYou should also create the global variable `$ZTFDATA` (usually in your `~/.bash_profile` or `~/.cshrc`). Data you will download from IRSA will be saved in the directory indicated by `$ZTFDATA` following the IRSA data structure.\n\n## Login and Password storage\nYour credentials will requested the first time you need to access a service (IRSA, Marshal, etc.). They will then be stored, crypted, under ~/.ztfquery. \nUse `ztfquery.io.set_account(servicename)` to reset it.\n\nYou can also directly provide account settings when running `load_metadata` and `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 `ztfops_auth` parameter.\n\n***\n\n# Quick Examples\n\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Python package to access ZTF data",
"version": "1.27.1",
"project_urls": {
"Homepage": "https://github.com/mickaelrigault/ztfquery",
"Repository": "https://github.com/mickaelrigault/ztfquery"
},
"split_keywords": [
"astrophysics",
"science",
"astronomy",
"ztf",
"ipac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "69141f52b27ab404393cdb67a5311d6a7ce1a82413b0108244ef64a5794ac5a8",
"md5": "82e9f2181e91b2dd65a1d1f3c7331f42",
"sha256": "a717ff9bed70d31f3cee7b80baffd9945d6c8bbc669b736b2410251d92c9e6b2"
},
"downloads": -1,
"filename": "ztfquery-1.27.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82e9f2181e91b2dd65a1d1f3c7331f42",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 256829,
"upload_time": "2024-03-05T12:29:17",
"upload_time_iso_8601": "2024-03-05T12:29:17.844351Z",
"url": "https://files.pythonhosted.org/packages/69/14/1f52b27ab404393cdb67a5311d6a7ce1a82413b0108244ef64a5794ac5a8/ztfquery-1.27.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "74fe122b8ddea6765484757369003837ba2cb793415a0ca33b37762c345342d2",
"md5": "7d7dc28e576f99cdd845be3cc8ee5a15",
"sha256": "19801e66e8b33b67feb6bf05886c104c9b96fd5c03fe23e8b1d559f50e67cf0f"
},
"downloads": -1,
"filename": "ztfquery-1.27.1.tar.gz",
"has_sig": false,
"md5_digest": "7d7dc28e576f99cdd845be3cc8ee5a15",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 248467,
"upload_time": "2024-03-05T12:29:20",
"upload_time_iso_8601": "2024-03-05T12:29:20.624335Z",
"url": "https://files.pythonhosted.org/packages/74/fe/122b8ddea6765484757369003837ba2cb793415a0ca33b37762c345342d2/ztfquery-1.27.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-05 12:29:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mickaelrigault",
"github_project": "ztfquery",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ztfquery"
}