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.1.2.tar.gz (6.8 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.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: playgwtc-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 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.2.tar.gz
Algorithm Hash digest
SHA256 1fb2a2862e45d7c7e94087a2ed2c5ca66e295be4c518893ddb9fc3967e62ac37
MD5 e85b25da434a325656b75df130603a18
BLAKE2b-256 c4c814e43034f3a3879415347a5a3641872bbe31c87228c73876c9650d30315e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playgwtc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4b49fb283d9d5832e6fc1980ae3695656600b0750f11f0eccef3a95255cddb3
MD5 d42acd47993a72fcf0bb957a89a63583
BLAKE2b-256 598a9b32dee5df0cc0f1fe3e073d8de23f784285d8664341ba17a774386e649d

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