Skip to content
Snippets Groups Projects
Commit daec275a authored by Yifan Wang's avatar Yifan Wang
Browse files

add another parametrization to solve the degeneracy issue

parent a77d0762
Branches
No related tags found
No related merge requests found
def gen(**kwds):
from pycbc.waveform import get_fd_waveform
import lal
if 'approximant' in kwds:
kwds.pop("approximant")
hp, hc = get_fd_waveform(approximant="IMRPhenomD_NRTidal", **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']['IMRPhenomD_NRTidal_Parity'] = gen
kwds['filter_time_lengths']['IMRPhenomD_NRTidal_Parity'] = kwds['filter_time_lengths']['IMRPhenomD']
"""
setup.py file for testing birefringence pycbc waveform plugin package
"""
from setuptools import Extension, setup, Command
from setuptools import find_packages
VERSION = '0.0.dev0'
setup (
name = 'pycbc-birefringence-NR',
version = VERSION,
description = 'An waveform plugin for PyCBC',
author = 'Yifan Wang',
author_email = 'yifan.wang@aei.mpg.de',
url = 'http://www.pycbc.org/',
#download_url = 'https://github.com/gwastro/revchirp/tarball/v%s' % VERSION,
keywords = ['pycbc', 'signal processing', 'gravitational waves'],
py_modules = ['parity_NR'],
entry_points = {"pycbc.waveform.fd":"NRSur7dq4Parity=parity_NR:gen"},
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Physics',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
],
)
File moved
File moved
File moved
from .IMRPhenomParity import *
File moved
......@@ -8,7 +8,7 @@ from setuptools import find_packages
VERSION = '0.0.dev0'
setup (
name = 'pycbc-birefringence-XPHM',
name = 'pycbc-birefringence-amudistance',
version = VERSION,
description = 'A waveform plugin for PyCBC',
author = 'Yifan Wang',
......@@ -16,8 +16,8 @@ setup (
url = 'http://www.pycbc.org/',
#download_url = 'https://github.com/gwastro/revchirp/tarball/v%s' % VERSION,
keywords = ['pycbc', 'signal processing', 'gravitational waves'],
py_modules = ['parity_XPHM'],
entry_points = {"pycbc.waveform.fd":"IMRPhenomXPHMParity=parity_XPHM:gen"},
py_modules = ['amudistance'],
entry_points = {"pycbc.waveform.fd":"amudistance=waveform:gen"},
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
......
def gen(**kwds):
from pycbc.waveform import get_fd_waveform
import lal
#print(kwds)
if 'approximant' in kwds:
kwds.pop("approximant")
hp, hc = get_fd_waveform(approximant="NRSur7dq4", **kwds)
temp = kwds['parity_amu'] / 1e9 / lal.QE_SI * lal.H_SI * lal.PI * lal.PI / lal.H0_SI
if kwds['baseapprox'] is None:
raise ValueError("A base waveform approximant is required.")
hp, hc = get_fd_waveform(approximant=kwds['baseapprox'], **kwds)
temp = kwds['parity_amudistance'] * kwds['distance'] / 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
def add_me(**kwds):
kwds['cpu_fd']['NRSur7dq4Parity'] = gen
# kwds['filter_time_lengths']['IMRPhenomPv2Parity'] = kwds['filter_time_lengths']['IMRPhenomPv2']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment