From 8f0c2ce5638bf3e25fdb20946021067e19e503b5 Mon Sep 17 00:00:00 2001 From: Yifan Wang <yifan.wang@aei.mpg.de> Date: Mon, 9 Aug 2021 23:50:10 +0200 Subject: [PATCH] upload NRSur7dq4 + birefringence --- NRSur7dq4Parity/parity_NR.py | 19 +++++++++++++++++++ NRSur7dq4Parity/setup.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 NRSur7dq4Parity/parity_NR.py create mode 100644 NRSur7dq4Parity/setup.py diff --git a/NRSur7dq4Parity/parity_NR.py b/NRSur7dq4Parity/parity_NR.py new file mode 100644 index 0000000..52f1c9a --- /dev/null +++ b/NRSur7dq4Parity/parity_NR.py @@ -0,0 +1,19 @@ +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="NRSur7dq4", **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 + +def add_me(**kwds): + kwds['cpu_fd']['NRSur7dq4Parity'] = gen +# kwds['filter_time_lengths']['IMRPhenomPv2Parity'] = kwds['filter_time_lengths']['IMRPhenomPv2'] + diff --git a/NRSur7dq4Parity/setup.py b/NRSur7dq4Parity/setup.py new file mode 100644 index 0000000..b800501 --- /dev/null +++ b/NRSur7dq4Parity/setup.py @@ -0,0 +1,32 @@ +""" +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)', + ], +) -- GitLab