Skip to content

Commit

Permalink
Merge pull request #46 from BlackHolePerturbationToolkit/dev
Browse files Browse the repository at this point in the history
frequencies back, zero ecc, ode_base issues
  • Loading branch information
mikekatz04 authored Nov 18, 2021
2 parents 9fd853a + 1080c7c commit 81c446e
Show file tree
Hide file tree
Showing 41 changed files with 351 additions and 143 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,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/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags).

Current Version: 1.4.3
Current Version: 1.4.4

## Authors

Expand Down
Binary file modified docs/doctrees/README.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/general/docs_main.doctree
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
63 changes: 48 additions & 15 deletions docs/doctrees/nbsphinx/tutorial/FastEMRIWaveforms_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2608,7 +2608,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If you want to implement a set of ODE equations in C/C++, you can add your function to `src/ode_base.cc`. When you run `python setup install`, the installer will build a full file of ODEs and take care of all of the backend aspects to the integration. **You only have to implement the ODE**. You identify the ODE functions with `__deriv__` decorator. `#define` is then used to give extra necessary information on the function. Options are:\n",
"If you want to implement a set of ODE equations in C/C++, you can add your function to `src/ode_base.cc`. You have to create the file if you have not already. Make sure it is in the `src/` directory. When you run `python setup install`, the installer will build a full file of ODEs and take care of all of the backend aspects to the integration. **You only have to implement the ODE**. You identify the ODE functions with `__deriv__` decorator. `#define` is then used to give extra necessary information on the function. Options are:\n",
"\n",
"* `#define {waveform function name}_num_add_args {number of added args}`: Number of additional arguments beyond the required arguments. \n",
"* `#define {waveform function name}_spinless`: Indicated Schwarzschild background. \n",
Expand Down Expand Up @@ -2640,18 +2640,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If the ODE is purely analytic, a function will work. Here is an example with the 5PN trajectory:\n",
"If the ODE is purely analytic, a function will work. Here is an example with the 5PN trajectory (see`include/ode_base_example.cc`):\n",
"\n",
"````\n",
"#define pn5_Y\n",
"#define pn5_citation1 pn5_citation\n",
"__deriv__\n",
"void pn5(double* pdot, double* edot, double* Ydot,\n",
" double Omega_phi, double Omega_theta, double Omega_r,\n",
" double* Omega_phi, double* Omega_theta, double* Omega_r,\n",
" double epsilon, double a, double p, double e, double Y, double* additional_args)\n",
"{\n",
" // evaluate ODEs\n",
"\n",
" // the frequency variables are pointers!\n",
" double x = Y_to_xI(a, p, e, Y);\n",
" KerrGeoCoordinateFrequencies(Omega_phi, Omega_theta, Omega_r, a, p, e, x);\n",
"\n",
"\tint Nv = 10;\n",
" int ne = 10;\n",
" *pdot = epsilon * dpdt8H_5PNe10 (a, p, e, Y, Nv, ne);\n",
Expand All @@ -2663,11 +2667,7 @@
"\n",
" Nv = 7;\n",
" ne = 10;\n",
" *Ydot = -epsilon * dYdt8H_5PNe10 (a, p, e, Y, Nv, ne);\n",
"\n",
" // convert to proper inclination input to fundamental frequencies\n",
" double xI = Y_to_xI(a, p, e, Y);\n",
" KerrGeoCoordinateFrequencies(Omega_phi, Omega_theta, Omega_r, a, p, e, xI);\n",
" *Ydot = epsilon * dYdt8H_5PNe10 (a, p, e, Y, Nv, ne);\n",
"\n",
"}\n",
"````\n",
Expand All @@ -2689,7 +2689,7 @@
"If your function requires the storage of files or interpolants, you can also build your ODE as a class. In this case, \n",
"it must have a constructor, destructor, and method called `deriv_func` with the ODEs.\n",
"\n",
"Here is the implementation for the flux driven trajectory:\n",
"Here is the implementation for the flux driven trajectory (see`include/ode_base_example.cc`):\n",
"\n",
"````\n",
"\n",
Expand All @@ -2713,24 +2713,25 @@
"#define SchwarzEccFlux_file1 FluxNewMinusPNScaled_fixed_y_order.dat\n",
"__deriv__\n",
"void SchwarzEccFlux::deriv_func(double* pdot, double* edot, double* xdot,\n",
" double Omega_phi, double Omega_theta, double Omega_r,\n",
" double* Omega_phi, double* Omega_theta, double* Omega_r,\n",
" double epsilon, double a, double p, double e, double x, double* additional_args)\n",
"{\n",
" if ((6.0 + 2. * e) > p)\n",
" {\n",
" *pdot = 0.0;\n",
" *edot = 0.0;\n",
" *xdot = 0.0;\n",
"\n",
" return;\n",
" }\n",
"\n",
" SchwarzschildGeoCoordinateFrequencies(Omega_phi, Omega_r, p, e);\n",
" *Omega_theta = *Omega_phi;\n",
"\n",
" double y1 = log((p -2.*e - 2.1));\n",
"\n",
" // evaluate ODEs, starting with PN contribution, then interpolating over remaining flux contribution\n",
"\n",
" SchwarzschildGeoCoordinateFrequencies(Omega_phi, Omega_r, p, e);\n",
"\n",
"\tdouble yPN = pow((Omega_phi),2./3.);\n",
"\tdouble yPN = pow((*Omega_phi),2./3.);\n",
"\n",
"\tdouble EdotPN = (96 + 292*Power(e,2) + 37*Power(e,4))/(15.*Power(1 - Power(e,2),3.5)) * pow(yPN, 5);\n",
"\tdouble LdotPN = (4*(8 + 7*Power(e,2)))/(5.*Power(-1 + Power(e,2),2)) * pow(yPN, 7./2.);\n",
Expand All @@ -2757,7 +2758,6 @@
" *xdot = 0.0;\n",
"}\n",
"\n",
"\n",
"// When interfacing with cython, it helps to have dealloc function to explicitly call\n",
"// rather than the deconstructor\n",
"SchwarzEccFlux::~SchwarzEccFlux()\n",
Expand All @@ -2773,6 +2773,39 @@
"````"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this case, where the functions are implemented in a class, you will have to add the class to the header file: `include/ode_base.hh`. You do not need to add anything to the header file if you are working with functions and not classes. You will need to create this file if you have not already. Make sure it is in the `include/` directory. Here is an example of what is placed in the header file when working with classes (see `include/ode_base_example.hh`):\n",
"\n",
"````\n",
"#include \"Interpolant.h\"\n",
"\n",
"// Used to pass the interpolants to the ODE solver\n",
"struct interp_params{\n",
"\tdouble epsilon;\n",
"\tInterpolant *Edot;\n",
"\tInterpolant *Ldot;\n",
"};\n",
"\n",
"class SchwarzEccFlux{\n",
"public:\n",
" interp_params *interps;\n",
" Interpolant *amp_vec_norm_interp;\n",
" double test;\n",
"\n",
" SchwarzEccFlux(std::string few_dir);\n",
"\n",
" void deriv_func(double* pdot, double* edot, double* Ydot,\n",
" double* Omega_phi, double* Omega_theta, double* Omega_r,\n",
" double epsilon, double a, double p, double e, double Y, double* additional_args);\n",
" ~SchwarzEccFlux();\n",
"};\n",
"\n",
"````"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/doctrees/tutorial/FastEMRIWaveforms_tutorial.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ <h2>Versioning<a class="headerlink" href="#versioning" title="Permalink to this
<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/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags">tags on this
repository</a>.</p>
<p>Current Version: 1.4.3</p>
<p>Current Version: 1.4.4</p>
</div>
<div class="section" id="authors">
<h2>Authors<a class="headerlink" href="#authors" title="Permalink to this headline"></a></h2>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/html/_images/tutorial_FastEMRIWaveforms_tutorial_135_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/html/_images/tutorial_FastEMRIWaveforms_tutorial_138_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/html/_images/tutorial_FastEMRIWaveforms_tutorial_151_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/html/_sources/README.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ We use `SemVer <http://semver.org/>`__ for versioning. For the versions
available, see the `tags on this
repository <https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags>`__.

