{ "info": { "author": "Filip \u0160", "author_email": "projects@filips.si", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Atmospheric Science", "Topic :: Scientific/Engineering :: Physics" ], "description": "Magnetic field calculator\n=========================\n\n[![Latest Version][icon-version]][link-pypi]\n[![Total Downloads][icon-downloads]][link-pypi]\n[![License][icon-license]][link-license]\n[![Build Status][icon-travis]][link-travis]\n\nPython API for British Geological Survey magnetic field calculator.\n\n## Description\n\nThis project magnetic field calculator. It uses is British Geological Survey (BGS) API web service for calculation.\n\nThe web service makes the World Magnetic Model (WMM), the International Geomagnetic Reference Field (IGRF) and the BGS Global Geomagnetic Model (BGGM) available as a web service. The IGRF and WMM have no restrictions on use, the BGGM is only available to subscribers. The API provides options to select which model and revision to use. Values of the magnetic field at any point around the world can be retrieved for a given date.\n\n**The project is not part of the BGS. It is just API client for it, made by community. For any information about BGS, you should use [the official website][link-bgs].**\n\n## Usage\n\nFirst, you need to import the calculator class:\n\n```python\nfrom magnetic_field_calculator import MagneticFieldCalculator\n```\n\nThen you need to init the calculator client, with default WMM model and it's latest available version:\n\n```python\ncalculator = MagneticFieldCalculator()\n```\n\nModel, it's revisions and custom URS can be changed with parameters:\n\n```python\ncalculator = MagneticFieldCalculator(\n model='wmm',\n revision='2015',\n sub_revision='2',\n custom_url='https://example.com'\n)\n```\n\nYou can then get the calculations for given location:\n\n```python\nresult = calculator.calculate(\n latitude=-80,\n longitude=140,\n altitude=200,\n date='2018-12-31'\n)\n```\n\nThe only required parameters are latitude and longitude, but it is reccomended to also set others for best results. Some of them are exclusive and you should not use them at same time. You can also set username and password for HTTP auth for protected models. For more details about parameters, see [the official documentation][link-parameters].\n\nOutput is returned as dictionary:\n\n```python\nfield_value = result['field-value']\ndeclination = field_value['declination']\ninclination = field_value['inclination']\ntotal_intensity = field_value['total-intensity']\nnorth_intensity = field_value['north-intensity']\neast_intensity = field_value['east-intensity']\nvertical_intensity = field_value['vertical-intensity']\nhorizontal_intensity = field_value['horizontal-intensity']\n```\n\nSome output properties will have `units` and `value` sub properties. Output format will depend on used input, specially for height and date.\n\nYou can also look to [example file][link-example] for more examples.\n\n## Versioning\n\nThis library uses [SemVer][link-semver] for versioning. For the versions available, see [the tags][link-tags] on this repository.\n\n## License\n\nThis library is licensed under the GPLv3+ license. See the [LICENSE][link-license-file] file for details.\n\n[icon-version]: https://img.shields.io/pypi/v/magnetic-field-calculator.svg?style=flat-square&label=version\n[icon-downloads]: https://img.shields.io/pypi/dm/magnetic-field-calculator.svg?style=flat-square&label=downloads\n[icon-license]: https://img.shields.io/pypi/l/magnetic-field-calculator.svg?style=flat-square&label=license\n[icon-travis]: https://img.shields.io/travis/com/filips123/MagneticFieldCalculator.svg?style=flat-square&label=build+status\n\n[link-pypi]: https://pypi.org/project/magnetic-field-calculator/\n[link-license]: https://choosealicense.com/licenses/gpl-3.0/\n[link-semver]: https://semver.org/\n[link-travis]: https://travis-ci.com/filips123/MagneticFieldCalculator/\n\n[link-example]: https://github.com/filips123/MagneticFieldCalculator/blob/master/example.py\n[link-tags]: https://github.com/filips123/MagneticFieldCalculator/tags/\n[link-license-file]: https://github.com/filips123/MagneticFieldCalculator/blob/master/LICENSE\n\n[link-bgs]: https://bgs.ac.uk/\n[link-parameters]: http://geomag.bgs.ac.uk/web_service/GMModels/help/parameters\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/filips123/MagneticFieldCalculator/", "keywords": "british-geological-survey,geomag,magnetic-field,api,calculator", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "magnetic-field-calculator", "package_url": "https://pypi.org/project/magnetic-field-calculator/", "platform": "", "project_url": "https://pypi.org/project/magnetic-field-calculator/", "project_urls": { "Homepage": "https://github.com/filips123/MagneticFieldCalculator/" }, "release_url": "https://pypi.org/project/magnetic-field-calculator/1.0.1/", "requires_dist": [ "pylint ; extra == 'lint'" ], "requires_python": ">= 3.4", "summary": "Python API for British Geological Survey magnetic field calculator", "version": "1.0.1" }, "last_serial": 4874034, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "092b310118dc1b1e22fb10cc28f84177", "sha256": "0192cd01a367b3d960ed82cb7cb47fd37594433cc886d13e2f6582a28a069730" }, "downloads": -1, "filename": "magnetic_field_calculator-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "092b310118dc1b1e22fb10cc28f84177", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.4", "size": 18610, "upload_time": "2019-02-27T12:08:00", "url": "https://files.pythonhosted.org/packages/cd/a7/bca3ec04708f9743ae96b3511c6d7c0deb047963a87eac7184940e9faa19/magnetic_field_calculator-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af7bb5b9171d56850b44e144cbf54f9f", "sha256": "67b73b0124dd52b998ef6e3dc3acc4f3015adabc447b1968bb9a6de51a2613a1" }, "downloads": -1, "filename": "magnetic-field-calculator-1.0.0.tar.gz", "has_sig": false, "md5_digest": "af7bb5b9171d56850b44e144cbf54f9f", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.4", "size": 5272, "upload_time": "2018-12-27T20:24:12", "url": "https://files.pythonhosted.org/packages/83/32/4a63d241ca78bb252585035951a32c804e481bbc5bd2b62b1e6b17ea9104/magnetic-field-calculator-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "cef2947ab1c06136544067d1ab45fc0b", "sha256": "7ad00cd9c764fdd4e7fcfa87141dec39c3a8f8adc0e4a891b1dcb7579c25b966" }, "downloads": -1, "filename": "magnetic_field_calculator-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cef2947ab1c06136544067d1ab45fc0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.4", "size": 18610, "upload_time": "2019-02-27T12:46:22", "url": "https://files.pythonhosted.org/packages/17/3a/fbea03c8147b2f116b795f86533d1faabe10b4c4525481918986edf4db1b/magnetic_field_calculator-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "313d80b5f0feeb4ae8c887dfaab3bd64", "sha256": "076f05a07b7033ac04cf1513d4b6902f67609d776113a266a74dd7720e2b345a" }, "downloads": -1, "filename": "magnetic-field-calculator-1.0.1.tar.gz", "has_sig": false, "md5_digest": "313d80b5f0feeb4ae8c887dfaab3bd64", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.4", "size": 19727, "upload_time": "2019-02-27T12:46:23", "url": "https://files.pythonhosted.org/packages/1a/b4/3a38036d906ec4721f2dff838519c0f297d50a30f6e200e6f7c8a444cc69/magnetic-field-calculator-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cef2947ab1c06136544067d1ab45fc0b", "sha256": "7ad00cd9c764fdd4e7fcfa87141dec39c3a8f8adc0e4a891b1dcb7579c25b966" }, "downloads": -1, "filename": "magnetic_field_calculator-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cef2947ab1c06136544067d1ab45fc0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.4", "size": 18610, "upload_time": "2019-02-27T12:46:22", "url": "https://files.pythonhosted.org/packages/17/3a/fbea03c8147b2f116b795f86533d1faabe10b4c4525481918986edf4db1b/magnetic_field_calculator-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "313d80b5f0feeb4ae8c887dfaab3bd64", "sha256": "076f05a07b7033ac04cf1513d4b6902f67609d776113a266a74dd7720e2b345a" }, "downloads": -1, "filename": "magnetic-field-calculator-1.0.1.tar.gz", "has_sig": false, "md5_digest": "313d80b5f0feeb4ae8c887dfaab3bd64", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.4", "size": 19727, "upload_time": "2019-02-27T12:46:23", "url": "https://files.pythonhosted.org/packages/1a/b4/3a38036d906ec4721f2dff838519c0f297d50a30f6e200e6f7c8a444cc69/magnetic-field-calculator-1.0.1.tar.gz" } ] }