Skip to content

Commit

Permalink
Deploy dev from da569d3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 20, 2024
1 parent 824c5f5 commit 06266a3
Show file tree
Hide file tree
Showing 30 changed files with 549 additions and 175 deletions.
2 changes: 1 addition & 1 deletion dev/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: bd2cb66756f386d7eaf3b3bcc21e6ee5
config: 6f05172153ebbe2dfe06684739675159
tags: 645f666f9bcd5a90fca523b33c5a78b7
12 changes: 4 additions & 8 deletions dev/_modules/boule/_ellipsoid.html
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,7 @@ <h1>Source code for boule._ellipsoid</h1><div class="highlight"><pre>
<span class="o">/</span> <span class="p">(</span><span class="mf">1.5</span> <span class="o">*</span> <span class="p">((</span><span class="mi">1</span> <span class="o">+</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">ratio</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">arctan</span> <span class="o">-</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">ratio</span><span class="p">))</span>
<span class="p">)</span>
<span class="n">result</span> <span class="o">=</span> <span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">geocentric_grav_const</span>
<span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_emm</span> <span class="o">*</span> <span class="n">aux</span><span class="p">)</span>
<span class="o">/</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span><span class="o">**</span><span class="mi">2</span>
<span class="bp">self</span><span class="o">.</span><span class="n">geocentric_grav_const</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_emm</span> <span class="o">*</span> <span class="n">aux</span><span class="p">)</span> <span class="o">/</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span><span class="o">**</span><span class="mi">2</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">result</span>

Expand Down Expand Up @@ -791,9 +789,7 @@ <h1>Source code for boule._ellipsoid</h1><div class="highlight"><pre>
<span class="sd"> .. [2] See https://en.wikipedia.org/wiki/Earth_radius#Prime_vertical</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span> <span class="o">/</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span>
<span class="mi">1</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">first_eccentricity</span><span class="o">**</span><span class="mi">2</span> <span class="o">*</span> <span class="n">sinlat</span><span class="o">**</span><span class="mi">2</span>
<span class="p">)</span></div>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span> <span class="o">/</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">first_eccentricity</span><span class="o">**</span><span class="mi">2</span> <span class="o">*</span> <span class="n">sinlat</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span></div>

<div class="viewcode-block" id="Ellipsoid.geodetic_to_spherical"><a class="viewcode-back" href="../../api/generated/boule.Ellipsoid.html#boule.Ellipsoid.geodetic_to_spherical">[docs]</a> <span class="k">def</span> <span class="nf">geodetic_to_spherical</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">longitude</span><span class="p">,</span> <span class="n">latitude</span><span class="p">,</span> <span class="n">height</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
Expand Down Expand Up @@ -1015,8 +1011,8 @@ <h1>Source code for boule._ellipsoid</h1><div class="highlight"><pre>
<div class="footer-content row">
<footer class="col footer"><p>

&copy; Copyright 2022, The Boule Developers.<br/>
Last updated on Oct 27, 2022.<br/>
&copy; Copyright 2024, The Boule Developers.<br/>
Last updated on Feb 20, 2024.<br/>
</p>
</footer>
</div>
Expand Down
4 changes: 2 additions & 2 deletions dev/_modules/boule/_sphere.html
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ <h1>Source code for boule._sphere</h1><div class="highlight"><pre>
<div class="footer-content row">
<footer class="col footer"><p>

&copy; Copyright 2022, The Boule Developers.<br/>
Last updated on Oct 27, 2022.<br/>
&copy; Copyright 2024, The Boule Developers.<br/>
Last updated on Feb 20, 2024.<br/>
</p>
</footer>
</div>
Expand Down
117 changes: 114 additions & 3 deletions dev/_modules/boule/_triaxialellipsoid.html
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,118 @@ <h1>Source code for boule._triaxialellipsoid</h1><div class="highlight"><pre>
<span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span>
<span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimedium_axis</span>
<span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">semiminor_axis</span>
<span class="p">)</span></div>
<span class="p">)</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">equatorial_flattening</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The equatorial flattening of the ellipsoid.</span>
<span class="sd"> Definition: :math:`f_b = \frac{a - b}{a}`.</span>
<span class="sd"> Units: adimensional.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimedium_axis</span><span class="p">)</span> <span class="o">/</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">meridional_flattening</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The meridional flattening of the ellipsoid in the meridian plane</span>
<span class="sd"> containing the semi-major axis.</span>
<span class="sd"> Definition: :math:`f_c = \frac{a - c}{a}`.</span>
<span class="sd"> Units: adimensional.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">semiminor_axis</span><span class="p">)</span> <span class="o">/</span> <span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span>

