Code Monkey home page Code Monkey logo

pyigrf's Introduction

pyIGRF

What is pyIGRF?

This is a package of IGRF-13 (International Geomagnetic Reference Field) about python version. We can calculate magnetic field intensity and transform coordinate between GeoGraphical and GeoMagnetic. It don't need any Fortran compiler. But it needs NumPy package.

How to Install?

Download this package and run install.

python setup.py install

How to Use it?

First import this package.

import pyIGRF

You can calculate magnetic field intensity.

pyIGRF.igrf_value(lat, lon, alt, date)

or calculate the annual variation of magnetic filed intensity.

pyIGRF.igrf_variation(lat, lon, alt, date)

the response is 7 float number about magnetic filed which is:

  • D: declination (+ve east)
  • I: inclination (+ve down)
  • H: horizontal intensity
  • X: north component
  • Y: east component
  • Z: vertical component (+ve down)
  • F: total intensity
    unit: degree or nT

If you want to use IGRF-13 more flexibly, you can use module calculate. There is two function which is closer to Fortran. You can change it for different coordination.

from pyIGRF import calculate

Another module load_coeffs can be used to get g[m][n] or h[m][n] same as that in formula.

from pyIGRF.load_coeffs import get_coeffs

Model Introduction and igrf13-coeffs File Download

https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html

pyigrf's People

Contributors

zzyztyy avatar jordan-heemskerk 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.