Geomag Algorithms
Geomag algorithms includes tools to fetch, process, and output geomag data.
Install
We recommend using virtual environments
-
Install
python
(2.7.X)- On OS X, we recommend using Homebrew ( http://brew.sh/ )
-
Install numpy, obspy requires this be installed separately.
pip install numpy
-
Install geomagio
pip install git+https://github.com/usgs/geomag-algorithms.git
-
Use geomagio
- Use the xyz main script,
xyz.py -h
. - In python scripts,
import geomagio
orimport geomagio.iaga2002
.
- Use the xyz main script,
Developing
-
Use npm to install
grunt-cli
npm install -g grunt-cli
-
Install
numpy
,scipy
,obspy
, andflake8
-
Clone this project (or fork and clone your fork)
git clone https://github.com/usgs/geomag-algorithms.git
-
From root directory of project, install npm dependencies
npm install
-
Run grunt to run unit tests, and watch for changes to python files
grunt
Coding Standards
This project adheres to PEP8 standards in most cases: https://www.python.org/dev/peps/pep-0008
PEP8 Exceptions
-
Hanging/Visual indents (E126, E127, E128, E131)
- line continuations should use two indentations (8 spaces).
- do not use visual indents.