DIFI-8 IONOSPHERE MAGNETIC FIELD MODEL
The Dedicated Ionospheric Field Inversion (DIFI) model is a Swarm-based, global model of the Sq and equatorial electrojet magnetic fields at mid and low-latitudes. It describes variations with local time, season and solar flux and separates primary and induced magnetic fields. The latest version of DIFI is DIFI-8. Please see the DIFI-8 for the detail. Find info on xDIFI2 here.
Prerequirements
- Officially Python 3.9, 3.10, 3.11. 3.12 3.13
- geomaglib >= 1.2.1
- install by
pip install geomaglib>=1.2.1
- install by
- numpy
Installation
The recommended way to install wmm-calculator is via pip
pip install pyDIFI
Quick Start
Get magnetic vectors from single point
from DIFI import getSQfield
lat, lon, year, month, day, hour = 20.5, 100.5, 2024, 6, 6, 0
B = getSQfield(lat, lon, year, month, day, hour=hour)
It will return the results in dict type
{'Z': array([13.19036336]), 'Y': array([28.73130052]), 'X': array([0.65322314])}
Get magnetic vectors from array inputs
import random
from DIFI import getSQfield
year = 2023
month = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
day = 15
N = len(month)
lat = [random.uniform(-90, 90) for _ in range(N)]
lon = [random.uniform(-180, 180) for _ in range(N)]
B = getSQfield(lat, lon, year, month, day, model_name="xdifi2")
print(B)
It will return the results
{'Z': array([-2.89438186, 18.22932278, -0.66058193, 7.91297099, 8.00560867,
-2.84424521, 0.28690831, 5.21360212, 1.30044321, 5.78345537,
-0.15228731, 0.17291943]),
'Y': array([ 2.47943185, 36.00415516, 1.29842625, 22.99920884,
4.12382535, 2.21563329, -5.13570097, 6.71462628,
-9.61616475, 0.52689522, -10.66703289, -0.21119736]),
'X': array([ 2.77922129, 45.06151382, 1.14500601, -9.76631768, -1.57326838,
4.39040841, -7.6578116 , 11.15431048, -5.66268463, -6.03204388,
-4.6054734 , 4.19473274])}
Metadata
Release files for pyDIFI 8.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydifi-8.1.5.tar.gz | 2.4 MB | Without provenance | Details for pydifi-8.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydifi-8.1.5-py3-none-any.whl | Python 3 | none | any | Details for pydifi-8.1.5-py3-none-any.whl |
Total release size: 4.9 MB
Release files / pydifi-8.1.5.tar.gz
| Download URL | pydifi-8.1.5.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82e1ef14ee1a0f3e3c905d4c496287977ad65e7e74ae14ab1bedeca0eac2f63f
|
|
BLAKE2b-256 checksum How to use checksums |
a738891fe96c9b406266abec5f5882b07292edd8492b9c4c2a44c4a8f629b57c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / pydifi-8.1.5-py3-none-any.whl
| Download URL | pydifi-8.1.5-py3-none-any.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c27f9de923cdd010930727a414212ba10dc8cdb60332681dcdebf56f402bee40
|
|
BLAKE2b-256 checksum How to use checksums |
63dbce0a2756c057058a6e1b3c902111f6af1416660a42b998f562d489e04a9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for pyDIFI 8.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.