SkillAgentSearch skills...

PyEFPE

Waveform model for inspiralling precessing-eccentric compact binaries

Install / Use

/learn @gmorras/PyEFPE
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pyEFPE

pyEFPE is a Python-based post-Newtonian waveform model for inspiralling precessing-eccentric compact binaries.

References

If you use pyEFPE in your research, please cite:

G. Morras, G. Pratten, and P. Schmidt, Improved post-Newtonian waveform model for inspiralling precessing-eccentric compact binaries, Phys.Rev.D 111 (2025) 8, 084052, arXiv:2502.03929.

You can use the following BibTeX entry:

@article{Morras:2025nlp,
    author = "Morras, Gonzalo and Pratten, Geraint and Schmidt, Patricia",
    title = "{Improved post-Newtonian waveform model for inspiralling precessing-eccentric compact binaries}",
    eprint = "2502.03929",
    archivePrefix = "arXiv",
    primaryClass = "gr-qc",
    reportNumber = "IFT-UAM/CSIC-25-12",
    doi = "10.1103/PhysRevD.111.084052",
    journal = "Phys. Rev. D",
    volume = "111",
    number = "8",
    pages = "084052",
    year = "2025"
}

Installation

To install pyEFPE, navigate to the root directory of the repository (where setup.py is located) and run:

pip install .

Getting Started

To generate a frequency-domain waveform using pyEFPE, try the following example:

# Import required packages
import pyEFPE
import numpy as np

# Define binary parameters (for additional details see pyEFPE/waveform/EFPE.py)
params = {
    'mass1': 2.4,       # Mass of companion 1 (solar masses)
    'mass2': 1.2,       # Mass of companion 2 (solar masses)
    'e_start': 0.7,     # Initial eccentricity
    'spin1x': -0.44,    # Spin components of companion 1
    'spin1y': -0.26,
    'spin1z': 0.48,
    'spin2x': -0.31,    # Spin components of companion 2
    'spin2y': 0.01,
    'spin2z': -0.84,
    'inclination': 1.57,# Initial binary inclination (radians)
    'f22_start': 10,    # Starting (simulation) waveform frequency of GW 22 mode (Hz)
}

# Initialize pyEFPE waveform model
wf = pyEFPE.pyEFPE(params)

# Define frequency array for waveform generation
freqs = np.arange(20, 1024, 1/128)

# Compute frequency-domain gravitational wave polarizations
hp_fd, hc_fd = wf.generate_waveform(freqs)

You can generate a time-domain waveform as in the following example:

# Define time array for waveform generation
times = np.arange(wf.return_start_time(), wf.return_end_time(), 1/2048)

# Compute time-domain gravitational wave polarizations
hp_td, hc_td = wf.generate_tdomain_waveform(times)

You can visualize the waveforms using the following code:

from matplotlib import pyplot as plt

# Plot of frequency-domain polarizations
plt.figure()
plt.loglog(freqs, np.abs(hp_fd), 'C0-', label=r'$|\tilde{h}_+|$')
plt.loglog(freqs, np.abs(hc_fd), 'C1-', label=r'$|\tilde{h}_\times|$')
plt.xlabel(r'$f$ [Hz]')
plt.ylabel(r'Frequency domain strain $[\mathrm{Hz}^{-1}]$')
plt.legend()

# Plot of time-domain polarizations
plt.figure()
plt.plot(times, hp_td, 'C0-', label=r'$h_+$')
plt.plot(times, hc_td, 'C1-', label=r'$h_\times$')
plt.xlabel(r'$t$ [s]')
plt.ylabel(r'Time domain strain')
plt.legend()
plt.show()

Repository Overview

The installable waveform model is located in the pyEFPE/ folder, while the Tests/ folder contains various examples and tests of the waveform. Most notably, the Tests/model_validation/ directory contains the scripts used to generate most of the model-validation figures from the pyEFPE paper, and the Tests/test_theory/ directory contains Mathematica notebooks and Python scripts used to validate some of the post-Newtonian expressions that the model is based on.

Feedback & Issues

We welcome feedback, bug reports, and feature requests! If you encounter any issues or have suggestions for improvements, please open an issue in the GitHub issue tracker.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Related Skills

View on GitHub
GitHub Stars21
CategoryDevelopment
Updated8d ago
Forks9

Languages

Wolfram Language

Security Score

90/100

Audited on Mar 24, 2026

No findings