Skip to content

Commit

Permalink
A bunch of documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ayshih committed Jul 13, 2016
1 parent c2087d2 commit e01af5e
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 8 deletions.
6 changes: 6 additions & 0 deletions docs/code_ref/housekeeping/gps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
GPS
===

.. automodule:: gripspy.housekeeping.gps
:members:
:undoc-members:
7 changes: 7 additions & 0 deletions docs/code_ref/housekeeping/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Housekeeping
============

.. toctree::

gps
pointing
6 changes: 6 additions & 0 deletions docs/code_ref/housekeeping/pointing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Pointing
========

.. automodule:: gripspy.housekeeping.pointing
:members:
:undoc-members:
1 change: 1 addition & 0 deletions docs/code_ref/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ Code reference for gripspy
:maxdepth: 2

science/index.rst
housekeeping/index.rst
telemetry
util
10 changes: 8 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
default_role = 'obj'

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
Expand Down Expand Up @@ -290,4 +290,10 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('http://matplotlib.org/', None),
'Cython': ('http://docs.cython.org/', None),
'skimage': ('http://scikit-image.org/docs/stable/', None),
'astropy': ('http://docs.astropy.org/en/stable/', None)}
46 changes: 42 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,53 @@ Prerequisites
-------------
This package depends on:

* Python 2.7
* Python 2.7 (untested on Python 3.x)
* NumPy
* SciPy
* matplotlib
* Cython, and corresponding build environment for compiling C code
* scikit-image
* Astropy

However, rather than installing these packages individually, it is highly recommended that one instead use a scientific Python distribution (e.g., `Anaconda <https://www.continuum.io/downloads>`_), which will include useful packages such as Jupyter Notebook (fomerly IPython Notebook).
However, rather than installing these packages individually, it is highly recommended that one
instead use a scientific Python distribution (e.g., `Anaconda <https://www.continuum.io/downloads>`_),
which will include useful packages such as Jupyter Notebook (formerly IPython Notebook).

The build environment for C code is a bit trickier to set up on Windows than on the other platforms. I will write out the steps at a later time.
The build environment for C code is a bit trickier to set up on Windows than on the other platforms.
Assuming that you are using Python 2.7, here are the steps:

* Install `Microsoft Visual C++ Compiler for Python 2.7 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`_
* Patch `C:\yourpythoninstall\Lib\distutils\msvc9compiler.py` by adding the following highlighted lines at the top
of the `find_vcvarsall()` function:

.. code-block:: python
:emphasize-lines: 8-13
def find_vcvarsall(version):
"""Find the vcvarsall.bat file
At first it tries to find the productdir of VS 2008 in the registry. If
that fails it falls back to the VS90COMNTOOLS env var.
"""
vsbase = VS_BASE % version
vcpath = os.environ['ProgramFiles']
vcpath = os.path.join(vcpath, 'Common Files', 'Microsoft',
'Visual C++ for Python', '9.0', 'vcvarsall.bat')
if os.path.isfile(vcpath): return vcpath
vcpath = os.path.join(os.environ['LOCALAPPDATA'], 'Programs', 'Common', 'Microsoft', 'Visual C++ for Python', '9.0', 'vcvarsall.bat')
if os.path.isfile(vcpath): return vcpath
...
* Create a file `distutils.cfg` in `C:\yourpythoninstall\Lib\distutils` with the following:

.. code-block:: none
[build]
compiler=msvc
You should now be able to build extensions.
If these steps don't look work, or you are using a different version of Python,
`this page <https://github.com/cython/cython/wiki/CythonExtensionsOnWindows>`_ has useful information.

Installation
------------
Expand All @@ -50,7 +86,8 @@ Simply import `gripspy` to start.
import gripspy
The class for handling science data are under `gripspy.science`.
The classes for handling science data are under `gripspy.science`.
The classes for handling housekeeping data are under `gripspy.housekeeping`.
Here are some examples of what has been implemented so far:

.. code-block:: python
Expand All @@ -59,6 +96,7 @@ Here are some examples of what has been implemented so far:
data = gripspy.science.BGOCounterData(filename)
data = gripspy.science.BGOEventData(filename)
data = gripspy.science.PYSequence(filelist)
data = gripspy.housekeeping.GPSData(filename)
Code Reference
--------------
Expand Down
3 changes: 1 addition & 2 deletions gripspy/housekeeping/pointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class PointingData(object):
Notes
-----
Trusts the "user" GPS information
Averages the SIP1 and SIP2 pressure information
This implementation is still incomplete!
"""
def __init__(self, telemetry_file=None, save_file=None):
if telemetry_file is not None:
Expand Down

0 comments on commit e01af5e

Please sign in to comment.