Skip to main content

Multi-PTA pulsar timing data combination framework for gravitational wave detection

Project description

MetaPulsar Logo

MetaPulsar

Python 3.9+ DOI License: MIT Code style: black Tests

A framework for combining pulsar timing data from multiple PTA collaborations into unified "metapulsar" objects for gravitational wave detection analysis.

Features

  • Multi-PTA Data Combination: Combine data from EPTA, PPTA, NANOGrav, MPTA, and other PTAs
  • Enterprise Integration: Full compatibility with the Enterprise pulsar timing analysis package
  • Dual Timing Package Support: Works with both PINT and libstempo/tempo2
  • Flexible Parameter Management: Support for "consistent" and "composite" combination strategies

Quick Start

Installation

git clone https://github.com/vhaasteren/metapulsar.git
cd metapulsar
pip install -e .

# With optional dependencies
pip install -e ".[dev,libstempo]"

Basic Usage

from metapulsar import create_metapulsar

# Create MetaPulsar
metapulsar = create_metapulsar(
    file_data=pulsar_data,
    combination_strategy="consistent",
    combine_components=["astrometry", "spindown", "binary", "dispersion"],
    add_dm_derivatives=True,
)

# Access combined data
print(f"Number of TOAs: {len(metapulsar.toas)}")
print(f"PTA names: {list(metapulsar._pulsars.keys())}")

Documentation

Examples

Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=src/metapulsar

Troubleshooting

Debug Mode

import loguru
import sys
loguru.logger.remove()
loguru.logger.add(sys.stdout, level="DEBUG")

Dependencies

  • Python 3.9+
  • numpy ≥ 1.20.0
  • astropy ≥ 5.0.0
  • scipy ≥ 1.7.0
  • pint-pulsar ≥ 0.9.0
  • enterprise-pulsar ≥ 3.0.0

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

License

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

Citation

If you use this software in your research, please cite:

@software{metapulsar,
  title={MetaPulsar},
  author={van Haasteren, Rutger and Yu, Wang-Wei and Wright, David},
  year={2025},
  doi={10.5281/zenodo.17626664},
  url={https://github.com/vhaasteren/metapulsar},
  license={MIT}
}

Authors

Support

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

metapulsar-0.9.3.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

metapulsar-0.9.3-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

Details for the file metapulsar-0.9.3.tar.gz.

File metadata

  • Download URL: metapulsar-0.9.3.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metapulsar-0.9.3.tar.gz
Algorithm Hash digest
SHA256 6009b9d8768aa43a64fbb0a1eceed3fb8ea5915c466302802a0b6b5bfd0d71a9
MD5 226de7c58b2740a0ab11312e0b7317e1
BLAKE2b-256 eeaedaa01ca5480fd8307a1c819b69cc559adac2dfa436609ca5a7dd2e480f4f

See more details on using hashes here.

File details

Details for the file metapulsar-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: metapulsar-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 73.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metapulsar-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e2c4cc0552eadf7ea2bf428461bc0394988e48f6e1617f037662e6a8554e188
MD5 4d7ca5a184ea12399e4e0a165ac08e0b
BLAKE2b-256 ae666bd4536a4250dd5fac919b792c32730ac37210e5c13fe376e899a5386f24

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