Skip to main content

A Python package for simulating gravitational wave detector data for mock data challenges.

Project description

gwsim

Python CI pre-commit.ci status Documentation Status codecov PyPI Version Python Versions License Security: bandit DOI

A Python package for generating Mock Data Challenge (MDC) datasets for the gravitational-wave (GW) community. It simulates strain data for detectors like Einstein Telescope, providing a unified interface for reproducible GW data generation.

Features

  • Modular Design: Uses mixins for flexible simulator composition
  • Detector Support: Built-in support for various GW detectors with custom configuration options
  • Waveform Generation: Integrates with PyCBC and LALSuite for accurate signal simulation
  • Noise Models: Supports colored and correlated noise generation (In-Progress)
  • Population Models: Handles injection populations for signals and glitches
  • Data Formats: Outputs in standard GW formats (GWF frames)
  • CLI: Command-line tools for easy simulation workflows

Installation

We recommend using uv to manage virtual environments for installing gwsim.

If you don't have uv installed, you can install it with pip. See the project pages for more details:

  • Install via pip: pip install --upgrade pip && pip install uv
  • Project pages: uv on PyPI | uv on GitHub
  • Full documentation and usage guide: uv docs

Note: The package is built and tested against Python 3.10-3.12. When creating a virtual environment with uv, specify the Python version to ensure compatibility: uv venv --python 3.10 (replace 3.10 with your preferred version in the 3.10-3.12 range). This avoids potential issues with unsupported Python versions.

From PyPI

# Create a virtual environment (recommended with uv)
uv venv gwsim-env --python 3.10
source gwsim-env/bin/activate  # On Windows: gwsim-env\Scripts\activate
uv pip install gwsim

From Source

git clone git@github.com:Leuven-Gravity-Institute/gwsim.git
ce gwsim
# Create a virtual environment (recommended with uv)
uv venv --python 3.10
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install .

Quick Start

Command Line

# Generate simulated data
gwsim simulate config.yaml

Configuration

gwsim uses YAML configuration files for reproducible simulations. See examples/config.yaml for a complete example.

Key configuration sections:

  • globals: Shared parameters (sampling rate, duration, etc.)
  • simulators: List of noise, signal, and glitch generators

Documentation

Full documentation to be available at https://leuven-gravity-institute.github.io/gwsim.

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a merge request

Release Schedule

Releases follow a fixed schedule: every Tuesday at 00:00 UTC, unless an emergent bugfix is required. This ensures predictable updates while allowing flexibility for critical issues. Users can view upcoming changes in the draft release on the GitHub Releases page.

Testing

Run the test suite:

pytest

License

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

Support

For questions or issues, please open an issue on GitHub or contact the maintainers.

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

gwsim-0.3.6.tar.gz (592.8 kB view details)

Uploaded Source

Built Distribution

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

gwsim-0.3.6-py3-none-any.whl (606.0 kB view details)

Uploaded Python 3

File details

Details for the file gwsim-0.3.6.tar.gz.

File metadata

  • Download URL: gwsim-0.3.6.tar.gz
  • Upload date:
  • Size: 592.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gwsim-0.3.6.tar.gz
Algorithm Hash digest
SHA256 d73da3a6b402bfc0c52f52a9896be091b268ff1cb04afc05216f0b1fc092a82a
MD5 85299996a5dc89125dde85490abc0a3a
BLAKE2b-256 4f4b6300529f6e2ba2a1345b30cd9af9290f3cca3e4f54206ca83adf0489d7e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwsim-0.3.6.tar.gz:

Publisher: create_tag.yml on Leuven-Gravity-Institute/gwsim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwsim-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: gwsim-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 606.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gwsim-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 32e0a38cc3b07a76c2fcb9e4b1bcc68d0b7c872e492a3a6fa7d805952bfd0ae9
MD5 46d242f75e549bc7c43cc0dc8bad1a79
BLAKE2b-256 099e6cf19f99781f87f67fd747e50b6dd1fec2716b3ec153e1582829caff515e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwsim-0.3.6-py3-none-any.whl:

Publisher: create_tag.yml on Leuven-Gravity-Institute/gwsim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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