Python client for the MIDL solar wind dataset
Project description
midl
Python client for the MIDL solar wind dataset.
Install
pip install csem-midl
Quickstart
import midl
ds = midl.load("2005-01-01 00:00", "2005-01-01 01:00", "32re")
print(ds)
<xarray.Dataset> Size: 4kB
Dimensions: (time: 61)
Coordinates:
* time (time) datetime64[ns] 488B 2005-01-01 ... 2005-01-01T01:00:00
Data variables:
Bx (time) float64 488B -6.05 -3.94 -3.7 -3.75 ... -2.01 -1.78 -2.08
By (time) float64 488B 3.84 3.5 3.12 2.94 3.2 ... 4.97 5.3 5.29 5.2
Bz (time) float64 488B -0.93 -4.06 -4.83 -4.92 ... 1.25 2.04 2.05 2.11
Ux (time) float64 488B -422.3 -429.9 -433.6 ... -437.4 -441.8 -441.8
Uy (time) float64 488B -13.38 -12.91 -9.05 ... -28.15 -27.06 -26.68
Uz (time) float64 488B 26.93 47.59 54.86 54.99 ... 0.46 1.42 0.92
rho (time) float64 488B 5.169 5.439 5.481 5.359 ... 6.131 6.363 6.323
T (time) float64 488B 1.33e+05 1.321e+05 ... 1.159e+05 1.159e+05
Attributes:
source: MIDL
url: https://csem.engin.umich.edu/MIDL/
target: 32Re
midl_propagation: {'method': 'ballistic', 'target_re': 32.0}
The 14re and 32re downloads are ballistically propagated server-side.
If you want a different boundary, download l1 and propagate it yourself:
l1 = midl.load("2024-05-10", "2024-05-11", "l1")
ds_20 = midl.propagate(l1, "ballistic", 20) # or any target in Re
# equivalent:
ds_20 = l1.midl.propagate("ballistic", 20)
propagate() reads the per-timestamp source position from the L1 dataset's
X column. A ValueError is raised if you pass a dataset without X
(e.g. a pre-propagated 14re/32re download). If the dataset is already
tagged as propagated, a UserWarning is emitted and the call proceeds.
1D MHD is reserved as method='mhd' but currently raises
NotImplementedError.
Save to file:
midl.to_csv(ds, "storm.csv")
midl.to_dat(ds, "storm.dat")
Data is cached locally after the first download.
See also
- MIDL-Pipeline — the code that produces the MIDL dataset
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 csem_midl-0.2.0.tar.gz.
File metadata
- Download URL: csem_midl-0.2.0.tar.gz
- Upload date:
- Size: 6.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
568bff1a6c6431d63ee4ee83ddda49c5abc192adb914bdc215d102648fc1ba6a
|
|
| MD5 |
183d014852991bfd34ae0d812f06c6f0
|
|
| BLAKE2b-256 |
d475b94201539974a3ad5f88331c3ab4bc1e43c43e84056f13cf360249ab6159
|
File details
Details for the file csem_midl-0.2.0-py3-none-any.whl.
File metadata
- Download URL: csem_midl-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33df404ac4de9a228b341f86f8ce878c2fe41fba5ac3468dc72faca7033fa877
|
|
| MD5 |
12bc8c81a67bbd50d130180357d9bdaa
|
|
| BLAKE2b-256 |
281af1422ba12a845b9d3f036b05b7af04c3166d1b60c44fad38bf8b98c9bbd6
|