diff --git a/birefringence-waveform/__init__.py b/birefringence-waveform/__init__.py deleted file mode 100644 index 287ff9f759c477ab0aa43620d7cd937bc39e7459..0000000000000000000000000000000000000000 --- a/birefringence-waveform/__init__.py +++ /dev/null @@ -1 +0,0 @@ -import .birefringence_waveform diff --git a/birefringence-waveform/birefringence_waveform.py b/birefringence-waveform/birefringence_waveform.py deleted file mode 100644 index bc2bd7dd956d8935de923cbcd64617961cd405a8..0000000000000000000000000000000000000000 --- a/birefringence-waveform/birefringence_waveform.py +++ /dev/null @@ -1,21 +0,0 @@ -from pycbc.waveform import get_fd_waveform -#import numpy as np -#import pycbc.conversions -import lal -import pycbc.waveform - -def IMRPhenomParity(parity_Amu, **kwds): - - if 'approximant' in kwds: - kwds.pop("approximant") - hp, hc = get_fd_waveform(approximant="IMRPhenomXPHM", **kwds) - - temp = parity_Amu / 1e9 / lal.QE_SI * lal.H_SI * lal.PI * lal.PI / lal.H0_SI - - hp_parity = hp + hc * temp * hp.sample_frequencies **2 - hc_parity = hc - hp * temp * hp.sample_frequencies **2 - - return hp_parity, hc_parity - - -pycbc.waveform.add_custom_waveform('IMRPhenomParity', IMRPhenomParity, 'frequency', force=True) diff --git a/waveform/IMRPhenomParity.py b/waveform/IMRPhenomParity.py new file mode 100644 index 0000000000000000000000000000000000000000..5f962cfd9f3d78704d765fd3241e216c3e68c53a --- /dev/null +++ b/waveform/IMRPhenomParity.py @@ -0,0 +1,22 @@ +def genIMRPhenomParity(**kwds): + from pycbc.waveform import get_fd_waveform + import lal + + if 'approximant' in kwds: + kwds.pop("approximant") + hp, hc = get_fd_waveform(approximant="IMRPhenomXPHM", **kwds) + + temp = kwds['parity_Amu'] / 1e9 / lal.QE_SI * lal.H_SI * lal.PI * lal.PI / lal.H0_SI + + hp_parity = hp + hc * temp * hp.sample_frequencies **2 + hc_parity = hc - hp * temp * hp.sample_frequencies **2 + + return hp_parity, hc_parity + + +#pycbc.waveform.add_custom_waveform('IMRPhenomParity', IMRPhenomParity, 'frequency', force=True) + +def add_me(**kwds): + kwds['cpu_fd']['IMRPhenomParity'] = genIMRPhenomParity + kwds['filter_time_lengths']['IMRPhenomParity'] = kwds['filter_time_lengths']['IMRPhenomXPHM'] + diff --git a/waveform/__init__.py b/waveform/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3943644cbd5d2373079f43478260c7a25b2de90d --- /dev/null +++ b/waveform/__init__.py @@ -0,0 +1 @@ +from .IMRPhenomParity import *