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

Ref/em and docs #9

Merged
merged 21 commits into from
Jun 28, 2018
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ ENV/
.ropeproject
*.sublime-workspace
*.sublime-project

# sphinx-gallery
/docs/auto_examples/*

# Jupyter
*.ipynb
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ sudo: false
env:
- TEST_DIR='tests'

before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=/home/travis/anaconda/bin:/home/travis/miniconda/bin:$PATH
- conda update --yes conda

install:
- conda install --quiet --yes pip python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib pillow cython ipython;
- pip install --upgrade pip;
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- cd geoana; python setup.py install; cd ..
- export MPLBACKEND="agg"

# Run test
script:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 SimPEG Team
Copyright (c) 2017-2018 SimPEG Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
56 changes: 55 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.. _geoana:


| :ref:`getting_started` | :ref:`connecting` | :ref:`installing` | :ref:`license` | `Documentation <http://geoana.readthedocs.io/en/latest/>`_ |

geoana
======

Expand All @@ -20,5 +23,56 @@ geoana
:alt: codacy status


Interactive geoscience (mostly) analytic functions in geophysics.
`geoana` is a collection of (mostly) analytic functions in geophysics. We take an object oriented
approach with the aim of having users be able to readily interact with the functions using `Jupyter <https://jupyter.org>`_


.. _getting_started:

Getting started
---------------

- If you do not already have python installed, we recommend downloading and installing it through `anaconda <https://www.anaconda.com/download/>`_
- :ref:`Install <installing>` geoana
- Browse the :ref:`gallery <examples>` for ideas and example usage
- Read the `documentation <http://geoana.readthedocs.io/en/latest/>`_ for more information on the library and what it can do

.. - See the `contributor guide` and `code of conduct` if you are interested in helping develop or maintain geoana

.. _connecting:

Connecting with the community
-----------------------------

geoana is a part of the larger `SimPEG <https://www.simpeg.xyz>`_ ecosystem. There are several avenues for connecting:

- a mailing list for questions and general news items: https://groups.google.com/forum/#!forum/simpeg
- a newsletter where meeting notices and re-caps are posted: http://eepurl.com/bVUoOL
- a slack group for real-time chat with users and developers of SimPEG: http://slack.simpeg.xyz/

.. _installing:

Installing
----------

geoana is available on `pypi <https://pypi.org/project/geoana/>`_ and can be installed by opening a command window and running:

.. code::

pip install geoana


To install from source, you can

.. code::

git clone https://github.com/simpeg/geoana.git
python setup.py install

.. _license:

License
-------

geoana is licensed under the `MIT license <https://github.com/simpeg/geoana/blob/master/LICENSE>`_ .

2 changes: 2 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ help:
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
rm -rf auto_examples/
rm -rf modules/generated/*

.PHONY: html
html:
Expand Down
27 changes: 25 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os

# 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('.'))

sys.path.append(os.path.abspath('../'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -33,6 +36,8 @@
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'matplotlib.sphinxext.plot_directive',
'sphinx_gallery.gen_gallery',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -51,7 +56,7 @@

# General information about the project.
project = u'geoana'
copyright = u'2017, SimPEG Team'
copyright = u'2017-2018, SimPEG Team'
author = u'SimPEG Team'

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -127,6 +132,14 @@
linkcheck_retries = 3
linkcheck_timeout = 500

# Sphinx Gallery
sphinx_gallery_conf = {
# path to your examples scripts
'examples_dirs' : '../examples',
'gallery_dirs' : 'auto_examples',
'backreferences_dir' : False
}

# 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.
Expand Down Expand Up @@ -306,7 +319,14 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('http://matplotlib.org/', None),
'properties': ('http://propertiespy.readthedocs.io/en/latest/', None),

}


def supress_nonlocal_image_warn():
Expand All @@ -324,3 +344,6 @@ def _supress_nonlocal_image_warn(self, msg, node, **kwargs):

supress_nonlocal_image_warn()

nitpick_ignore = [
('py:class', 'properties.base.base.HasProperties')
]
52 changes: 52 additions & 0 deletions docs/content/conventions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Conventions
===========

Coordinate systems
------------------

Cartesian
^^^^^^^^^

We use a right-handed coordinate system :math:`(x, y, z)` with z-positive up as shown in the Figure below.

.. image:: ../images/coordinates-02.png
:width: 40%
:align: center


Cylindrical
^^^^^^^^^^^

We again work with z-positive up and use :math:`\theta` to denote the azimuthal angle, thus the coordinate
system is defined as :math:`(r, \theta, z)`.

.. image:: ../images/coordinates-03.png
:width: 40%
:align: center


Spherical
^^^^^^^^^

We use :math:`r` for the radial direction, :math:`\theta` for the azimuthal direction, and :math:`\phi` for
the polar direction as shown in the figure below.

.. image:: ../images/coordinates-04.png
:width: 40%
:align: center


Fourier Transform
-----------------

For analysis and solutions in the frequency domain we use the :math:`e^{i \omega t}`
Fourier transform convention. Thus, we define our
Fourier Transform pair as

.. math ::
F(\omega) = \int_{-\infty}^{\infty} f(t) e^{- i \omega t} dt \\

f(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty} F(\omega) e^{i \omega t} d \omega

where :math:`\omega` is angular frequency, :math:`t` is time, :math:`F(\omega)` is the
function defined in the frequency domain and :math:`f(t)` is the function defined in the time domain.
3 changes: 2 additions & 1 deletion docs/content/earthquake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Earthquake
==========

.. autoclass:: geoana.earthquake
.. automodule:: geoana.earthquake.oksar
:members:
:undoc-members:
:show-inheritance:
33 changes: 32 additions & 1 deletion docs/content/em.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,37 @@
Electromagnetics
================

.. autoclass:: geoana.em
Base
----

.. automodule:: geoana.em.base
:members:
:undoc-members:
:show-inheritance:


Static
------

.. automodule:: geoana.em.static
:members:
:undoc-members:
:show-inheritance:


Frequency Domain
----------------

.. automodule:: geoana.em.fdem
:members:
:undoc-members:
:show-inheritance:


Time Domain
-----------

.. automodule:: geoana.em.tdem
:members:
:undoc-members:
:show-inheritance:
23 changes: 23 additions & 0 deletions docs/content/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _utils:

Utilities
=========

Core Utils
----------

.. automodule:: geoana.utils
:members:
:undoc-members:
:show-inheritance:


Spatial
-------

.. automodule:: geoana.spatial
:members:
:undoc-members:
:show-inheritance:


Binary file added docs/images/coordinates-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coordinates-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coordinates-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

.. include:: ../README.rst

.. _contents:

**Contents:**
Contents
--------

.. toctree::
:maxdepth: 2

content/earthquake
auto_examples/index
content/conventions
content/em
content/earthquake
content/utils

2 changes: 1 addition & 1 deletion examples/em/README.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Electromagnetics
****************
----------------
Loading