From 2e6ee5d32b17d81cb0015427d2a5a4807371db99 Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Wed, 20 Jan 2016 15:40:53 -0700 Subject: [PATCH] Update documentation examples, setup.py package list --- docs/algorithms/DeltaF_usage.md | 4 ++-- docs/algorithms/XYZ_usage.md | 4 ++-- docs/api.md | 10 +++++----- docs/usage.md | 6 ++++-- setup.py | 1 + 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/algorithms/DeltaF_usage.md b/docs/algorithms/DeltaF_usage.md index ff93d7746..beb0b2d02 100644 --- a/docs/algorithms/DeltaF_usage.md +++ b/docs/algorithms/DeltaF_usage.md @@ -6,7 +6,7 @@ and a scalar total-field measurement made by independent sensors. Read more about the [DeltaF Algorithm](./DeltaF.md). -`geomag.py --deltaf {geo, obs, obsd}` +`geomag.py --algorithm deltaf [--deltaf-from {geo, obs, obsd}]` ### Reference Frames @@ -21,7 +21,7 @@ about the [DeltaF Algorithm](./DeltaF.md). To compute DeltaF from HEZF data for Tucson observatory: ``` geomag.py \ - --deltaf obs \ + --algorithm deltaf \ --observatory TUC \ --type variation \ --interval minute \ diff --git a/docs/algorithms/XYZ_usage.md b/docs/algorithms/XYZ_usage.md index b01fdd8be..d154887f8 100644 --- a/docs/algorithms/XYZ_usage.md +++ b/docs/algorithms/XYZ_usage.md @@ -5,7 +5,7 @@ The XYZ Algorithm rotates between `geographic`, `observatory`, and `magnetic`, channel orientations. Read more about the [XYZ Algorithm](./XYZ.md). -`geomag.py --xyz {geo, mag, obs, obsd} {geo, mag, obs, obsd}` +`geomag.py --algorithm xyz [--xyz-from {geo,mag,obs,obsd}] [--xyz-to {geo,mag,obs,obsd}]` ### Reference Frames @@ -30,7 +30,7 @@ There are 3 reference frames in this library. To convert HEZF data in pcdcp files to XYZF for Tucson observatory for all of March 2013 output to iaga2002 files: - geomag.py --xyz obs geo --observatory TUC \ + geomag.py --algorithm xyz --observatory TUC \ --starttime 2013-03-01T00:00:00Z --endtime 2013-03-31T23:59:00Z \ --input-pcdcp-url file://data-pcdcp/./%(OBS)s%(year)s%(julian)s.%(i)s \ --output-iaga-url file://data-iaga/./$(obs)s%(Y)s%(j)s.%(i)s \ diff --git a/docs/api.md b/docs/api.md index 15c8df354..61ef90e05 100644 --- a/docs/api.md +++ b/docs/api.md @@ -44,11 +44,11 @@ Exception base class is `geomagio.TimeseriesFactoryException`. ## Algorithms -Base class is `geomagio.Algorithm` -Exception base class is `geomagio.AlgorithmException` +Base class is `geomagio.algorithm.Algorithm` +Exception base class is `geomagio.algorithm.AlgorithmException` -- Delta F `geomagio.DeltaFAlgorithm` -- XYZ `geomagio.XYZAlgorithm` +- Delta F `geomagio.algorithm.DeltaFAlgorithm` +- XYZ `geomagio.algorithm.XYZAlgorithm` ## Example @@ -60,7 +60,7 @@ The following example: - Plots the data using matplotlib ```python -from geomagio import XYZAlgorithm +from geomagio.algorithm import XYZAlgorithm from geomagio.edge import EdgeFactory from obspy.core import UTCDateTime diff --git a/docs/usage.md b/docs/usage.md index bc28f80a4..a0bc321e6 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -68,10 +68,12 @@ There are flags to specify certain algorithms should be run against the data. #### XYZ #### -`--xyz {geo, mag, obs, obsd} {geo, mag, obs, obsd}` +`--algorithm xyz` +`--xyz-from {geo, mag, obs, obsd}` (default is `obs`) +`--xyz-to {geo, mag, obs, obsd}` (default is `geo`) #### [XYZ Usage](./algorithms/XYZ_usage.md) #### -Rotate data from HEZ or HDZ to XYZ and back. +Rotate data from HEZ (obs) or HDZ (mag) to XYZ (geo) and back. Extensive explanation of all input and output methods: [IO Methods](./io.md) diff --git a/setup.py b/setup.py index 0257b0d1d..84ef2911c 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ setup( url='https://github.com/usgs/geomag-algorithms', packages=[ 'geomagio', + 'geomagio.algorithm', 'geomagio.iaga2002', 'geomagio.imfv283', 'geomagio.edge', -- GitLab