<div class="viewcode-block" id="TriaxialEllipsoid.geocentric_radius"><a class="viewcode-back" href="../../api/generated/boule.TriaxialEllipsoid.html#boule.TriaxialEllipsoid.geocentric_radius">[docs]</a> <span class="k">def</span> <span class="nf">geocentric_radius</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">longitude</span><span class="p">,</span> <span class="n">latitude</span><span class="p">,</span> <span class="n">longitude_semimajor_axis</span><span class="o">=</span><span class="mf">0.0</span><span class="p">):</span>
<span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Radial distance from the center of the ellipsoid to its surface.</span>

<span class="sd"> Assumes geocentric spherical latitude and geocentric spherical</span>
<span class="sd"> longitudes. The geocentric radius is calculated following [Pec1983]_.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> longitude : float or array</span>
<span class="sd"> Longitude coordinates on spherical coordinate system in degrees.</span>
<span class="sd"> latitude : float or array</span>
<span class="sd"> Latitude coordinates on spherical coordinate system in degrees.</span>
<span class="sd"> longitude_semimajor_axis : float (optional)</span>
<span class="sd"> Longitude coordinate of the meridian containing the semi-major axis</span>
<span class="sd"> on spherical coordinate system in degrees. Optional, default value</span>
<span class="sd"> is 0.0.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> geocentric_radius : float or array</span>
<span class="sd"> The geocentric radius for the given spherical latitude(s) and</span>
<span class="sd"> spherical longitude(s) in the same units as the axes of the</span>
<span class="sd"> ellipsoid.</span>


<span class="sd"> .. tip::</span>

<span class="sd"> No elevation is taken into account.</span>

<span class="sd"> Notes</span>
<span class="sd"> -----</span>

<span class="sd"> Given geocentric spherical latitude :math:`\phi` and geocentric</span>
<span class="sd"> spherical longitude :math:`\lambda`, the geocentric surface radius</span>
<span class="sd"> :math:`R` is computed as (see Eq. 1 of [Pec1983]_)</span>

<span class="sd"> .. math::</span>

<span class="sd"> R(\phi, \lambda) =</span>
<span class="sd"> \frac{</span>
<span class="sd"> a \, (1 - f_c) \, (1 - f_b)</span>
<span class="sd"> }{</span>
<span class="sd"> \sqrt{</span>
<span class="sd"> 1</span>
<span class="sd"> - (2 f_c - f_c^2) \cos^2 \phi</span>
<span class="sd"> - (2 f_b - f_b^2) \sin^2 \phi</span>
<span class="sd"> - (1 - f_c)^2 (2 f_b - f_b^2)</span>
<span class="sd"> \cos^2 \phi \cos^2 (\lambda - \lambda_a)</span>
<span class="sd"> }</span>
<span class="sd"> },</span>

<span class="sd"> where :math:`f_c` is the meridional flattening</span>

<span class="sd"> .. math::</span>

<span class="sd"> f_c = \frac{a - c}{a},</span>

<span class="sd"> :math:`f_b` is the equatorial flattening</span>

<span class="sd"> .. math::</span>

<span class="sd"> f_b = \frac{a - b}{a},</span>

<span class="sd"> with :math:`a`, :math:`b` and :math:`c` being the semi-major,</span>
<span class="sd"> semi-medium and semi-minor axes of the ellipsoid, and :math:`\lambda_a`</span>
<span class="sd"> being the geocentric spherical longitude of the meridian containing the</span>
<span class="sd"> semi-major axis.</span>

<span class="sd"> Note that [Pec1983]_ use geocentric spherical co-latitude, while here</span>
<span class="sd"> we used geocentric spherical latitude.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">latitude_rad</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">latitude</span><span class="p">)</span>
<span class="n">longitude_rad</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">longitude</span><span class="p">)</span>
<span class="n">longitude_semimajor_axis_rad</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">longitude_semimajor_axis</span><span class="p">)</span>

<span class="n">coslat</span><span class="p">,</span> <span class="n">sinlat</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">latitude_rad</span><span class="p">),</span> <span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">latitude_rad</span><span class="p">)</span>

<span class="n">fc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">meridional_flattening</span>
<span class="n">fb</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">equatorial_flattening</span>

