Waveform generator for IMRPhenom models
Project description
phenomxpy
Python implementation of the IMRPhenomT family of waveform models.
Available both for CPU and GPU.
The CPU version is accelerated with numba by default, the GPU version with cupy.
The parallelization happens at the level of the time array since each time point is independent.
Installation
git clone https://gitlab.com/imrphenom-dev/phenomxpy.git
cd phenomxpy
pip install .
Simple usage
import phenomxpy
# Initialize approximant class
# Available approximants are: IMRPhenomT, IMRPhenomTHM, IMRPhenomTP, IMRPhenomTPHM
phen = IMRPhenomTHM(eta=..., total_mass=..., s1=...., s2=..., f_lower=..., option1=..., option2=...)
# Compute time domain polarizations
hp, hc = phen.compute_polarizations(times)
# Compute Fourier domain polarizations
hpf, hcf, frequencies = phen.compute_fd_polarizations(times)
# Compute individual modes (in time domain)
hlms = phen.compute_hlms(times)
# In the case of precessing approximants, can compute modes in different frames
hlms = phen.compute_CPmodes(times)
hlms = phen.compute_Jmodes(times)
hlms = phen.compute_L0modes(times)
The time array times can be a custom array. If None, then it computes an equispaced array with delta_t given in the class initialization.
If total_mass is not provided it assumes input arguments in NR units (i.e. f_lower, delta_t in mass units) and returns the waveform in NR units.
If total_mass and distance are provided, it returns the waveform in SI units.
NOTE: Fourier domain only support SI units.
IMRPhenomT class details
An instance of the IMRPhenomT class initializes the amplitude and phase coefficients of the ansatzes. In this step there is no evaluation on any time array.
phen = IMRPhenomT(waveform parameters and options)
One can generate the hlm mode and the polarizations in a custom time array as
phen.compute_hlm(times)
phen.compute_polarizations(times)
In the initialization of PhenomT, the structures needed for the amplitude and phase coefficients are also initialized:
IMRPhenomT
- pWF
- pPhase
- pAmp
For the initialization of these clases, we employ "internal" methods denoted with an initial underscore, e.g. _set_inspiral_coefficients(). These methods are only employed in the initialization and only called by the __init__ method.
These classes also define the ansatzes for each region, which can be evaluated in a custom time array. E.g.:
pAmp.inspiral_ansatz(times)
pAmp.intermediate_ansatz(times)
pAmp.ringdown_ansatz(times)
and for the full imr region that is a piecewise function of the ansatzes above:
pAmp.imr_amplitude(times)
For the phase and frequency we have e.g.:
pPhase.inspiral_ansatz(times)
pPhase.inspiral_ansatz_omega(times)
pPhase.imr_phase(times)
pPhase.imr_omega(times)
If times=None, then an internally computed equispaced array is used.
The pAmp.imr_amplitude and pPhase.imr_phase are called when evaluating phen.compute_hlm.
Manual docs built
- sphinx-quickstart
- sphinx-apidoc -o source/ ../phenomxpy
- Add extensions and them to the generated conf.py
- Add modules or other content to index.rst
- make html
Authors and acknowledgment
Cecilio García Quirós
If you use phenomxpy please cite
@misc{garcíaquirós2025gpuacceleratedlisaparameterestimation,
title={GPU-accelerated LISA parameter estimation with full time domain response},
author={Cecilio García-Quirós and Shubhanshu Tiwari and Stanislav Babak},
year={2025},
eprint={2501.08261},
archivePrefix={arXiv},
primaryClass={gr-qc},
url={https://arxiv.org/abs/2501.08261},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phenomxpy-0.1.1.tar.gz.
File metadata
- Download URL: phenomxpy-0.1.1.tar.gz
- Upload date:
- Size: 790.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32fa13f1fcae071bd2177a3c82d274a5785114457ea82ff0ec01e57cc4c164e1
|
|
| MD5 |
76ca3f30619a76a1f0952893d28f068c
|
|
| BLAKE2b-256 |
c745e32733289d554db217a7657e12cbd975eb95d80ab55241cad6a18d7640d3
|
File details
Details for the file phenomxpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: phenomxpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 114.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b0459d3073422d184344996c2d144c1df86043a658fa66bf5ba1b49cd9016f5
|
|
| MD5 |
57c2aa67bba1e2349dbc1c4bfe63fd4e
|
|
| BLAKE2b-256 |
e0fb8652f8b00f5727bf035d191f564a7a5d5bc5764db655a8d994babae1b69f
|