Skip to main content

Gravitational Wave utilities in Python

The gravtools module is a complementary module to the existing, well-written libraries pycbc and gwpy. This package began as a few simple utilities, such as constants and date conversion helper functions.

Build Status

Useful Constants

The gravtools package includes some human-readable, enumerated constants for key components of the PyCBC module structure, such as Detector names and Merger parameter names. This is made necessary since PyCBC often relies on a lazy-loading pattern for attributes, using the setattr function to assign attributes to primary classes like Merger. Unfortunately, this makes these attributes uninspectable by most IDEs. Also the names of these attributes are occasionally less-than-legible.

>>> from gravtools import MergerParameters, Observatory
>>> Observatory.LIGOHanford
'H1'

>>> MergerParameters.RadiatedEnergy, MergerParameters.FinalSpin
('E_rad', 'a_final')

Time Conversion

Gravitational wave data uses GPS time format, which is a float number of seconds since the GPS era. The time module in gravtools contains a utility function to convert from GPS time to the builtin datetime.

>>> from gravtools import time
>>> time.gps_to_datetime(1187529241)
datetime.datetime(2017, 8, 23, 13, 14, 20)

Merger Formatting

The Merger class in the PyCBC module doesn't have a clean repr by default. The merger module in the gravtools package includes formatting utilities for Merger objects, mostly for quick inspection and display purposes (for example, in a Jupyter notebook).

>>> from gravtools import merger
>>> from pycbc import catalog
>>> m = catalog.Merger('GW150914')
>>> merger.summary(m)
'Merger[GW150914](Mass1=35.6, Mass2=30.6, FinalSpin=0.69)'

The parameters displayed are configurable as well, using the parameters argument

>>> merger.summary(m, parameters=[MergerParameters.Redshift])
'Merger[GW150914](Redshift=0.09)'

Metadata

Release files for gravtools 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gravtools 0.1.3
File Size Uploaded Provenance Actions
gravtools-0.1.3.tar.gz 4.2 kB Without provenance Details for gravtools-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gravtools 0.1.3
File Interpreter ABI Platform Actions
gravtools-0.1.3-py3-none-any.whl Python 3 none any Details for gravtools-0.1.3-py3-none-any.whl

Total release size: 12.0 kB

Release files / gravtools-0.1.3.tar.gz

Download URL gravtools-0.1.3.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
70c75c4dd70b23935a511a0bb39e1607737e37110a62d5704ff8f9d2b602a9bf
BLAKE2b-256 checksum
How to use checksums
d2679c45005d8e3f0b16d984097ccdd1632cf67163dc4c92cf143e7492fda720
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

Release files / gravtools-0.1.3-py3-none-any.whl

Download URL gravtools-0.1.3-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dff0b8b0d58fd0aeef40336da562942248dffa2cdd17d45cf2ee78595a19adbb
BLAKE2b-256 checksum
How to use checksums
177cee51676df3c3e8eb77c0de5bbd852a69ed4ee3cd96176633a1ab4dec702d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

Security for gravtools 0.1.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page