Skip to content

Commit

Permalink
changed python wrapper file name
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekatz04 committed Jan 25, 2024
1 parent dd4c1f5 commit 8bf2413
Show file tree
Hide file tree
Showing 35 changed files with 378 additions and 308 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc

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.5
Current Version: 1.0.6

## Authors

Expand Down
7 changes: 3 additions & 4 deletions bbhx/response/fastfdresponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

try:
import cupy as xp
from pyResponse import LISA_response_wrap as LISA_response_wrap_gpu
from pyFDResponse import LISA_response_wrap as LISA_response_wrap_gpu

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

from pyResponse_cpu import LISA_response_wrap as LISA_response_wrap_cpu
from pyFDResponse_cpu import LISA_response_wrap as LISA_response_wrap_cpu
from bbhx.utils.constants import *


Expand Down Expand Up @@ -69,7 +69,6 @@ class LISATDIResponse:
"""

def __init__(self, TDItag="AET", order_fresnel_stencil=0, use_gpu=False):

# gpu setup
if use_gpu:
self.response_gen = LISA_response_wrap_gpu
Expand Down Expand Up @@ -106,7 +105,7 @@ def citation(self):

def _sanity_check_modes(self, ells, mms):
"""Make sure modes are allowed"""
for (ell, mm) in zip(ells, mms):
for ell, mm in zip(ells, mms):
if (ell, mm) not in self.allowable_modes:
raise ValueError(
"Requested mode [(l,m) = ({},{})] is not available. Allowable modes include {}".format(
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.
Binary file modified docs/doctrees/user/constants.doctree
Binary file not shown.
Binary file modified docs/doctrees/user/like.doctree
Binary file not shown.
Binary file modified docs/doctrees/user/main.doctree
Binary file not shown.
Binary file modified docs/doctrees/user/response.doctree
Binary file not shown.
Binary file modified docs/doctrees/user/utils.doctree
Binary file not shown.
Binary file modified docs/doctrees/user/waveforms.doctree
Binary file not shown.
46 changes: 24 additions & 22 deletions docs/html/README.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GPU-Accelerated Black Hole Binary Waveforms (bbhx) &mdash; bbhx documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
Expand Down Expand Up @@ -85,9 +87,9 @@
<div itemprop="articleBody">

<section id="gpu-accelerated-black-hole-binary-waveforms-bbhx">
<h1>GPU-Accelerated Black Hole Binary Waveforms (<code class="docutils literal notranslate"><span class="pre">bbhx</span></code>)<a class="headerlink" href="#gpu-accelerated-black-hole-binary-waveforms-bbhx" title="Permalink to this heading"></a></h1>
<h1>GPU-Accelerated Black Hole Binary Waveforms (<code class="docutils literal notranslate"><span class="pre">bbhx</span></code>)<a class="headerlink" href="#gpu-accelerated-black-hole-binary-waveforms-bbhx" title="Link to this heading"></a></h1>
<section id="designed-for-lisa-data-analysis-of-massive-black-hole-binaries">
<h2>Designed for LISA data analysis of Massive Black Hole Binaries.<a class="headerlink" href="#designed-for-lisa-data-analysis-of-massive-black-hole-binaries" title="Permalink to this heading"></a></h2>
<h2>Designed for LISA data analysis of Massive Black Hole Binaries.<a class="headerlink" href="#designed-for-lisa-data-analysis-of-massive-black-hole-binaries" title="Link to this heading"></a></h2>
<p>This package implements GPU/CPU agnostic Massive Black Hole Binary
waveforms and likelihood computations from
<a class="reference external" href="https://arxiv.org/abs/2005.01827">arXiv:2005.01827</a> and
Expand All @@ -108,7 +110,7 @@ <h2>Designed for LISA data analysis of Massive Black Hole Binaries.<a class="hea
See the <code class="docutils literal notranslate"><span class="pre">citation</span></code> attribute for each class or docstring for functions
for more information.</p>
<section id="getting-started">
<h3>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this heading"></a></h3>
<h3>Getting Started<a class="headerlink" href="#getting-started" title="Link to this heading"></a></h3>
<p>Below is a quick set of instructions to get you started with <code class="docutils literal notranslate"><span class="pre">bbhx</span></code>.</p>
<ol class="arabic simple" start="0">
<li><p><a class="reference external" href="https://docs.anaconda.com/anaconda/install/">Install Anaconda</a> if
Expand Down Expand Up @@ -149,7 +151,7 @@ <h3>Getting Started<a class="headerlink" href="#getting-started" title="Permalin
</section>
</section>
<section id="prerequisites">
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this heading"></a></h2>
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Link to this heading"></a></h2>
<p>To install this software for CPU usage, you need <a class="reference external" href="https://www.gnu.org/software/gsl/">gsl
&gt;2.0</a> , <a class="reference external" href="https://www.netlib.org/lapack/lug/node14.html">lapack
(3.6.1)</a>, Python &gt;3.4,
Expand All @@ -171,7 +173,7 @@ <h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to
it as the <code class="docutils literal notranslate"><span class="pre">CUDAHOME</span></code> environment variable.</p>
</section>
<section id="installing">
<h2>Installing<a class="headerlink" href="#installing" title="Permalink to this heading"></a></h2>
<h2>Installing<a class="headerlink" href="#installing" title="Link to this heading"></a></h2>
<ol class="arabic simple" start="0">
<li><p><a class="reference external" href="https://docs.anaconda.com/anaconda/install/">Install Anaconda</a> if
you do not have it.</p></li>
Expand Down Expand Up @@ -241,44 +243,44 @@ <h2>Installing<a class="headerlink" href="#installing" title="Permalink to this
</pre></div>
</div>
<section id="running-the-tests">
<h3>Running the Tests<a class="headerlink" href="#running-the-tests" title="Permalink to this heading"></a></h3>
<h3>Running the Tests<a class="headerlink" href="#running-the-tests" title="Link to this heading"></a></h3>
<p>In the main directory of the package run in the terminal:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">unittest</span> <span class="n">discover</span>
</pre></div>
</div>
</section>
<section id="contributing">
<h3>Contributing<a class="headerlink" href="#contributing" title="Permalink to this heading"></a></h3>
<h3>Contributing<a class="headerlink" href="#contributing" title="Link to this heading"></a></h3>
<p>Please read <a class="reference external" href="CONTRIBUTING.md">CONTRIBUTING.md</a> for details on our
code of conduct, and the process for submitting pull requests to us.</p>
</section>
<section id="versioning">
<h3>Versioning<a class="headerlink" href="#versioning" title="Permalink to this heading"></a></h3>
<h3>Versioning<a class="headerlink" href="#versioning" title="Link to this heading"></a></h3>
<p>We use <a class="reference external" href="http://semver.org/">SemVer</a> for versioning. For the versions
available, see the <a class="reference external" href="https://github.com/mikekatz04/BBHx/tags">tags on this
repository</a>.</p>
<p>Current Version: 1.0.5</p>
<p>Current Version: 1.0.6</p>
</section>
<section id="authors">
<h3>Authors<a class="headerlink" href="#authors" title="Permalink to this heading"></a></h3>
<h3>Authors<a class="headerlink" href="#authors" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p><strong>Michael Katz</strong></p></li>
</ul>
</section>
</section>
<section id="contibutors">
<h2>Contibutors<a class="headerlink" href="#contibutors" title="Permalink to this heading"></a></h2>
<h2>Contibutors<a class="headerlink" href="#contibutors" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Sylvain Marsat</p></li>
<li><p>John Baker</p></li>
</ul>
<section id="license">
<h3>License<a class="headerlink" href="#license" title="Permalink to this heading"></a></h3>
<h3>License<a class="headerlink" href="#license" title="Link to this heading"></a></h3>
<p>This project is licensed under the GNU License - see the
<a class="reference external" href="LICENSE.md">LICENSE.md</a> file for details.</p>
</section>
<section id="acknowledgments">
<h3>Acknowledgments<a class="headerlink" href="#acknowledgments" title="Permalink to this heading"></a></h3>
<h3>Acknowledgments<a class="headerlink" href="#acknowledgments" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>This research was also supported in part through the computational
resources and staff contributions provided for the Quest/Grail high
Expand Down
2 changes: 1 addition & 1 deletion docs/html/_sources/README.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ 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.5
Current Version: 1.0.6

Authors
-------
Expand Down
22 changes: 22 additions & 0 deletions docs/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down Expand Up @@ -670,6 +674,16 @@ dd {
margin-left: 30px;
}

.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}

.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}

dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -738,6 +752,14 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
2 changes: 1 addition & 1 deletion docs/html/_static/css/theme.css

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions docs/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
Expand Down
14 changes: 10 additions & 4 deletions docs/html/_static/nbsphinx-code-cells.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ div.nblast.container {
}

/* input prompt */
div.nbinput.container div.prompt pre {
div.nbinput.container div.prompt pre,
/* for sphinx_immaterial theme: */
div.nbinput.container div.prompt pre > code {
color: #307FC1;
}

/* output prompt */
div.nboutput.container div.prompt pre {
div.nboutput.container div.prompt pre,
/* for sphinx_immaterial theme: */
div.nboutput.container div.prompt pre > code {
color: #BF5B3D;
}

Expand Down Expand Up @@ -204,8 +208,10 @@ div.nboutput.container div.output_area > div[class^='highlight']{
overflow-y: hidden;
}

/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
.prompt .copybtn {
/* hide copy button on prompts for 'sphinx_copybutton' extension ... */
.prompt .copybtn,
/* ... and 'sphinx_immaterial' theme */
.prompt .md-clipboard.md-icon {
display: none;
}

Expand Down
1 change: 1 addition & 0 deletions docs/html/_static/pygments.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #E40000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #008400 } /* Generic.Inserted */
Expand Down
26 changes: 17 additions & 9 deletions docs/html/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string

const _displayItem = (item, searchTerms) => {
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;

Expand All @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
requestUrl = contentRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
requestUrl = contentRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
Expand All @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
Expand All @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
Expand Down Expand Up @@ -360,7 +368,7 @@ const Search = {
// console.info("search results:", Search.lastresults);

// print the results
_displayNextItem(results, results.length, searchTerms);
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},

/**
Expand Down
16 changes: 13 additions & 3 deletions docs/html/_static/sphinx_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);

if (isInSVG) {
const rect = document.createElementNS(
Expand Down Expand Up @@ -140,5 +145,10 @@ const SphinxHighlight = {
},
};

_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
Loading

0 comments on commit 8bf2413

Please sign in to comment.