Skip to main content

A package to perform model-independent polarization test of gravitational-wave signals.

Project description

nullpol

CI Documentation Status codecov PyPI Version Python Versions License: GPL-3.0-or-later Ruff SPEC 0 — Minimum Supported Dependencies

A Python package for model-independent polarization tests of gravitational-wave (GW) signals. Built on bilby and bilby_pipe, nullpol automates reproducible parameter-estimation workflows for testing alternative GW polarizations.

Features

  • Model-agnostic polarization tests: Framework for scalar-tensor and related polarization hypotheses
  • bilby integration: Extends bilby and bilby_pipe for likelihood-based inference
  • Injection workflows: Tools for generating and studying simulated signals
  • Time-frequency filtering: Sample-based filter construction for analysis
  • HTCondor support: DAG generation for batch submission on compute clusters
  • Asimov integration: Optional pipeline hooks for LIGO workflow automation
  • CLI: Command-line tools for injections, filtering, and end-to-end pipelines

Installation

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

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.12–3.14. When creating a virtual environment with uv, specify the Python version to ensure compatibility: uv venv --python 3.12.

From PyPI

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

Optional Asimov integration:

uv pip install nullpol[asimov]

From Source

git clone https://github.com/isaac-cf-wong/nullpol.git
cd nullpol
# Create a virtual environment (recommended with uv)
uv venv --python 3.12
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv sync

For development, install all dependency groups:

uv sync --all-groups

Quick Start

Command Line

Write an ini configuration file and run the main pipeline:

# Generate a default configuration template
nullpol_pipe_write_default_ini --outdir ./config

# Build (and optionally submit) the analysis DAG
nullpol_pipe config.ini
nullpol_pipe config.ini --submit

Other command-line tools:

nullpol_create_injection --help
nullpol_create_time_frequency_filter_from_sample --help
nullpol_pipe_analysis --help
nullpol_pipe_generation --help
nullpol_get_asimov_yaml --help

See the examples/ directory for scalar-tensor injection studies and template configurations.

Configuration

nullpol uses INI configuration files in the bilby_pipe style. A typical workflow starts with nullpol_pipe_write_default_ini, then edits the generated template before passing it to nullpol_pipe.

Key workflow stages:

Stage Tool Purpose
Injection nullpol_create_injection Generate simulated signals for polarization tests
Generation nullpol_pipe_generation Produce strain data for analysis
Analysis nullpol_pipe_analysis Run parameter estimation on generated data
Orchestration nullpol_pipe Build and submit the full HTCondor DAG

See the documentation for injection setups, priors, and polarization-specific options.

Documentation

Full documentation is available at https://isaac-cf-wong.github.io/nullpol/.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md and CODE_OF_CONDUCT.md.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes and add tests
  4. Run uv run pytest
  5. Submit a pull request

Testing

Run the test suite:

uv run pytest

License

This project is licensed under GPL-3.0-or-later. See the LICENSE file for the full license text.

Citation

If you use nullpol in your research, please cite:

@software{nullpol,
  title={nullpol: Model-independent polarization test of gravitational-wave signals},
  author={Wong, Isaac C.F. and Ng, Thomas and Cirok, Balázs},
  url={https://github.com/isaac-cf-wong/nullpol},
  year={2025}
}

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

nullpol-0.2.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

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

nullpol-0.2.0-py3-none-any.whl (121.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nullpol-0.2.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nullpol-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e4f374b9fad514e766690f47c8542844c8695fbba4eb9c442e1dff8deb94d96e
MD5 733abb50e19f6758eb762c2921fd3c80
BLAKE2b-256 83dd8121a8f4d2d13bdfe12ff1e27818a11050ee7daacd87aace1e9445183011

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nullpol-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 121.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nullpol-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3d50cb54392b1e1cd8a1ccde6d715bf8200fb61ce7c46db4d92cc8742692118
MD5 6ade4398383563824c7f58440d8dbe63
BLAKE2b-256 ad8da98d328c3ed730b9813a028ea43b589d260e721913403f2e0fc38b210d16

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