PolPy
polpy is a universal plugin for 3ML developed to analyse polarization data from X-ray/gamma-ray scattering polarimeters. In particular, it is developed to perform polarimetry of high-energy transients, such as gamma-ray bursts (GRBs). It is based polarpy (Burgess, Kole et al. 2019, A&A) tool that was developed for POLAR analysis. It can be used for current and future scattering polarimeters, provided standardized data and response format (docs/Data_and_Response_Format_For_PolPy.pdf) and a defined coordinate convention are followed (docs/Coordinate_Defintions_and_Transforms_For_PolPy.pdf).
Contents
Installation
polpy is available on PyPI and uses modern Python packaging via pyproject.toml. We recommend installing it inside a virtual environment (using conda, venv, or your preferred environment manager) to prevent dependency conflicts.
Standard Installation
To install the latest stable version directly from PyPI, run:
pip install polpy
Package layout
polpy/
├── polpy/
│ ├── poldata.py # PolData: read raw polarization event files, compute PA offset
│ ├── polresponse.py # PolResponse: read + interpolate the polarization response
│ └── polarizationlike.py # PolarizationLike: the 3ML plugin (likelihood, fitting, display)
├── docs/
│ ├── Data_and_Response_Format_For_PolPy.pdf
│ └── Coordinate_Defintions_and_Transforms_For_PolPy.pdf
└── tests/ # pytest unit tests
Data and response file formats
Two reference documents ship with the repo:
docs/Data_and_Response_Format_For_PolPy.pdf— layout of thePOLEVENTSevent FITS extension and the.prspresponse FITS extensions (INEBOUNDS,SABOUNDS,INPAVALS,SPECRESP POLMATRIX,SPECRESP UNPOLMATRIX)docs/Coordinate_Defintions_and_Transforms_For_PolPy.pdf— instrument reference frame, local-tangent-plane frame, and the IAU polarization-angle offset convention used byPolData.get_pa_offset()
License
Authors
Sujay Mate, Hancheng Li, Utkarsh Pathak, Yashowardhan Rai, Nicholas De Angelis, Varun Bhalerao, Merlin Kole.
Metadata
Release files for polpy 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| polpy-1.2.1.tar.gz | 19.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polpy-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.7 kB
Release files / polpy-1.2.1.tar.gz
| Download URL | polpy-1.2.1.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23620a047ccba5877a73f4ea2744535f9b6c03eae75b4e35b43dd5401f461f80
|
|
BLAKE2b-256 checksum How to use checksums |
750f502c2e271b9d6020860fd5847c288b6d5cc5eebf0d74bff627b5c5bdc66b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / polpy-1.2.1-py3-none-any.whl
| Download URL | polpy-1.2.1-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fccc23a546066db4c12adf37b57f08fbeba3a370fca638c14a433febf71968c9
|
|
BLAKE2b-256 checksum How to use checksums |
9ce5f0dd327dfd732ca85b787f82ef2c42baacc7b76503a151ccd24395e415b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log