Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs and Ls computation #12

Merged
merged 5 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/.doctrees/rst/accuracy.doctree
Binary file not shown.
Binary file modified docs/.doctrees/rst/api-reference.doctree
Binary file not shown.
Binary file modified docs/.doctrees/rst/generated/mars_time.MarsTime.doctree
Binary file not shown.
Binary file modified docs/.doctrees/rst/generated/mars_time.MarsTimeDelta.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/.doctrees/rst/install.doctree
Binary file not shown.
Binary file modified docs/.doctrees/rst/release-notes.doctree
Binary file not shown.
14 changes: 14 additions & 0 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
</p>
<ul class="bd-navbar-elements navbar-nav">

<li class="nav-item">
<a class="nav-link nav-internal" href="../rst/accuracy.html">
Accuracy
</a>
</li>


<li class="nav-item">
<a class="nav-link nav-internal" href="../rst/install.html">
Installation
Expand Down Expand Up @@ -236,6 +243,13 @@
</p>
<ul class="bd-navbar-elements navbar-nav">

<li class="nav-item">
<a class="nav-link nav-internal" href="../rst/accuracy.html">
Accuracy
</a>
</li>


<li class="nav-item">
<a class="nav-link nav-internal" href="../rst/install.html">
Installation
Expand Down
155 changes: 138 additions & 17 deletions docs/_modules/mars_time/constants.html

Large diffs are not rendered by default.

170 changes: 120 additions & 50 deletions docs/_modules/mars_time/retimers.html

Large diffs are not rendered by default.

25 changes: 3 additions & 22 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Welcome
=======
Mars Time
=========
:code:`mars_time` is a package for converting between Martian times and
Earth times. You may be interested in this package if:

Expand All @@ -14,31 +14,12 @@ Earth times. You may be interested in this package if:

If any of these apply to you, this package is for you.

A note about accuracy
---------------------
This package makes 2 assumptions that can introduce errors:

* A Mars year has a constant length. The Piqueux *et al* paper of accurate
Mars year starting dates indicates, for example, that Mars year 97 to 98
is 686.995 days, whereas Mars year 99 to 100 is 686.959 days. I assume the
Mars years have a constant length, but this assumption is not quite true.
* The constants are infinitely precise. Some constants (like the solar
longitude at perihelion) aren't particularly precise. It may not even be
possible for them to be more precise without running into errors described in
the first bullet point.

Therefore I recommend you use this package as a *generally* accurate
time converter---not a *supremely* accurate time converter. If you need
second or minute accuracy and precision, I suggest you use SPICE.

If you know of a way to perform more accurate calculations, please
`raise an issue <https://github.com/kconnour/mars_time/issues>`_ to help improve
this package.

.. toctree::
:maxdepth: 1
:caption: Useful links

rst/accuracy
rst/install
rst/api-reference
rst/examples
Expand Down
32 changes: 32 additions & 0 deletions docs/_sources/rst/accuracy.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Accuracy
========
Mars' orbit varies significantly with time and thus any attempt to accurately
convert between Earth and Mars times can only really be accurate within a narrow
time window. Most of the conversions found in this package are based on
`dynamical calculations <https://doi.org/10.1016/j.icarus.2014.12.014>`_ and are
accurate between the years of 1607 (the first Mars year observed by Galilleo)
and 2141 (the start of Mars year 100---an arbitrary cutoff date).

This package makes a few assumptions, for better or worse:

* The length of a sol is constant, but the length of a Mars year is not
constant. Other planets perturb Mars' orbit such that the length of the year
can vary by several hours from year to year. Assuming a constant length of a
year can lead to significant errors over time.
* There is a way to generically convert Ls to sol. This is not really possible,
as there are a different number of sols per Martian year. Nevertheless, I
use an equation that can approximate this value. I hope to make a more
accurate function in a future update that includes the Mars year and thus can
potentially be more accurate.

Therefore I recommend you use this package as a *generally* accurate
time converter---not a *supremely* accurate time converter. If you know of a way
to perform more accurate calculations, please
`raise an issue <https://github.com/kconnour/mars_time/issues>`_ to help improve
this package.

SPICE
-----
I have no idea how accurate this package is compared to SPICE computations of
solar longitude. If you have some knowledge on this topic, feel free to contact
me!
2 changes: 1 addition & 1 deletion docs/_sources/rst/api-reference.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ These constants are related to the orbit and/or timekeeping on Mars.
northern_summer_solstice_sol
northern_autumn_equinox_sol
northern_winter_solstice_sol
aphelion_sol
perihelion_sol
orbital_eccentricity
6 changes: 4 additions & 2 deletions docs/_sources/rst/generated/mars_time.MarsTime.rst.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
mars\_time.MarsTime
.. This is the default script that I've hacked to make it look as I want

mars\_time.MarsTime
===================

.. currentmodule:: mars_time

.. autoclass:: MarsTime


.. automethod:: __init__



.. rubric:: Methods
Expand Down
6 changes: 4 additions & 2 deletions docs/_sources/rst/generated/mars_time.MarsTimeDelta.rst.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
mars\_time.MarsTimeDelta
.. This is the default script that I've hacked to make it look as I want

mars\_time.MarsTimeDelta
========================

.. currentmodule:: mars_time

.. autoclass:: MarsTimeDelta


.. automethod:: __init__



.. rubric:: Methods
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mars\_time.constants.aphelion\_sol
==================================

.. currentmodule:: mars_time.constants

.. autodata:: aphelion_sol
3 changes: 2 additions & 1 deletion docs/_sources/rst/install.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Installation
============
The easiest way to install `mars_time` is to use pip. Simply use
:code:`pip install mars_time` and you should be good to go!
:code:`pip install mars_time` and you should be good to go! (note: I plan to
push this to PyPI at the v1.0 release. For now, it is *not* on PyPI).

Alternatively, if you want to develop this package (either by modifying the
documentation, adding features, or modifying tests, you'll need to install it
Expand Down
8 changes: 5 additions & 3 deletions docs/_sources/rst/release-notes.rst.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Release Notes
=============
These describe the "beta" state of the project. Since any API changes will break
links, these will be removed with v1.0.0. The project release notes will look
more like numpy's (for example) after that point.
links, these may be removed with v1.0.0. My idea is that they will look more
like numpy's after that point.

v0.5.0
------
Expand All @@ -11,11 +11,13 @@ additional attribute to ``MarsTime``.

* Added attribute :attr:`mars_time.MarsTime.solar_longitude`
* Removed :data:`mars_time.mars_year_starting_datetime`. This is replaced with
:func:`mars_time.mars_year_starting_datetimes` which goes from year -9 to 100.
:func:`mars_time.mars_year_starting_datetimes` which goes from year -99 to 100.
This improved the accuracy of the computations
* Added tests to :func:`mars_time.get_current_mars_time`
* Modified the __str__ of :class:`mars_time.MarsTime` and
:class:`mars_time.MarsTimeDelta` to truncate at 2 decimals
* Added classmethod to :class:`mars_time.MarsTime` to create that class from Ls
* Added improved Ls computation function to :class:`mars_time.MarsTime`

With the addition of more accurate Mars year starting datetimes, the computation
of the solar longitude is now more accurate.
Expand Down
33 changes: 17 additions & 16 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
</p>
<ul class="bd-navbar-elements navbar-nav">

<li class="nav-item">
<a class="nav-link nav-internal" href="rst/accuracy.html">
Accuracy
</a>
</li>


<li class="nav-item">
<a class="nav-link nav-internal" href="rst/install.html">
Installation
Expand Down Expand Up @@ -236,6 +243,13 @@
</p>
<ul class="bd-navbar-elements navbar-nav">

<li class="nav-item">
<a class="nav-link nav-internal" href="rst/accuracy.html">
Accuracy
</a>
</li>


<li class="nav-item">
<a class="nav-link nav-internal" href="rst/install.html">
Installation
Expand Down Expand Up @@ -330,26 +344,21 @@
<h1 id="index">Index</h1>

<div class="genindex-jumpbox">
<a href="#_"><strong>_</strong></a>
<a href="#A"><strong>A</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#H"><strong>H</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#O"><strong>O</strong></a>
| <a href="#P"><strong>P</strong></a>
| <a href="#S"><strong>S</strong></a>

</div>
<h2 id="_">_</h2>
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="rst/generated/mars_time.MarsTime.html#mars_time.MarsTime.__init__">__init__() (mars_time.MarsTime method)</a>

<ul>
<li><a href="rst/generated/mars_time.MarsTimeDelta.html#mars_time.MarsTimeDelta.__init__">(mars_time.MarsTimeDelta method)</a>
<li><a href="rst/generated/mars_time.constants.aphelion_sol.html#mars_time.constants.aphelion_sol">aphelion_sol (in module mars_time.constants)</a>
</li>
</ul></li>
</ul></td>
</tr></table>

Expand Down Expand Up @@ -409,14 +418,6 @@ <h2 id="N">N</h2>
</ul></td>
</tr></table>

<h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="rst/generated/mars_time.constants.orbital_eccentricity.html#mars_time.constants.orbital_eccentricity">orbital_eccentricity (in module mars_time.constants)</a>
</li>
</ul></td>
</tr></table>

<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
Expand Down
54 changes: 23 additions & 31 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>Welcome &#8212; mars_time documentation</title>
<title>Mars Time &#8212; mars_time documentation</title>



Expand Down Expand Up @@ -40,7 +40,7 @@
<script>DOCUMENTATION_OPTIONS.pagename = 'index';</script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Installation" href="rst/install.html" />
<link rel="next" title="Accuracy" href="rst/accuracy.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
Expand Down Expand Up @@ -122,6 +122,13 @@
</p>
<ul class="bd-navbar-elements navbar-nav">

<li class="nav-item">
<a class="nav-link nav-internal" href="rst/accuracy.html">
Accuracy
</a>
</li>


<li class="nav-item">
<a class="nav-link nav-internal" href="rst/install.html">
Installation
Expand Down Expand Up @@ -242,6 +249,13 @@
</p>
<ul class="bd-navbar-elements navbar-nav">

<li class="nav-item">
<a class="nav-link nav-internal" href="rst/accuracy.html">
Accuracy
</a>
</li>


<li class="nav-item">
<a class="nav-link nav-internal" href="rst/install.html">
Installation
Expand Down Expand Up @@ -332,8 +346,8 @@
<div id="searchbox"></div>
<article class="bd-article" role="main">

<section id="welcome">
<h1>Welcome<a class="headerlink" href="#welcome" title="Permalink to this heading">#</a></h1>
<section id="mars-time">
<h1>Mars Time<a class="headerlink" href="#mars-time" title="Permalink to this heading">#</a></h1>
<p><code class="code docutils literal notranslate"><span class="pre">mars_time</span></code> is a package for converting between Martian times and
Earth times. You may be interested in this package if:</p>
<ul class="simple">
Expand All @@ -347,44 +361,25 @@ <h1>Welcome<a class="headerlink" href="#welcome" title="Permalink to this headin
times to others.</p></li>
</ul>
<p>If any of these apply to you, this package is for you.</p>
<section id="a-note-about-accuracy">
<h2>A note about accuracy<a class="headerlink" href="#a-note-about-accuracy" title="Permalink to this heading">#</a></h2>
<p>This package makes 2 assumptions that can introduce errors:</p>
<ul class="simple">
<li><p>A Mars year has a constant length. The Piqueux <em>et al</em> paper of accurate
Mars year starting dates indicates, for example, that Mars year 97 to 98
is 686.995 days, whereas Mars year 99 to 100 is 686.959 days. I assume the
Mars years have a constant length, but this assumption is not quite true.</p></li>
<li><p>The constants are infinitely precise. Some constants (like the solar
longitude at perihelion) aren’t particularly precise. It may not even be
possible for them to be more precise without running into errors described in
the first bullet point.</p></li>
</ul>
<p>Therefore I recommend you use this package as a <em>generally</em> accurate
time converter—not a <em>supremely</em> accurate time converter. If you need
second or minute accuracy and precision, I suggest you use SPICE.</p>
<p>If you know of a way to perform more accurate calculations, please
<a class="reference external" href="https://github.com/kconnour/mars_time/issues">raise an issue</a> to help improve
this package.</p>
<div class="toctree-wrapper compound">
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Useful links</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="rst/accuracy.html">Accuracy</a></li>
<li class="toctree-l1"><a class="reference internal" href="rst/install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="rst/api-reference.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="rst/examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="rst/release-notes.html">Release Notes</a></li>
</ul>
</div>
</section>
</section>
<section id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this heading">#</a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
<p>Last updated: May 04, 2023</p>
<p>Last updated: May 31, 2023</p>
</section>


Expand All @@ -399,11 +394,11 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
<div class="footer-article-item"><!-- Previous / next buttons -->
<div class="prev-next-area">
<a class="right-next"
href="rst/install.html"
href="rst/accuracy.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">Installation</p>
<p class="prev-next-title">Accuracy</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
Expand All @@ -425,10 +420,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h1 nav-item toc-entry"><a class="reference internal nav-link" href="#">Welcome</a><ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#a-note-about-accuracy">A note about accuracy</a></li>
</ul>
</li>
<li class="toc-h1 nav-item toc-entry"><a class="reference internal nav-link" href="#">Mars Time</a></li>
<li class="toc-h1 nav-item toc-entry"><a class="reference internal nav-link" href="#indices-and-tables">Indices and tables</a></li>
</ul>

Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
Loading