Current Version: 1.4.3
Current Version: 1.4.4

Authors
-------
Expand Down
1 change: 1 addition & 0 deletions docs/html/_sources/general/docs_main.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Package TODOs
Change Log
===========

- 1.4.4: Bug fix at zero eccentricity. Frequencies back in ODE. Fix for git pull issue with ode_base files.
- 1.4.3: Bug fixes for additional arguments in SchEcc waveform base.
- 1.4.2: Bug fixes for additional arguments in AAK waveform.
- 1.4.1: Bug fixes.
Expand Down
63 changes: 48 additions & 15 deletions docs/html/_sources/tutorial/FastEMRIWaveforms_tutorial.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2608,7 +2608,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If you want to implement a set of ODE equations in C/C++, you can add your function to `src/ode_base.cc`. When you run `python setup install`, the installer will build a full file of ODEs and take care of all of the backend aspects to the integration. **You only have to implement the ODE**. You identify the ODE functions with `__deriv__` decorator. `#define` is then used to give extra necessary information on the function. Options are:\n",
"If you want to implement a set of ODE equations in C/C++, you can add your function to `src/ode_base.cc`. You have to create the file if you have not already. Make sure it is in the `src/` directory. When you run `python setup install`, the installer will build a full file of ODEs and take care of all of the backend aspects to the integration. **You only have to implement the ODE**. You identify the ODE functions with `__deriv__` decorator. `#define` is then used to give extra necessary information on the function. Options are:\n",
"\n",
"* `#define {waveform function name}_num_add_args {number of added args}`: Number of additional arguments beyond the required arguments. \n",
"* `#define {waveform function name}_spinless`: Indicated Schwarzschild background. \n",
Expand Down Expand Up @@ -2640,18 +2640,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If the ODE is purely analytic, a function will work. Here is an example with the 5PN trajectory:\n",
"If the ODE is purely analytic, a function will work. Here is an example with the 5PN trajectory (see`include/ode_base_example.cc`):\n",
"\n",
"````\n",
"#define pn5_Y\n",
"#define pn5_citation1 pn5_citation\n",
"__deriv__\n",
"void pn5(double* pdot, double* edot, double* Ydot,\n",
" double Omega_phi, double Omega_theta, double Omega_r,\n",
" double* Omega_phi, double* Omega_theta, double* Omega_r,\n",
" double epsilon, double a, double p, double e, double Y, double* additional_args)\n",
"{\n",
" // evaluate ODEs\n",
"\n",
" // the frequency variables are pointers!\n",
" double x = Y_to_xI(a, p, e, Y);\n",
" KerrGeoCoordinateFrequencies(Omega_phi, Omega_theta, Omega_r, a, p, e, x);\n",
"\n",
"\tint Nv = 10;\n",
" int ne = 10;\n",
" *pdot = epsilon * dpdt8H_5PNe10 (a, p, e, Y, Nv, ne);\n",
Expand All @@ -2663,11 +2667,7 @@
"\n",
" Nv = 7;\n",
" ne = 10;\n",
" *Ydot = -epsilon * dYdt8H_5PNe10 (a, p, e, Y, Nv, ne);\n",
"\n",
" // convert to proper inclination input to fundamental frequencies\n",
" double xI = Y_to_xI(a, p, e, Y);\n",
" KerrGeoCoordinateFrequencies(Omega_phi, Omega_theta, Omega_r, a, p, e, xI);\n",
" *Ydot = epsilon * dYdt8H_5PNe10 (a, p, e, Y, Nv, ne);\n",
"\n",
"}\n",
"````\n",
Expand All @@ -2689,7 +2689,7 @@
"If your function requires the storage of files or interpolants, you can also build your ODE as a class. In this case, \n",
"it must have a constructor, destructor, and method called `deriv_func` with the ODEs.\n",
"\n",
"Here is the implementation for the flux driven trajectory:\n",
"Here is the implementation for the flux driven trajectory (see`include/ode_base_example.cc`):\n",
"\n",
"````\n",
"\n",
Expand All @@ -2713,24 +2713,25 @@
"#define SchwarzEccFlux_file1 FluxNewMinusPNScaled_fixed_y_order.dat\n",
"__deriv__\n",
"void SchwarzEccFlux::deriv_func(double* pdot, double* edot, double* xdot,\n",
" double Omega_phi, double Omega_theta, double Omega_r,\n",
" double* Omega_phi, double* Omega_theta, double* Omega_r,\n",
" double epsilon, double a, double p, double e, double x, double* additional_args)\n",
"{\n",
" if ((6.0 + 2. * e) > p)\n",
" {\n",
" *pdot = 0.0;\n",
" *edot = 0.0;\n",
" *xdot = 0.0;\n",
"\n",
" return;\n",
" }\n",
"\n",
" SchwarzschildGeoCoordinateFrequencies(Omega_phi, Omega_r, p, e);\n",
" *Omega_theta = *Omega_phi;\n",
"\n",
" double y1 = log((p -2.*e - 2.1));\n",
"\n",
" // evaluate ODEs, starting with PN contribution, then interpolating over remaining flux contribution\n",
"\n",
" SchwarzschildGeoCoordinateFrequencies(Omega_phi, Omega_r, p, e);\n",
"\n",
"\tdouble yPN = pow((Omega_phi),2./3.);\n",
"\tdouble yPN = pow((*Omega_phi),2./3.);\n",
"\n",
"\tdouble EdotPN = (96 + 292*Power(e,2) + 37*Power(e,4))/(15.*Power(1 - Power(e,2),3.5)) * pow(yPN, 5);\n",
"\tdouble LdotPN = (4*(8 + 7*Power(e,2)))/(5.*Power(-1 + Power(e,2),2)) * pow(yPN, 7./2.);\n",
Expand All @@ -2757,7 +2758,6 @@
" *xdot = 0.0;\n",
"}\n",
"\n",
"\n",
"// When interfacing with cython, it helps to have dealloc function to explicitly call\n",
"// rather than the deconstructor\n",
"SchwarzEccFlux::~SchwarzEccFlux()\n",
Expand All @@ -2773,6 +2773,39 @@
"````"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this case, where the functions are implemented in a class, you will have to add the class to the header file: `include/ode_base.hh`. You do not need to add anything to the header file if you are working with functions and not classes. You will need to create this file if you have not already. Make sure it is in the `include/` directory. Here is an example of what is placed in the header file when working with classes (see `include/ode_base_example.hh`):\n",
"\n",
"````\n",
"#include \"Interpolant.h\"\n",
"\n",
"// Used to pass the interpolants to the ODE solver\n",
"struct interp_params{\n",
"\tdouble epsilon;\n",
"\tInterpolant *Edot;\n",
"\tInterpolant *Ldot;\n",
"};\n",
"\n",
"class SchwarzEccFlux{\n",
"public:\n",
" interp_params *interps;\n",
" Interpolant *amp_vec_norm_interp;\n",
" double test;\n",
"\n",
" SchwarzEccFlux(std::string few_dir);\n",
"\n",
" void deriv_func(double* pdot, double* edot, double* Ydot,\n",
" double* Omega_phi, double* Omega_theta, double* Omega_r,\n",
" double epsilon, double a, double p, double e, double Y, double* additional_args);\n",
" ~SchwarzEccFlux();\n",
"};\n",
"\n",
"````"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
1 change: 1 addition & 0 deletions docs/html/general/docs_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ <h1>Package TODOs<a class="headerlink" href="#package-todos" title="Permalink to
<div class="section" id="change-log">
<h1>Change Log<a class="headerlink" href="#change-log" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p>1.4.4: Bug fix at zero eccentricity. Frequencies back in ODE. Fix for git pull issue with ode_base files.</p></li>
<li><p>1.4.3: Bug fixes for additional arguments in SchEcc waveform base.</p></li>
<li><p>1.4.2: Bug fixes for additional arguments in AAK waveform.</p></li>
<li><p>1.4.1: Bug fixes.</p></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ <h2>Versioning<a class="headerlink" href="#versioning" title="Permalink to this
<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/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags">tags on this
repository</a>.</p>
<p>Current Version: 1.4.3</p>
<p>Current Version: 1.4.4</p>
</div>
<div class="section" id="authors">
<h2>Authors<a class="headerlink" href="#authors" title="Permalink to this headline"></a></h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 81c446e

Please sign in to comment.