diff --git a/docs/_static/favicon.png b/docs/_static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..bf01c9a56a934c0e04ca8fdb210d75646107b3be Binary files /dev/null and b/docs/_static/favicon.png differ diff --git a/docs/_static/images/bugs.png b/docs/_static/images/bugs.png new file mode 100644 index 0000000000000000000000000000000000000000..153a38b638e640fa593694bc0a6de24051a33b07 Binary files /dev/null and b/docs/_static/images/bugs.png differ diff --git a/docs/_static/images/documentation.png b/docs/_static/images/documentation.png new file mode 100644 index 0000000000000000000000000000000000000000..b5b9ce85baf288055592819659f34811c06454b7 Binary files /dev/null and b/docs/_static/images/documentation.png differ diff --git a/docs/_static/images/download.png b/docs/_static/images/download.png new file mode 100644 index 0000000000000000000000000000000000000000..5b78d2bebc51dc4211e455927adbcdef3d7922c8 Binary files /dev/null and b/docs/_static/images/download.png differ diff --git a/docs/_static/images/download2.png b/docs/_static/images/download2.png new file mode 100644 index 0000000000000000000000000000000000000000..d6986a867b39b9609e2132952364c93125cd47d2 Binary files /dev/null and b/docs/_static/images/download2.png differ diff --git a/docs/_static/images/feed-icon.jpg b/docs/_static/images/feed-icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a2ca139514407eb7c6489408a2a0665b5e4e46f7 Binary files /dev/null and b/docs/_static/images/feed-icon.jpg differ diff --git a/docs/_static/images/feed-icon.png b/docs/_static/images/feed-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ff1777b6d23e0f3544431cd32d7b9016f3cffba2 Binary files /dev/null and b/docs/_static/images/feed-icon.png differ diff --git a/docs/_static/images/matched.png b/docs/_static/images/matched.png new file mode 100644 index 0000000000000000000000000000000000000000..7482834b2640bbb832cb22732d4490b96e699d73 Binary files /dev/null and b/docs/_static/images/matched.png differ diff --git a/docs/_static/images/tutorial.png b/docs/_static/images/tutorial.png new file mode 100644 index 0000000000000000000000000000000000000000..b9766d39c3baadd6bb5879317c611e7fcb1b5ad4 Binary files /dev/null and b/docs/_static/images/tutorial.png differ diff --git a/docs/_static/images/yi_jing_01_chien.jpg b/docs/_static/images/yi_jing_01_chien.jpg new file mode 100644 index 0000000000000000000000000000000000000000..276df14df2228bdd676f5ef4256be66c20703aa4 Binary files /dev/null and b/docs/_static/images/yi_jing_01_chien.jpg differ diff --git a/docs/_static/mydoc.css b/docs/_static/mydoc.css new file mode 100644 index 0000000000000000000000000000000000000000..a3df02c46672b3e8a4008c25c4a69b2fc90e51a8 --- /dev/null +++ b/docs/_static/mydoc.css @@ -0,0 +1,3 @@ +@import url("default.css"); + +span.strike {text-decoration: line-through; } diff --git a/docs/_templates/ganalytics_layout.html b/docs/_templates/ganalytics_layout.html new file mode 100644 index 0000000000000000000000000000000000000000..54f42c07904658a823fc599f162c556d54f62caa --- /dev/null +++ b/docs/_templates/ganalytics_layout.html @@ -0,0 +1,213 @@ +{%- block doctype -%} +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +{%- endblock %} +{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} +{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} + +{%- macro relbar() %} + <div class="related"> + <h3>{{ _('Navigation') }}</h3> + <ul> + {%- for rellink in rellinks %} + <li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}> + <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}" + {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a> + {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li> + {%- endfor %} + {%- block rootrellink %} + <li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li> + {%- endblock %} + {%- for parent in parents %} + <li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li> + {%- endfor %} + {%- block relbaritems %} {% endblock %} + </ul> + </div> +{%- endmacro %} + +{%- macro sidebar() %} + {%- if not embedded %}{% if not theme_nosidebar|tobool %} + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + {%- block sidebarlogo %} + {%- if logo %} + <p class="logo"><a href="{{ pathto(master_doc) }}"> + <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/> + </a></p> + {%- endif %} + {%- endblock %} + {%- block sidebartoc %} + {%- if display_toc %} + <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3> + {{ toc }} + {%- endif %} + {%- endblock %} + {%- block sidebarrel %} + {%- if prev %} + <h4>{{ _('Previous topic') }}</h4> + <p class="topless"><a href="{{ prev.link|e }}" + title="{{ _('previous chapter') }}">{{ prev.title }}</a></p> + {%- endif %} + {%- if next %} + <h4>{{ _('Next topic') }}</h4> + <p class="topless"><a href="{{ next.link|e }}" + title="{{ _('next chapter') }}">{{ next.title }}</a></p> + {%- endif %} + {%- endblock %} + {%- block sidebarsourcelink %} + {%- if show_source and has_source and sourcename %} + <h3>{{ _('This Page') }}</h3> + <ul class="this-page-menu"> + <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}" + rel="nofollow">{{ _('Show Source') }}</a></li> + </ul> + {%- endif %} + {%- endblock %} + {%- if customsidebar %} + {% include customsidebar %} + {%- endif %} + {%- block sidebarsearch %} + {%- if pagename != "search" %} + <div id="searchbox" style="display: none"> + <h3>{{ _('Quick search') }}</h3> + <form class="search" action="{{ pathto('search') }}" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="{{ _('Go') }}" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + {{ _('Enter search terms or a module, class or function name.') }} + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + {%- endif %} + {%- endblock %} + </div> + </div> + {%- endif %}{% endif %} +{%- endmacro %} + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + {{ metatags }} + {%- if not embedded %} + {%- set titlesuffix = " — "|safe + docstitle|e %} + {%- else %} + {%- set titlesuffix = "" %} + {%- endif %} + <title>{{ title|striptags }}{{ titlesuffix }}</title> + <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> + <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> + {%- if not embedded %} + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '{{ pathto("", 1) }}', + VERSION: '{{ release|e }}', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '{{ file_suffix }}', + HAS_SOURCE: {{ has_source|lower }} + }; + </script> + {%- for scriptfile in script_files %} + <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> + {%- endfor %} + {%- if use_opensearch %} + <link rel="search" type="application/opensearchdescription+xml" + title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" + href="{{ pathto('_static/opensearch.xml', 1) }}"/> + {%- endif %} + {%- if favicon %} + <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> + {%- endif %} + {%- endif %} +{%- block linktags %} + {%- if hasdoc('about') %} + <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" /> + {%- endif %} + {%- if hasdoc('genindex') %} + <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" /> + {%- endif %} + {%- if hasdoc('search') %} + <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" /> + {%- endif %} + {%- if hasdoc('copyright') %} + <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" /> + {%- endif %} + <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" /> + {%- if parents %} + <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" /> + {%- endif %} + {%- if next %} + <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" /> + {%- endif %} + {%- if prev %} + <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" /> + {%- endif %} +{%- endblock %} +{%- block extrahead %} {% endblock %} + </head> + <body> +{%- block header %}{% endblock %} + +{%- block relbar1 %}{{ relbar() }}{% endblock %} + +{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} + + <div class="document"> +{%- block document %} + <div class="documentwrapper"> + {%- if not embedded %}{% if not theme_nosidebar|tobool %} + <div class="bodywrapper"> + {%- endif %}{% endif %} + <div class="body"> + {% block body %} {% endblock %} + </div> + {%- if not embedded %}{% if not theme_nosidebar|tobool %} + </div> + {%- endif %}{% endif %} + </div> +{%- endblock %} + +{%- block sidebar2 %}{{ sidebar() }}{% endblock %} + <div class="clearer"></div> + </div> + +{%- block relbar2 %}{{ relbar() }}{% endblock %} + +{%- block footer %} + <div class="footer"> + {%- if hasdoc('copyright') %} + {% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} + {%- else %} + {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {%- endif %} + {%- if last_updated %} + {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} + {%- endif %} + {%- if show_sphinx %} + {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} + {%- endif %} + </div> +{%- endblock %} + +<!--Begin Google Analytics Code --> +<script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', '']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + +</script> + +<!--End Google Analytics Code --> + </body> +</html> diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 0000000000000000000000000000000000000000..c6f9c48790e699a5793b53ed53f463c98e188fd5 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,19 @@ +{% extends "ganalytics_layout.html" %} + + +{% block rootrellink %} + <li><a href="{{ pathto('index') }}">home</a>| </li> + <li><a href="{{ pathto('search') }}">search</a>| </li> + <li><a href="{{ pathto('contents') }}">documentation </a> »</li> +{% endblock %} + + +{% block relbar1 %} + +{{ super() }} +{% endblock %} + +{# put the sidebar before the body #} +{% block sidebar1 %}{% endblock %} +{% block sidebar2 %}{{ sidebar() }}{% endblock %} + diff --git a/docs/conf.py b/docs/conf.py new file mode 100755 index 0000000000000000000000000000000000000000..36c266bd29d5acabcb7bbef51fa1c37a007ca20f --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,293 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# autocnet documentation build configuration file, created by +# sphinx-quickstart on Tue Jul 9 22:26:36 2013. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os +from unittest.mock import MagicMock + + +autodoc_mock_imports = ['proj4', 'gdal', 'osr','ogr', 'osgeo', 'osgeo.gdal', + 'osgeo.gdalconst'] + +''' +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return Mock() + +MOCK_MODULES = ['proj4', 'gdal', 'osr','ogr', 'cv2', 'scikit-image', 'skimage', 'skimage.feature', 'sklearn', 'osgeo'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) +''' + +# If extensions (or modules to document with autodoc) are in another +# directory, add these directories to sys.path here. If the directory is +# relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +# sys.path.insert(0, os.path.abspath('.')) + +# Get the project root dir, which is the parent dir of this + +# Insert the project root dir as the first element in the PYTHONPATH. +# This lets us ensure that the source package is imported, and that its +# version is used. + +sys.path.insert(0, os.path.abspath('../')) + +import plio + +# -- General configuration --------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +needs_sphinx = '1.3' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon'] + +# NumpyDoc Options +numpydoc_show_class_members = True +numpydoc_class_members_toctree = False + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Planetary I/O (plio)' +copyright = u'2016 - , Plio Developers' + +# The version info for the project you're documenting, acts as replacement +# for |version| and |release|, also used in various other places throughout +# the built documents. +# +# The short X.Y version. +version = plio.__version__ +# The full version, including alpha/beta/rc tags. +release = plio.__version__ + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to +# some non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = False + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built +# documents. +# keep_warnings = False + + +# -- Options for HTML output ------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a +# theme further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +html_title = "Planetary I/O" + +# A shorter title for the navigation bar. Default is the same as +# html_title. +html_short_title = "Plio" + +# The name of an image file (relative to this directory) to place at the +# top of the sidebar. +html_logo = "favicon.png" + +# The name of an image file (within the static path) to use as favicon +# of the docs. This file should be a Windows icon file (.ico) being +# 16x16 or 32x32 pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) +# here, relative to this directory. They are copied after the builtin +# static files, so a file named "default.css" will overwrite the builtin +# "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names +# to template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. +# Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. +# Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages +# will contain a <link> tag referring to it. The value of this option +# must be the base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'pliodoc' + +# -- Options for LaTeX output ------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', 'plio.tex', + u'Plio Documentation', + u'Jay Laura', 'manual'), +] + +# The name of an image file (relative to this directory) to place at +# the top of the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings +# are parts, not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output ------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'plio', + u'Plio Documentation', + [u'Jay Laura'], 1) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ---------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'plio', + u'Plio Documentation', + u'Jay Laura', + 'plio', + 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + diff --git a/docs/developers/index.rst b/docs/developers/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..6635e40be0726e60832a324ab4c56a1411fbbaf1 --- /dev/null +++ b/docs/developers/index.rst @@ -0,0 +1,5 @@ +Developer Guide +=============== + +.. toctree:: + :maxdepth: 1 diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..46ca92d5a16be9bea4f25416539cc34ede01eeae --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,76 @@ +.. autocnet documentation master file, created by + sphinx-quickstart on Tue Jul 9 22:26:36 2013. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + + +Planetary I/O +============= + +.. raw:: html + + <div class="section" id="showcase"> + <a href=""><img src="_static/images/.png" border="0" alt="An image about planets and I/O"/></a> + </div> + + +.. sidebar:: Releases + + - `Development 0.1.0dev <http://github.com/USGS-Astrogeology/plio>`_ + +Planetary I/O (Plio) is an open source collection of my commonly used I/O functionality. Plio is licensed in `the public domain`. + +.. _the public domain: license.html + + +.. toctree:: + :maxdepth: 1 + + users/index + developers/index + library/index + +.. raw:: html + + <style type="text/css"> + table.linktable { + margin: 10px; + margin-bottom: 20px; + margin-left:auto; + margin-right: auto; + } + table.icontable { + margin: 10px; + } + table.linktable td { + padding-left: 15px; + padding-right: 15px; + padding-bottom: 5px; + text-align: center; + } + </style> + + <table class="linktable"> + <tr> + <td> + <a href="users/installation.html"> + <img alt="Download" src="_static/images/download2.png" title="Download" height="80" style="display: block; margin-left: auto; margin-right: auto;"></a> </td> + <td> + <a href="users/tutorials/index.html"> + <img alt="Getting Started" src="_static/images/tutorial.png" title="Getting Started" height="80" style="display: block; margin-left: auto; margin-right: auto;"></a> </td> + <td> + <a href="library/index.html"> + <img alt="Documentation" src="_static/images/documentation.png" title="Documentation" height="80" style="display: block; margin-left: auto; margin-right: auto;"></a> </td> + <td> + <a href="http://github.com/pysal/pysal/issues?state=open"> + <img alt="Bug Report" src="_static/images/bugs.png" title="Bug Report" height="80" style="display: block; margin-left: auto; margin-right: auto;"></a> </td> + </tr> + + <tr> + <td><strong><small><a href="users/installation.html">Install</a></small></strong></td> + <td><strong><small><a href="users/tutorials/index.html">Getting Started</a></small></strong></td> + <td><strong><small><a href="library/index.html">Documentation</a></small></strong></td> + <td><strong><small><a href="https://github.com/USGS-Astrogeology/autocnet/issues">Report Bugs</a></small></strong></td> + </tr> + </table> + diff --git a/docs/library/date/index.rst b/docs/library/date/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..02e55096b53a3a899854e8f5af12afa4ebc558d5 --- /dev/null +++ b/docs/library/date/index.rst @@ -0,0 +1,7 @@ +:mod:`date` --- DateTime Transformation +======================================= + +.. toctree:: + + julian2ls + julian2season \ No newline at end of file diff --git a/docs/library/date/julian2ls.rst b/docs/library/date/julian2ls.rst new file mode 100644 index 0000000000000000000000000000000000000000..d857831635e8989b8a830e1a1a77a9809ba725ba --- /dev/null +++ b/docs/library/date/julian2ls.rst @@ -0,0 +1,10 @@ +:mod:`date.julian2ls` --- Conversion from Julian to LsubS +========================================================= + +The :mod:`date.julian2ls` module provides functionality for the conversion between Julian date and LsubS + +.. versionadded:: 0.1.0 + +.. automodule:: plio.date.julian2ls + :synopsis: Julian <-> LsubS conversion functionality + :members: \ No newline at end of file diff --git a/docs/library/date/julian2season.rst b/docs/library/date/julian2season.rst new file mode 100644 index 0000000000000000000000000000000000000000..760e224a86f262fc283ada03f82b395d27053fb4 --- /dev/null +++ b/docs/library/date/julian2season.rst @@ -0,0 +1,10 @@ +:mod:`date.julian2season` --- Conversion from Julian to Mars Season +==================================================================== + +The :mod:`date.julian2season` module provides functionality for the conversion between Julian date and Martian season + +.. versionadded:: 0.1.0 + +.. automodule:: plio.date.julian2season + :synopsis: Julian <-> Mars season conversion functionality + :members: \ No newline at end of file diff --git a/docs/library/index.rst b/docs/library/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..f82dc7710ca672bd9fa21718109ae9d2a743e5d6 --- /dev/null +++ b/docs/library/index.rst @@ -0,0 +1,19 @@ +################# +Library Reference +################# + +:Release: |version| +:Date: |today| + +AutoCNet +======== + +Sub-packages +------------ + +.. toctree:: + :maxdepth: 1 + + date/index + io/index + utils/index diff --git a/docs/library/io/control.rst b/docs/library/io/control.rst new file mode 100644 index 0000000000000000000000000000000000000000..d2f133eeddd6ed0205d221cd52a98ac96be7b868 --- /dev/null +++ b/docs/library/io/control.rst @@ -0,0 +1,9 @@ +:mod:`io.io_controlnetwork` --- ISIS Compatible Control Network Creation +============================================================================ + +The :mod:`io.io_controlnetwork` module supports the creation of control networks in ISIS format. + +.. versionadded:: 0.1.0 + +.. automodule:: plio.io.io_controlnetwork + :members: \ No newline at end of file diff --git a/docs/library/io/gdal.rst b/docs/library/io/gdal.rst new file mode 100644 index 0000000000000000000000000000000000000000..b8a79b8b0851571bf1a540164df21d59bd307f46 --- /dev/null +++ b/docs/library/io/gdal.rst @@ -0,0 +1,14 @@ +:mod:`io.io_gdal` --- Geospatial Data Abstraction Library +============================================================= + +The :mod:`io.io_gdal` and :mod:`io.extract_metadata` modules provide convenience wrappers to GDAL. + +.. versionadded:: 0.1.0 + +.. automodule:: plio.io.io_gdal + :synopsis: GDAL wrapper + :members: + +.. automodule:: plio.io.extract_metadata + :synopsis: Metadata parsing + :members: diff --git a/docs/library/io/index.rst b/docs/library/io/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..e7c00405197c3ecb68c8349d5ad87b1a608e5428 --- /dev/null +++ b/docs/library/io/index.rst @@ -0,0 +1,8 @@ +:mod:`io` --- Input/Output Drivers +======================================= + +.. toctree:: + + gdal + control + json \ No newline at end of file diff --git a/docs/library/io/json.rst b/docs/library/io/json.rst new file mode 100644 index 0000000000000000000000000000000000000000..0073b75ac65f1cc788ee3f84d5ee83d23e33658d --- /dev/null +++ b/docs/library/io/json.rst @@ -0,0 +1,9 @@ +:mod:`io.io_json` --- JSON Wrapper +============================================================= + +The :mod:`io.io_json` module provides a convenience wrapper to access JSON +.. versionadded:: 0.1.0 + +.. automodule:: plio.io.io_json + :synopsis: + :members: diff --git a/docs/library/utils/index.rst b/docs/library/utils/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..45fddd15259540a7e05c446d048f9c05e2fb0037 --- /dev/null +++ b/docs/library/utils/index.rst @@ -0,0 +1,7 @@ +:mod:`utils` --- Utilities +======================================= + +.. toctree:: + + utils + log diff --git a/docs/library/utils/log.rst b/docs/library/utils/log.rst new file mode 100644 index 0000000000000000000000000000000000000000..473b956433cba07aba8fc3de71883195e6ba8bdd --- /dev/null +++ b/docs/library/utils/log.rst @@ -0,0 +1,9 @@ +:mod:`utils.log` --- Wrapper for setting up a user defined logger +================================================================== + +The :mod:`utils.log` module provides logging setup assistance +.. versionadded:: 0.1.0 + +.. automodule:: plio.utils.log + :synopsis: + :members: \ No newline at end of file diff --git a/docs/library/utils/utils.rst b/docs/library/utils/utils.rst new file mode 100644 index 0000000000000000000000000000000000000000..c285cc384b87a86bd1d34436e9e5e150cc42c5c3 --- /dev/null +++ b/docs/library/utils/utils.rst @@ -0,0 +1,9 @@ +:mod:`utils.utils` --- Utilities +============================================================= + +The :mod:`utils.utils` module provides generic I/O utilities +.. versionadded:: 0.1.0 + +.. automodule:: plio.utils.utils + :synopsis: + :members: diff --git a/docs/users/index.rst b/docs/users/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..9721f18450cc51723997685ffadffd6a815b6c63 --- /dev/null +++ b/docs/users/index.rst @@ -0,0 +1,10 @@ +========== +User Guide +========== + + +.. toctree:: + :maxdepth: 1 + + Installation <installation> + Tutorials <tutorials/index> diff --git a/docs/users/installation.rst b/docs/users/installation.rst new file mode 100644 index 0000000000000000000000000000000000000000..3a39821fe71e284d8ffa505d3b80604e25ba0ec0 --- /dev/null +++ b/docs/users/installation.rst @@ -0,0 +1,23 @@ +Installation +============ + +We provide Planetary I/O (plio) as a binary package via conda and for +installation via the standard setup.py script. + +Via Conda +--------- + +1. Download and install the Python 3.x Miniconda installer. Respond ``Yes`` when + prompeted to add conda to your BASH profile. +2. Bring up a command line and add the ``conda-forge`` channel to your channel + list: ``conda config --add channels conda-forge``. This adds an entry to your + ``~/.condarc`` file. +3. Install plio: ``conda install -c jlaura plio`` +4. To update plio: ``conda update -c jlaura plio`` + +Via setup.py +------------ +This method assumes that you have the necessary dependencies already +installed. The installation of dependencies can be non-trivial because of GDAL. +We supply an ``environment.yml`` file that works with Anaconda Python's ``conda +env`` environment management tool. diff --git a/docs/users/tutorials/gdal.rst b/docs/users/tutorials/gdal.rst new file mode 100644 index 0000000000000000000000000000000000000000..11e574268f9434bde4ac9da88283bafac8d010c5 --- /dev/null +++ b/docs/users/tutorials/gdal.rst @@ -0,0 +1,8 @@ +Opening a Spatial Data Set with GDAL +===================================== + +This will be populated with an iPython notebook: + +1. Cook the notebook +2. ipython nbconvert hello.ipynb --to rst +3. Profit (or automate this process...either or.) diff --git a/docs/users/tutorials/index.rst b/docs/users/tutorials/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..872ecefb9a83ade262c9ccc35473337e6cf20eca --- /dev/null +++ b/docs/users/tutorials/index.rst @@ -0,0 +1,8 @@ +Getting Started with AutoCNet +============================= + +.. toctree:: + :maxdepth: 1 + + Introduction to the Tutorials <intro> + Opening a Spatial Data Set with GDAL <gdal> \ No newline at end of file diff --git a/docs/users/tutorials/intro.rst b/docs/users/tutorials/intro.rst new file mode 100644 index 0000000000000000000000000000000000000000..be345978145250c9b9712bd929cbbf1b77d87e4e --- /dev/null +++ b/docs/users/tutorials/intro.rst @@ -0,0 +1,7 @@ +############################# +Introduction to the tutorials +############################# + +Assumptions +=========== + diff --git a/plio/date/julian2ls.py b/plio/date/julian2ls.py index 963f9a3f05924331d80f07aebd006625fb76e69a..897efa0de6743085f2b2b302b77fa594481e5b9d 100644 --- a/plio/date/julian2ls.py +++ b/plio/date/julian2ls.py @@ -6,8 +6,20 @@ import numpy as np def zero360(angles, rad=False): """ - angles: ndarray: a scalar or vector of float angles - rad: boolean: flag whether angles are in radians + Convert angle to base 0-360 + + Parameters + ---------- + angles : float + a scalar angle to convert + + rad : boolean + flag whether angles are in radians + + Returns + ------- + bb : float + converted angle """ if rad: @@ -26,14 +38,29 @@ def zero360(angles, rad=False): def julian2ls(date, marsyear=None, reverse=False): """ - date: Scalar or NumPy ndarray - marsyear: - reverse: Boolean - Reverse conversion from L_{s} to julian Original IDL from Hugh Keiffer - References: + Parameters + ----------- + date : numeric + Scalar or NumPy ndarray or dates + + marsyear : float + Mars year for use in reverse + + reverse : bool + Reverse conversion from L_{s} to julian + + Returns + ------- + out : numeric + float or array of float LsubS or Julian dates + + myn : float + If LsubS to Mars year, return the Mars year + + References ----------- [1] M. Allison and M. McEwen.' A post-Pathfinder evaluation of areocentric solar coordinates with improved timing recipes for Mars seasonal/diurnal diff --git a/plio/date/julian2season.py b/plio/date/julian2season.py index 609ce8674324a187701756117ed20c8764af6421..1330fd52786ad654c6d55656bff01560cce962f1 100644 --- a/plio/date/julian2season.py +++ b/plio/date/julian2season.py @@ -1,13 +1,20 @@ -import krc.config as config - -def j2season(_date): +def j2season(_date, year=686.9799625, marsday=8.5875, startdate=144.61074994): """ - Ls date to a KRC season. + Ls date to a KRC season to determine which KRC seasonal lookup tables to use Parameters ----------- _date : float - The input date to be converted + The input date to be converted + + year : float + The mars year to search within + + marsday : float + The length of a Mars day + + startdate : float + The zero, start date Returns ------- @@ -17,11 +24,11 @@ def j2season(_date): The integer index to the stop season """ date = _date - if date < config.RECORD_START_DATE: - remainder = (config.RECORD_START_DATE - date) / config.YEAR - date = date + int(remainder + 1.0) * config.YEAR - dateoffset = (date - config.RECORD_START_DATE) % config.YEAR - recordoffset = dateoffset / config.MARTIAN_DAY + if date < startdate: + remainder = (startdate - date) / year + date = date + int(remainder + 1.0) * year + dateoffset = (date - startdate) % year + recordoffset = dateoffset / marsday startseason = int(recordoffset) stopseason = startseason + 1 return recordoffset, startseason, stopseason diff --git a/plio/io/io_gdal.py b/plio/io/io_gdal.py index f1349c495bb779b9151b4dc15fd192ab274da0a4..76c957df2a62aadc23669b8ade0c27f523b80144 100644 --- a/plio/io/io_gdal.py +++ b/plio/io/io_gdal.py @@ -2,7 +2,6 @@ import os import warnings import gdal -import gdalconst import numpy as np import osr import pvl @@ -548,6 +547,7 @@ def match_rasters(match_to, match_from, destination, GRA_Cubic, GRA_CubicSpline, GRA_Lanczos, GRA_Average, GRA_Mode} """ + import gdalconst # import here so Sphinx can build the docos, mocking is not working # TODO: If a destination is not provided create an in-memory GeoDataSet object match_to_srs = match_to.dataset.GetProjection() match_to_gt = match_to.geotransform