ztfquery is a Python package designed to facilitate querying and accessing data from the Zwicky Transient Facility (ZTF). It provides tools to interact with various data sources, including IRSA and ALeRCE, to streamline workflows for astronomers and researchers.
The query_irsa module is being developed to enable seamless querying of ZTF data hosted on the Infrared Science Archive (IRSA). Once completed, it will support:
- Searching for ZTF observations based on user-defined criteria.
- Downloading light curves and image data.
- Filtering and organizing results for further analysis.
Stay tuned for updates as this feature is actively being worked on.
The alerce_query module is fully functional and allows users to interact with the ALeRCE broker. Key features include:
- Querying ZTF alerts processed by ALeRCE.
- Accessing pre-processed light curves and classifications.
- Integration with machine learning-based classifications provided by ALeRCE.
This module is ready for use and can be integrated into your workflows.
To install ztfquery, clone the repository and install the dependencies:
git clone https://github.com/anirudhsalundi/ztfquery.git
cd ztfquery
pip install -r requirements.txtor if you prefer using uv:
git clone https://github.com/anirudhsalundi/ztfquery.git
cd ztfquery
uv pip install -r requirements.txtBelow is a brief overview of how to use the querying functionalities for both ALeRCE and IRSA. For detailed documentation and examples, please refer to the respective module directories.
- README for ALeRCE: alerce_query/README.md
- README for IRSA: query_irsa/README.md
Bulk data can be requested through the ALeRCE API. To download data for a list of RA/Dec coordinates, use the alerce_query/alerce_query.py script. The input should be a csv file with RA and Dec values, and the output will be saved in the specified directory. Example usage:
python alerce_query.py ../test_coords.csv # or use your own csv file with RA/Dec coordinatesif you use uv:
uv run alerce_query.py ../test_coords.csv # or use your own csv file with RA/Dec coordinatesmore details and options can be found by running:
python alerce_query.py --helpor with uv:
uv run alerce_query.py --helpThe query_irsa module is under development. You can still query for alerts through query_irsa/main.py. Documentation and examples will be provided once it is fully ready.
Contributions are welcome! If you'd like to contribute to the development of ztfquery, please:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description of your changes.
Please ensure that your code adheres to the existing style and includes appropriate tests.
For questions or feedback, please open an issue on the GitHub repository or contact the maintainer at anirudhsalgundi@gmail.com