Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] export pydd waveforms to pycbc using the plugin protocol #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahnitz
Copy link

@ahnitz ahnitz commented Jul 31, 2022

I attempted to adapt the https://github.com/adam-coogan/pydd/blob/main/scripts/load_strains_approx.py script in the repo so that one can generate the plus / cross polarizations of the dark dress waveform model easily.

This PR adds in a 'plugin' module which provides the common pycbc waveform generation interface (for td waveforms atm, we could add the interface for fourier domain later also here). This means that when pydd is installed, the waveform models automatically are found by pycbc and can be used within the common interfaces, routines, and programs. Once working, this will allow people to use the PyDD waveform within PE, searches, and create mock data using the model for further study.

Note, that at the moment, there appears to be some convention issue. As I am unable to reproduce the expected waveform behavior in the vacuum waveform limit. I've compared to the TaylorF2 approximant and the phasing / overlap is quite different. It's almost as if the mass scale were incorrect. It's possible that when adapting the script above, I have made a mistake, but if the pydd experts quickly spot the issue, please let me know.

The issue can be seen by running the following if both pydd and pycbc are installed.

from pycbc.waveform import get_td_waveform
from matplotlib import pyplot as plt

common = dict(mass1=1.0, mass2=1.0,
              f_lower=20.0,
              delta_t=1.0/4096)

hp, hc = get_td_waveform(approximant='pydd', system='vacuum', **common)
hp2, hc2 = get_td_waveform(approximant='TaylorF2', **common)

plt.figure(dpi=200)
hp.plot(label='pydd')
hp2.plot(label='TF2')
plt.xlim(-1.0, 0)
plt.legend()

download - 2022-07-31T133552 355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant