Metadata-Version: 2.4
Name: gwsim
Version: 0.2.1
Summary: A Python package for simulating gravitational wave detector data for mock data challenges.
Project-URL: Documentation, https://gwsim.readthedocs.io/en/latest/
Project-URL: Source, https://gitlab.et-gw.eu/et-projects/software/gwsim
Project-URL: Tracker, https://gitlab.et-gw.eu/et-projects/software/gwsim/-/issues
Author-email: "Isaac C. F. Wong" <chunfung.wong@kuleuven.be>
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: bilby
Requires-Dist: gengli
Requires-Dist: h5py
Requires-Dist: numpy
Requires-Dist: pycbc
Requires-Dist: pydantic
Requires-Dist: pymap3d
Requires-Dist: tqdm
Requires-Dist: typer
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: flake8; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs; extra == 'docs'
Requires-Dist: mkdocs-gen-files; extra == 'docs'
Requires-Dist: mkdocs-literate-nav; extra == 'docs'
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocs-section-index; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Provides-Extra: test
Requires-Dist: bandit[toml]==1.8.2; extra == 'test'
Requires-Dist: black==25.1.0; extra == 'test'
Requires-Dist: check-manifest==0.50; extra == 'test'
Requires-Dist: flake8; extra == 'test'
Requires-Dist: flake8-bugbear==24.12.12; extra == 'test'
Requires-Dist: flake8-docstrings; extra == 'test'
Requires-Dist: flake8-formatter-junit-xml; extra == 'test'
Requires-Dist: flake8-pyproject; extra == 'test'
Requires-Dist: pre-commit==4.1.0; extra == 'test'
Requires-Dist: pylint-junit; extra == 'test'
Requires-Dist: pylint==3.3.4; extra == 'test'
Requires-Dist: pytest-cov==6.0.0; extra == 'test'
Requires-Dist: pytest-github-actions-annotate-failures; extra == 'test'
Requires-Dist: pytest-mock<3.14.1; extra == 'test'
Requires-Dist: pytest-runner; extra == 'test'
Requires-Dist: pytest==8.3.4; extra == 'test'
Requires-Dist: shellcheck-py==0.10.0.1; extra == 'test'
Description-Content-Type: text/markdown

# gwsim

[![Pipeline](https://gitlab.et-gw.eu/et-projects/software/gwsim/badges/main/pipeline.svg)](https://gitlab.et-gw.eu/et-projects/software/gwsim/-/pipelines)
[![Documentation](https://app.readthedocs.org/projects/gwsim/badge/?version=latest)](https://gwsim.readthedocs.io/en/latest/)
[![Coverage Report](https://gitlab.et-gw.eu/et-projects/software/gwsim/badges/main/coverage.svg)](https://gitlab.et-gw.eu/et-projects/software/gwsim/-/commits/main)
[![PyPI Version](https://img.shields.io/pypi/v/gwsim)](https://pypi.org/project/gwsim/)
[![Python Versions](https://img.shields.io/pypi/pyversions/gwsim)](https://pypi.org/project/gwsim/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.et-gw.eu/et-projects/software/gwsim/-/blob/main/LICENSE)

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 Interface**: 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](https://pypi.org/project/uv/) | [uv on GitHub](https://github.com/astral-sh/uv)
- Full documentation and usage guide: [uv docs](https://docs.astral.sh/uv/)

**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

```bash
# 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

```bash
git clone https://gitlab.et-gw.eu/et-projects/software/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

```bash
# 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 readthedocs.io.

## Contributing

Contributions are welcome!

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

## Testing

Run the test suite:

```bash
pytest
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

For questions or issues, please open an issue on [GitLab](https://gitlab.et-gw.eu/et-projects/software/gwsim/-/issues/new) or contact the maintainers.
