GithubHelp home page GithubHelp logo

geomag-algorithms's Introduction

Geomag Algorithms

Build Status

Geomag Algorithms is an open source library for processing Geomagnetic timeseries data. It includes algorithms and input/output factories used by the USGS Geomagnetism Program to translate between data formats, generate derived data and indices in near-realtime, and research and develop new algorithms.

  • Accesses USGS data services.
  • Built using established open source python libraries NumPy, SciPy, and ObsPy.
  • Common geomagnetic formats including IAGA2002, IMFV122, IMFV283 (read only), and PCDCP.
  • Defines command line interface, geomag.py.
  • Embeddable Python API, import geomagio.

Examples

More Examples in docs/example/

The following examples request data from USGS for BOU observatory, H, E, Z, and F component, minute interval, and variation type data for the day 2016-07-04, then write IAGA2002 formatted output to the console.

Command Line Interface Example

geomag.py \
    --input edge \
    --observatory BOU \
    --inchannels H E Z F \
    --type variation \
    --interval minute \
    --output iaga2002 \
    --output-stdout \
    --starttime 2016-07-04T00:00:00Z \
    --endtime 2016-07-04T23:59:00Z

Command Line Interface documentation

Python API Example

import sys
import geomagio
from obspy.core import UTCDateTime

input_factory = geomagio.edge.EdgeFactory()
timeseries = input_factory.get_timeseries(
    observatory = 'BOU',
    channels = ('H', 'E', 'Z', 'F'),
    type = 'variation',
    interval = 'minute',
    starttime = UTCDateTime('2016-07-04T00:00:00Z'),
    endtime = UTCDateTime('2016-07-04T23:59:00Z'))

output_factory = geomagio.iaga2002.IAGA2002Factory()
output_factory.write_file(
    channels = ('H', 'E', 'Z', 'F'),
    fh = sys.stdout,
    timeseries = timeseries)

Python API documentation

Install

More Install options in docs/install.md.

Docker

Docker is the simplest install option.

  1. Create and start a new container

    named geomagio, listening on local port 8000, from the image usgs/geomag-algorithms on docker hub

    docker run -d --name geomagio -p 8000:80 usgs/geomag-algorithms
    
  2. Use the running container

  • Run the geomag.py command line interface:

    docker exec -it geomagio geomag.py
    
  • Run python interactively in a web browser:

    open http://localhost:8000
    

    In the top right corner, choose "New" then "Python 2"

Algorithms

Algorithms described in docs/algorithms/

Developing

Developing described in docs/develop.md.

License

License described in LICENSE.md

Problems or Questions?

Additional Links

geomag-algorithms's People

Contributors

hasimpson-usgs avatar jmfee-usgs avatar emcwhirter-usgs avatar aclaycomb-usgs avatar erigler-usgs avatar ysshah avatar dcstewart-usgs avatar emartinez-usgs avatar lbillingham avatar mhearne-usgs avatar ttwhite-usgs avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.