WMM2020_CEXT
This library was modified to make a Python C Extension. This makes the library easy to install if you have the proper compilers installed. Additionally, I published Windows .whl binaries to pypi.org.
Install
wmm2020_cext has prebuilt Windows binaries (.whl files), so the library can easily be installed with pip.
python -m pip install wmm2020_cext
Use with wmm2020
import wmm2020
import numpy as np
wmm2020.wmm(np.array([0]), np.array([0]), 0, 0)
Manually Install
Install Visual Studio C Compilers https://wiki.python.org/moin/WindowsCompilers to compile the C extension.
If this is done correctly you can simply pip install ./path/to/library or build your binaries
python setup.py bdist_wheel (or pip wheel --no-deps ./path/to/library). The wheel library is required.
WMM2020
WMM2020 World Magnetic Model...in simple, object-oriented Python. WMM2015 is also available. Tested on Linux, Mac and Windows. Most C compilers work. At this time Visual Studio is not supported since MSVC doesn't export function symbols without additional headers, which is typically done with something like SWIG.
Install
for the latest release from PyPi:
python -m pip install wmm2020
Optionally, to get the cutting-edge development version:
git clone https://github.com/space-physics/wmm2020
python -m pip install -e wmm2020
This Python wrapper of WMM2020 uses our build-on-run technique. The first time you use WMM2020, you will see messages from the Meson build system and your C compiler.
Usage
an example script
python RunWMM2020.py
or as a Python module:
import wmm2020
mag = wmm2020.wmm(glat, glon, alt_km, yeardec)
Reference
- WMM2020 inclination map
- WMM2020 declination map
Metadata
Release files for wmm2020-cext 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wmm2020_cext-1.1.3.tar.gz | 3.1 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
| wmm2020_cext-1.1.3-cp39-cp39-win32.whl | CPython 3.9 | CPython 3.9 | Windows x86-32 | Details |
| wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl | CPython 3.8 | CPython 3.8 | Windows x86-64 | Details |
| wmm2020_cext-1.1.3-cp38-cp38-win32.whl | CPython 3.8 | CPython 3.8 | Windows x86-32 | Details |
| wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-64 | Details |
| wmm2020_cext-1.1.3-cp37-cp37m-win32.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-32 | Details |
Total release size: 41.5 MB
Release files / wmm2020_cext-1.1.3.tar.gz
| Download URL | wmm2020_cext-1.1.3.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5370ac5824eaa7ec03366fe65ecfbd84e31192d4bd85f4c4a6437672cdacab53
|
|
BLAKE2b-256 checksum How to use checksums |
f5686d25715fd8b37e0b0dbad96c4042f34cdc3d668b4067d88e36ecc3d81d2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl
| Download URL | wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d6ade1ecaf7b198d753a0c2b709d2bdd8c32cf107e4bff7bfa1ad8d11441bc21
|
|
BLAKE2b-256 checksum How to use checksums |
56fb38b191ca3bd6a09c70b89ad88467d150a53c5315249ec687330b189a44f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / wmm2020_cext-1.1.3-cp39-cp39-win32.whl
| Download URL | wmm2020_cext-1.1.3-cp39-cp39-win32.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.9 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
de855e3c733a3cc5c6cf80d659f43cd27ced9d1ab1d9aeb54db0b9883eb4b1c5
|
|
BLAKE2b-256 checksum How to use checksums |
4003aa0a9abe7bf3a071b0e73f1e0391efa925bf42e3934ceed488fe334c5842
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl
| Download URL | wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4af2f45e8432ca6659145bb0d6b68ea66622e332c52a7676f162125d442f4962
|
|
BLAKE2b-256 checksum How to use checksums |
92353bdde1d9ddd952059106da8542a4db20f2b9e87e2652261c04b5d9e351bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / wmm2020_cext-1.1.3-cp38-cp38-win32.whl
| Download URL | wmm2020_cext-1.1.3-cp38-cp38-win32.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.8 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
f8b10991db8acb9ba2fa1d2783fa19fb13a1f8810800f7ab895be289c283c23a
|
|
BLAKE2b-256 checksum How to use checksums |
bbbb7ed08d289dc4bb4a1b1646d8d099677a5563f31d621f48b1def7eb7cf6db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl
| Download URL | wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6d18eb4781a7f063f55eab345b731fad14ac6abb260f9b4b4c7bd2b04f1e99d2
|
|
BLAKE2b-256 checksum How to use checksums |
3e1ed90647dca4410728f604f67ea8596612997311260397df592a464e5172f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / wmm2020_cext-1.1.3-cp37-cp37m-win32.whl
| Download URL | wmm2020_cext-1.1.3-cp37-cp37m-win32.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
f6f858b77e34e4e21336ca6da385f6bf58fc5b9171ce657352a9c984309c230d
|
|
BLAKE2b-256 checksum How to use checksums |
d8adf72459fec30c1238868f266731bad74f8bbc4d8a949ce9bbe86fb4adbdc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|