PyEFPE
Waveform model for inspiralling precessing-eccentric compact binaries
Install / Use
/learn @gmorras/PyEFPEREADME
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
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
