From d32f5ce444cdcb63295bf362f8c7e5bfcb240b5f Mon Sep 17 00:00:00 2001 From: Se Yong Park Date: Thu, 5 Oct 2023 23:41:42 -0400 Subject: [PATCH] updated docs --- README.md | 2 +- docs/source/notebooks/Trajectory.ipynb | 2 +- kerrgeopy/orbit.py | 1 + kerrgeopy/stable.py | 8 +++++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8b0af1a..72a64a3 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,7 @@ plt.ylabel(r"$\phi(\lambda)$") ![png](README_files/Getting%20Started_20_1.png) -## Credit +## Authors * Seyong Park * Zach Nasipak \ No newline at end of file diff --git a/docs/source/notebooks/Trajectory.ipynb b/docs/source/notebooks/Trajectory.ipynb index a4371b3..9b1aea8 100644 --- a/docs/source/notebooks/Trajectory.ipynb +++ b/docs/source/notebooks/Trajectory.ipynb @@ -126,7 +126,7 @@ "\n", "Plunging orbits are parametrized using the $(a,\\mathcal{E},\\mathcal{L},\\mathcal{Q})$ parametrization described in [Getting Started](plunging-orbits).\n", "\n", - "Construct a [`PlungingOrbit`](plunge.PlungingOrbit) by passing in these four parameters and use the [`trajectory()`](plunge.PlungingOrbit.trajectory) method to compute the trajectory. As with stable orbits, the `initial_phases` option sets the initial phases $(q_{t_0},q_{r_0},q_{\\theta_0},q_{\\phi_0})$ and the `distance_units` and `time_units` options can be used to specify units if `M` and `mu` are given." + "Construct a [`PlungingOrbit`](plunge.PlungingOrbit) by passing in these four parameters and use the [`trajectory()`](plunge.PlungingOrbit.trajectory) method to compute the trajectory. As with stable orbits, the `initial_phases` option sets the initial phases $(q_{t_0},q_{r_0},q_{\\theta_0},q_{\\phi_0})$ and the `distance_units` and `time_units` options can be used to specify units if `M` and `mu` are given. As with stable orbits, the trajectory is computed assuming the initial conditions $(t_0,r_0,\\theta_0,\\phi_0) = (0, r_{\\text{min}},\\theta_{\\text{min}},0)$ when the initial phases are all set to zero. Note that this means certain classes of plunging orbits begin at the singularity by default. As a result, some methods by be unreliable near $\\lambda=0$ for such orbits." ] }, { diff --git a/kerrgeopy/orbit.py b/kerrgeopy/orbit.py index 44c7b3c..2e68129 100644 --- a/kerrgeopy/orbit.py +++ b/kerrgeopy/orbit.py @@ -65,6 +65,7 @@ def __init__(self,a,initial_position,initial_velocity, M=None, mu=None): def trajectory(self,initial_phases=None,distance_units="natural",time_units="natural"): r""" Computes the components of the trajectory as a function of Mino time + :param initial_phases: tuple of initial phases :math:`(q_{t_0},q_{r_0},q_{\theta_0},q_{\phi_0})` :type initial_phases: tuple, optional :param distance_units: units to compute the radial component of the trajectory in (options are "natural", "mks", "cgs", "au" and "km"), defaults to "natural" diff --git a/kerrgeopy/stable.py b/kerrgeopy/stable.py index 10741b3..7b813cc 100644 --- a/kerrgeopy/stable.py +++ b/kerrgeopy/stable.py @@ -2,6 +2,7 @@ Module implementing the stable bound orbit solutions of `Fujita and Hikida `_ """ from .constants import * +from .constants import _standardize_params from .frequencies import _ellippi, _ellippiinc from .frequencies import * from scipy.special import ellipj, ellipeinc @@ -12,13 +13,13 @@ class StableOrbit(Orbit): r""" Class representing a stable bound orbit in Kerr spacetime. - :param a: dimensionless angular momentum (must satisfy 0 <= a < 1) + :param a: dimensionless angular momentum :type a: double :param p: semi-latus rectum :type p: double - :param e: orbital eccentricity (must satisfy 0 <= e < 1) + :param e: orbital eccentricity :type e: double - :param x: cosine of the orbital inclination (must satisfy 0 < x^2 <= 1) + :param x: cosine of the orbital inclination :type x: double :param initial_phases: tuple of initial phases :math:`(q_{t_0},q_{r_0},q_{\theta_0},q_{\phi_0})`, defaults to (0,0,0,0) :type initial_phases: tuple, optional @@ -47,6 +48,7 @@ class StableOrbit(Orbit): :ivar omega_phi: dimensionless azimuthal orbital frequency in Boyer-Lindquist time """ def __init__(self,a,p,e,x,initial_phases=(0,0,0,0),M=None,mu=None): + a, x = _standardize_params(a,x) self.a, self.p, self.e, self.x, self.initial_phases, self.M, self.mu = a, p, e, x, initial_phases, M, mu constants = constants_of_motion(a,p,e,x)