Skip to content

Commit

Permalink
bug fixes and checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekatz04 committed Nov 27, 2021
1 parent 66717d9 commit f1ed845
Show file tree
Hide file tree
Showing 29 changed files with 343 additions and 412 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
### Designed for LISA data analysis of Massive Black Hole Binaries.


This package implements GPU/CPU agnostic Massive Black Hole Binary waveforms and likelihood computations from [arXiv:2005.01827](https://arxiv.org/abs/2005.01827) and [arXiv:2111.01064](https://arxiv.org/abs/2111.01064). The various parts of this package are arranged to be modular as waveform or response changes or improvements are made. Generally, the modules fall into four categories: waveforms, response, waveform building, and utilities. Please see the [documentation](https://mikekatz04.github.io/BBHx/) for further information on these modules. The code can be found on Github [here](https://github.com/mikekatz04/BBHx). The data necessary for various modules in this package will automatically download the first time it is needed. If you would like to view the data, it can be found on [Zenodo](https://zenodo.org/record/3981654#.XzS_KRNKjlw).
This package implements GPU/CPU agnostic Massive Black Hole Binary waveforms and likelihood computations from [arXiv:2005.01827](https://arxiv.org/abs/2005.01827) and [arXiv:2111.01064](https://arxiv.org/abs/2111.01064). The various parts of this package are arranged to be modular as waveform or response changes or improvements are made. Generally, the modules fall into four categories: waveforms, response, waveform building, and utilities. Please see the [documentation](https://mikekatz04.github.io/BBHx/) for further information on these modules. The code can be found on Github [here](https://github.com/mikekatz04/BBHx).

This package is a part of the LISA Analysis Tools environment.

If you use all or any parts of this code, please cite [arXiv:2005.01827](https://arxiv.org/abs/2005.01827) and [arXiv:2111.01064](https://arxiv.org/abs/2111.01064). See the [documentation](https://bhptoolkit.org/FastEMRIWaveforms/) to properly cite specific modules.
If you use this software please cite [arXiv:2005.01827](https://arxiv.org/abs/2005.01827), [arXiv:2111.01064](https://arxiv.org/abs/2111.01064), and the associated [Zenodo page](https://zenodo.org/record/5730688#.YaFvRkJKhTY) Please also cite any consituent parts used like the response function or waveforms. See the `citation` attribute for each class or docstring for functions for more information.

## Getting Started

Expand Down Expand Up @@ -135,7 +135,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags).
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/mikekatz04/BBHx/tags).

Current Version: 1.0.0

Expand Down
4 changes: 2 additions & 2 deletions bbhx/likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(

@property
def citation(self):
return katz_1 + katz_2
return katz_citations

def get_ll(
self,
Expand Down Expand Up @@ -361,7 +361,7 @@ def __init__(
@property
def citation(self):
"""Citations for this class"""
return katz_1 + katz_2 + Cornish_Heterodyning + Rel_Bin_citation
return katz_citations + Cornish_Heterodyning + Rel_Bin_citation

def init_heterodyne_info(
self,
Expand Down
2 changes: 1 addition & 1 deletion bbhx/response/fastfdresponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, TDItag="AET", order_fresnel_stencil=0, use_gpu=False):
@property
def citation(self):
"""Return citations for this class"""
return katz_1 + katz_2 + marsat_1 + marsat_2
return katz_citations + marsat_1 + marsat_2

def _sanity_check_modes(self, ells, mms):
"""Make sure modes are allowed"""
Expand Down
14 changes: 11 additions & 3 deletions bbhx/utils/citations.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
attribute.
"""

katz_1 = """
katz_citations = """
@article{Katz:2020hku,
author = "Katz, Michael L. and Marsat, Sylvain and Chua, Alvin J. K. and Babak, Stanislav and Larson, Shane L.",
title = "{GPU-accelerated massive black hole binary parameter estimation with LISA}",
Expand All @@ -37,9 +37,7 @@
pages = "023033",
year = "2020"
}
"""
katz_2 = """
@article{Katz:2021uax,
author = "Katz, Michael L.",
title = "{A fully-automated end-to-end pipeline for massive black hole binary signal extraction from LISA data}",
Expand All @@ -49,6 +47,16 @@
month = "11",
year = "2021"
}
@article{michael katz_2021,
title={mikekatz04/BBHx: First official public release},
DOI={10.5281/zenodo.5730688},
abstractNote={No description provided.},
publisher={Zenodo},
author={Michael Katz},
year={2021},
month={Nov}
}
"""

marsat_1 = """
Expand Down
3 changes: 1 addition & 2 deletions bbhx/utils/interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
try:
import cupy as xp
from pyInterpolate import interpolate_wrap as interpolate_wrap_gpu
from pyInterpolate import interpolate_TD_wrap as interpolate_TD_wrap_gpu


except (ImportError, ModuleNotFoundError) as e:
print("No CuPy or GPU interpolation available.")
import numpy as xp

from pyInterpolate_cpu import interpolate_wrap as interpolate_wrap_cpu
from pyInterpolate_cpu import interpolate_TD_wrap as interpolate_TD_wrap_cpu

from bbhx.utils.constants import *

Expand Down
9 changes: 2 additions & 7 deletions bbhx/waveformbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def template_channels(self):
@property
def citation(self):
"""citations for this class"""
return katz_1 + katz_2
return katz_citations

def __call__(
self,
Expand Down Expand Up @@ -299,12 +299,7 @@ def __init__(
def citation(self):
"""Citations for this class"""
return (
katz_1
+ katz_2
+ marsat_1
+ marsat_2
+ phenomhm_citation
+ phenomd_citations
katz_citations + marsat_1 + marsat_2 + phenomhm_citation + phenomd_citations
)

def __call__(
Expand Down
2 changes: 1 addition & 1 deletion bbhx/waveforms/phenomhm.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self, use_gpu=False, run_phenomd=False, mf_min=1e-4, mf_max=0.6):
@property
def citation(self):
"""Return citations for this class"""
return katz_1 + katz_2 + phenomhm_citation + phenomd_citations
return katz_citations + phenomhm_citation + phenomd_citations

def _init_phenomd_fring_spline(self):
"""Prepare PhenomD fring and fdamp splines"""
Expand Down
Binary file modified docs/doctrees/README.doctree
Binary file not shown.
Binary file modified docs/doctrees/bbhx_tutorial.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
24 changes: 17 additions & 7 deletions docs/doctrees/nbsphinx/bbhx_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"source": [
"`bbhx` is a software package that produces black hole binary waveforms. It focuses on LISA and provides the proper LISA response function for MBHBs ([arXiv:1806.10734](https://arxiv.org/abs/1806.10734), [arXiv:2003.00357](https://arxiv.org/abs/2003.00357)). `bbhx` also provides fast likelihood functions. The package is GPU-accelerated for fast analysis. \n",
"\n",
"If you use this software please cite [arXiv:2005.01827](https://arxiv.org/abs/2005.01827) and [arXiv:2111.01064](https://arxiv.org/abs/2111.01064) any parts within the package that you use (like waveforms and response functions). See the `citation` attribute for each class. "
"If you use this software please cite [arXiv:2005.01827](https://arxiv.org/abs/2005.01827), [arXiv:2111.01064](https://arxiv.org/abs/2111.01064), and the associated [Zenodo page](https://zenodo.org/record/5730688#.YaFvRkJKhTY) Please also cite any consituent parts used like the response function or waveforms. See the `citation` attribute for each class or docstring for functions for more information. "
]
},
{
Expand Down Expand Up @@ -857,7 +857,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x7fd2d4ae4150>"
"<matplotlib.legend.Legend at 0x7ffe90dcbc90>"
]
},
"execution_count": 17,
Expand Down Expand Up @@ -1482,7 +1482,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 27,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1524,7 +1524,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 28,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1553,7 +1553,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 29,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1588,7 +1588,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 30,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1654,7 +1654,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 31,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1686,6 +1686,16 @@
" year = \"2021\"\n",
"}\n",
"\n",
"@article{michael katz_2021,\n",
" title={mikekatz04/BBHx: First official public release},\n",
" DOI={10.5281/zenodo.5730688},\n",
" abstractNote={No description provided.},\n",
" publisher={Zenodo},\n",
" author={Michael Katz},\n",
" year={2021},\n",
" month={Nov}\n",
"}\n",
"\n",
"@article{Marsat:2018oam,\n",
" author = \"Marsat, Sylvain and Baker, John G.\",\n",
" title = \"{Fourier-domain modulations and delays of gravitational-wave signals}\",\n",
Expand Down
Loading

0 comments on commit f1ed845

Please sign in to comment.