Skip to main content

A tool to fetch, process, and visualize data for Gravitational Wave events.

Project description

A rectangular badge, half black half purple containing the text made at Code Astro

playgwtc: A Gravitational-Wave Event Plotter

playgwtc is a user-friendly Python command-line tool for fetching, processing, and visualizing data for gravitational-wave events from the Gravitational Wave Open Science Center

This tool allows you to instantly generate high-quality plots, including time-frequency Q-transforms of the raw detector strain data and theoretical waveform models based on the event's physical parameters.

Visual Demonstration

Generate Q-transform plot and theoretical plus and cross polarization strains for any event in the catalog, such as the following example analysis of GW150914:

Key Features

  • Easy Data Fetching: Automatically downloads GW event data from the Gravitational Wave Open Science Center (GWOSC) from a link of the CSV file provided in url.txt file.
  • Q-Transform Plots: Generates detailed time-frequency plots of the actual detector data around the time of the event.
  • Theoretical Waveforms: Produces waveform plots based on established models like IMRPhenomXPHM using the event's published mass, spin, and distance parameters.
  • Flexible & Customizable: Control the plots directly from the command line, with options to change the detector, waveform model, frequency cutoffs, and time windows.
  • High-Quality Output: Uses matplotlib to create publication-ready plots.

Installation

You can install playgwtc using either pip or directly from the source code.

From PyPI (Recommended)

For the stable version, you can install the package directly using pip:

pip install playgwtc==0.1.0

From Source (for Developers)

If you want to install the latest development version or modify the code, you can install from source.

1. Clone the repository:

git clone [https://github.com/DeveshGiri/playgwtc.git](https://github.com/DeveshGiri/playgwtc.git)
cd playgwtc

2. Set up the environment:

It's recommended to use a virtual environment (like conda or venv). Once your environment is activated, install the required dependencies:

pip install -r requirements.txt

3. Install the package:

Install playgwtc in editable mode. This will also set up the command-line tool.

pip install -e .

Usage

The tool is run from the terminal using the playgwtc command. The only required argument is the event name.

Basic Example

To generate the default plots for the famous first detection, GW150914:

playgwtc --event GW150914

This will produce two plots: a Q-transform and a theoretical waveform.

Advanced Example

You can customize the plots using optional arguments. For example, to plot the binary neutron star merger GW170817 using the LIGO-Livingston (L1) detector, a different waveform model (IMRPhenomD), and a lower frequency cutoff of 20 Hz:

playgwtc --event GW170817 --detector L1 --wf_model IMRPhenomD --flow 20

To see all available options, run:

playgwtc --help

Authors

  • Devesh Giri
  • Danielle N Smart
  • Adiba Amira Siddiqa

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

This project makes use of open data from the Gravitational Wave Open Science Center (GWOSC), a service of LIGO Laboratory, the LIGO Scientific Collaboration, and the Virgo Collaboration. We also make use of some open-source libraries including gwpy and pycbc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playgwtc-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

playgwtc-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file playgwtc-0.1.1.tar.gz.

File metadata

  • Download URL: playgwtc-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for playgwtc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 84f98217cb2f150207970d312a80d413b0e53f2545a4e9c33f721ef382201998
MD5 b64aa47acabfc00bb9622b07511dcb5c
BLAKE2b-256 e28d17d81bae70867b52363fde9484ded52907b57dbc89cc035532539602209e

See more details on using hashes here.

File details

Details for the file playgwtc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: playgwtc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for playgwtc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d5c97d4f3dba7587df64450a51eb64710a2f451d87f168ede65ed59f822f734
MD5 32b76f142052ccac596b61a228296301
BLAKE2b-256 8a20ae03825c6b791fd6defa2a77fe8787edaedfbc850e5decb73d18d03d2fa3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page