<span class="n">radius</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">semimajor_axis</span> <span class="o">*</span> <span class="p">(</span><span class="mf">1.0</span> <span class="o">-</span> <span class="n">fc</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="mf">1.0</span> <span class="o">-</span> <span class="n">fb</span><span class="p">))</span> <span class="o">/</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span>
<span class="mf">1.0</span>
<span class="o">-</span> <span class="p">(</span><span class="mf">2.0</span> <span class="o">*</span> <span class="n">fc</span> <span class="o">-</span> <span class="n">fc</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">coslat</span><span class="o">**</span><span class="mi">2</span>
<span class="o">-</span> <span class="p">(</span><span class="mf">2.0</span> <span class="o">*</span> <span class="n">fb</span> <span class="o">-</span> <span class="n">fb</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sinlat</span><span class="o">**</span><span class="mi">2</span>
<span class="o">-</span> <span class="p">(</span><span class="mf">1.0</span> <span class="o">-</span> <span class="n">fc</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span>
<span class="o">*</span> <span class="p">(</span><span class="mf">2.0</span> <span class="o">*</span> <span class="n">fb</span> <span class="o">-</span> <span class="n">fb</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
<span class="o">*</span> <span class="n">coslat</span><span class="o">**</span><span class="mi">2</span>
<span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">longitude_rad</span> <span class="o">-</span> <span class="n">longitude_semimajor_axis_rad</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">radius</span></div></div>
</pre></div>

</div>
Expand All @@ -576,8 +687,8 @@ <h1>Source code for boule._triaxialellipsoid</h1><div class="highlight"><pre>
<div class="footer-content row">
<footer class="col footer"><p>

&copy; Copyright 2022, The Boule Developers.<br/>
Last updated on Oct 27, 2022.<br/>
&copy; Copyright 2024, The Boule Developers.<br/>
Last updated on Feb 20, 2024.<br/>
</p>
</footer>
</div>
Expand Down
4 changes: 2 additions & 2 deletions dev/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ <h1>All modules for which code is available</h1>
<div class="footer-content row">
<footer class="col footer"><p>

&copy; Copyright 2022, The Boule Developers.<br/>
Last updated on Oct 27, 2022.<br/>
&copy; Copyright 2024, The Boule Developers.<br/>
Last updated on Feb 20, 2024.<br/>
</p>
</footer>
</div>
Expand Down
19 changes: 19 additions & 0 deletions dev/_sources/api/generated/boule.TriaxialEllipsoid.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ Attributes



.. autoattribute:: TriaxialEllipsoid.equatorial_flattening



.. autoattribute:: TriaxialEllipsoid.mean_radius



.. autoattribute:: TriaxialEllipsoid.meridional_flattening



.. autoattribute:: TriaxialEllipsoid.volume


Expand All @@ -31,13 +39,24 @@ Methods




TriaxialEllipsoid.geocentric_radius



.. rubric:: Methods documentation





.. automethod:: TriaxialEllipsoid.geocentric_radius

----




.. raw:: html

<div style='clear:both'></div>
1 change: 1 addition & 0 deletions dev/_sources/references.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ References
.. [Russell2012] Russell, C. T., Raymond, C. A., Coradini, A., McSween, H. Y., Zuber, M. T., Nathues, A., et al. (2012). Dawn at Vesta: Testing the Protoplanetary Paradigm. Science. doi:`10.1126/science.1219381 <https://doi.org/10.1126/science.1219381>`__
.. [Vermeille2002] Vermeille, H., 2002. Direct transformation from geocentric coordinates to geodetic coordinates. Journal of Geodesy. 76. 451-454. doi:`10.1007/s00190-002-0273-6 <https://doi.org/10.1007/s00190-002-0273-6>`__
.. [Wieczorek2015] Wieczorek, M. A. (2015). Gravity and Topography of the Terrestrial Planets. In Treatise on Geophysics (pp. 153–193). Elsevier. doi:`10.1016/b978-0-444-53802-4.00169-x <https://doi.org/10.1016/b978-0-444-53802-4.00169-x>`__
.. [Pec1983] Pěč, K. & Martinec, Z. (1983). Expansion of geoid heights over a triaxial Earth's ellipsoid into a spherical harmonic series. Studia Geophysica et Geodaetica, 27, 217-232. doi: `10.1007/BF01592791 <https://doi.org/10.1007/BF01592791>`__
Loading

0 comments on commit 06266a3

Please sign in to comment.