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.2

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.2.0.tar.gz (8.0 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.2.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for playgwtc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7b35ac72ceb7ca8001d11051bf13bf29cb883c45be7a01de970508ed039f9ef0
MD5 d436923d6ba178d12800fd053cb11f85
BLAKE2b-256 9ad7ba3467d829367a21abbd68c875d17a257e6c2680192045c73078f7f336f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playgwtc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d15f28397473d3eb84acf81681b21bae6a7284eb5888e13e3d5be1e10730f00
MD5 405aa5cae88498f48cb0dadccb286556
BLAKE2b-256 660e68b0e7d9797d830c35cf8023d9c7cc7b7234d86ac6f921ff584741a6b9a8

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