Python software to fetch SuperMag data
Project description
SuperMAG Python Client
The SuperMAG Python Client provides programmatic access to magnetometer data and indices from the SuperMAG web services API. It supports data retrieval, station inventory queries, and data manipulation using Python with built-in pandas support.
Features
- Inventory Query: Retrieve lists of SuperMAG stations for a given event.
- Magnetometer Data: Fetch vector magnetic field data (NEZ, geographic) for selected stations.
- Magnetic Indices: Retrieve SuperMAG indices (SME, SMU, SML, etc.) with support for sunlit/dark/regional variations and solar wind parameters.
- Flexible Output: Choose between
pandas.DataFrameor rawlistoutputs viaFORMATparameter. - Helper Tools: Utility functions to extract nested dictionary structures, process CSV exports, and perform unit tests.
Requirements
- Python 3
pandas(pip install pandas)certifi(required at sites with SSL cert enforcement)
Example Usage
from supermag_api import *
userid = 'YOUR_SUPERMAG_USER_ID'
start = [2019, 11, 15, 10, 40]
# Get inventory
status, stations = SuperMAGGetInventory(userid, start, 3600)
# Fetch data
status, data = SuperMAGGetData(userid, start, 3600, 'all', 'HBK')
# Fetch indices
status, indices = SuperMAGGetIndices(userid, start, 3600, 'all')
# Access nested components
n_nez = sm_grabme(data, 'N', 'nez')
# Quick test
sm_microtest(4, userid)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
supermag_api-0.0.5.tar.gz
(12.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file supermag_api-0.0.5.tar.gz.
File metadata
- Download URL: supermag_api-0.0.5.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20754a647f280b578a28ede4f6fe69227c579f3f4eba633a1baaed0b0909b097
|
|
| MD5 |
b22694e5809eb99364c90990aebf338b
|
|
| BLAKE2b-256 |
df1d65c53f995273b276258ef06a8bd6c5ec58f74268b8dccacfb7b384549dc4
|
File details
Details for the file supermag_api-0.0.5-py3-none-any.whl.
File metadata
- Download URL: supermag_api-0.0.5-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bed9034f5fa6a61c2f03c41aec342ebf5e25150cd88b7ba0560346a7f99405fd
|
|
| MD5 |
9620a3477eff6decffe550022007e655
|
|
| BLAKE2b-256 |
4281d64f16270637eaacc18f8420072a4a0b6ea5e731179876027c5fed2d341c
|