Skip to content
Snippets Groups Projects
Commit 5b3e3361 authored by jlaura's avatar jlaura Committed by Jason R Laura
Browse files

Documentation in for rtfd.

parent 5db0cb20
No related branches found
No related tags found
No related merge requests found
: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
: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:
:mod:`io` --- Input/Output Drivers
=======================================
.. toctree::
gdal
control
json
\ No newline at end of file
: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:
:mod:`utils` --- Utilities
=======================================
.. toctree::
utils
log
: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
:mod:`utils.utils` --- Utilities
=============================================================
The :mod:`utils.utils` module provides generic I/O utilities
.. versionadded:: 0.1.0
.. automodule:: plio.utils.utils
:synopsis:
:members:
==========
User Guide
==========
.. toctree::
:maxdepth: 1
Installation <installation>
Tutorials <tutorials/index>
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.
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.)
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
#############################
Introduction to the tutorials
#############################
Assumptions
===========
......@@ -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
......
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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment