sdf-xarray 0.3.2__cp312-cp312-win_amd64.whl → 0.5.0__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lib/SDFC_14.4.7/sdfc.lib +0 -0
- sdf_xarray/__init__.py +274 -13
- sdf_xarray/_version.py +3 -3
- sdf_xarray/dataset_accessor.py +53 -2
- sdf_xarray/download.py +88 -0
- sdf_xarray/plotting.py +442 -80
- sdf_xarray/sdf_interface.cp312-win_amd64.pyd +0 -0
- sdf_xarray/sdf_interface.pyx +4 -2
- {sdf_xarray-0.3.2.dist-info → sdf_xarray-0.5.0.dist-info}/METADATA +26 -52
- {sdf_xarray-0.3.2.dist-info → sdf_xarray-0.5.0.dist-info}/RECORD +13 -12
- {sdf_xarray-0.3.2.dist-info → sdf_xarray-0.5.0.dist-info}/entry_points.txt +3 -0
- {sdf_xarray-0.3.2.dist-info → sdf_xarray-0.5.0.dist-info}/WHEEL +0 -0
- {sdf_xarray-0.3.2.dist-info → sdf_xarray-0.5.0.dist-info}/licenses/LICENCE +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sdf-xarray
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Provides a backend for xarray to read SDF files as created by the EPOCH plasma PIC code.
|
|
5
|
-
Author-Email: Peter Hill <peter.hill@york.ac.uk>, Joel Adams <joel.adams@york.ac.uk>, Shaun Doherty <shaun.doherty@york.ac.uk>, Chris Herdman <chris.herdman@york.ac.uk>
|
|
5
|
+
Author-Email: Peter Hill <peter.hill@york.ac.uk>, Joel Adams <joel.adams@york.ac.uk>, Shaun Doherty <shaun.doherty@york.ac.uk>, Chris Herdman <chris.herdman@york.ac.uk>, Liam Pattinson <liam.pattinson@york.ac.uk>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
7
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -10,34 +10,14 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Requires-Python: <3.15,>=3.11
|
|
18
18
|
Requires-Dist: numpy>=2.0.0
|
|
19
19
|
Requires-Dist: xarray>=2024.1.0
|
|
20
20
|
Requires-Dist: dask>=2024.7.1
|
|
21
|
-
Provides-Extra: docs
|
|
22
|
-
Requires-Dist: sphinx>=5.3; extra == "docs"
|
|
23
|
-
Requires-Dist: sphinx_autodoc_typehints>=1.19; extra == "docs"
|
|
24
|
-
Requires-Dist: sphinx-book-theme>=0.4.0rc1; extra == "docs"
|
|
25
|
-
Requires-Dist: sphinx-argparse-cli>=1.10.0; extra == "docs"
|
|
26
|
-
Requires-Dist: sphinx-inline-tabs; extra == "docs"
|
|
27
|
-
Requires-Dist: pickleshare; extra == "docs"
|
|
28
|
-
Requires-Dist: ipython; extra == "docs"
|
|
29
|
-
Requires-Dist: matplotlib; extra == "docs"
|
|
30
|
-
Requires-Dist: pint; extra == "docs"
|
|
31
|
-
Requires-Dist: pint-xarray; extra == "docs"
|
|
32
|
-
Requires-Dist: myst-parser; extra == "docs"
|
|
33
|
-
Provides-Extra: test
|
|
34
|
-
Requires-Dist: pytest>=3.3.0; extra == "test"
|
|
35
|
-
Requires-Dist: dask[complete]; extra == "test"
|
|
36
|
-
Requires-Dist: matplotlib; extra == "test"
|
|
37
|
-
Provides-Extra: lint
|
|
38
|
-
Requires-Dist: ruff; extra == "lint"
|
|
39
|
-
Provides-Extra: build
|
|
40
|
-
Requires-Dist: cibuildwheel[uv]; extra == "build"
|
|
41
21
|
Provides-Extra: jupyter
|
|
42
22
|
Requires-Dist: dask[diagnostics]; extra == "jupyter"
|
|
43
23
|
Requires-Dist: ipykernel>=6.29.5; extra == "jupyter"
|
|
@@ -54,35 +34,28 @@ Description-Content-Type: text/markdown
|
|
|
54
34
|

|
|
55
35
|

|
|
56
36
|
[](https://sdf-xarray.readthedocs.io)
|
|
57
|
-
[](https://github.com/astral-sh/ruff)
|
|
58
38
|
|
|
59
39
|
|
|
60
40
|
sdf-xarray provides a backend for [xarray](https://xarray.dev) to read SDF files as created by
|
|
61
41
|
[EPOCH](https://epochpic.github.io) using the [SDF-C](https://github.com/epochpic/SDF_C) library.
|
|
62
42
|
Part of [BEAM](#broad-epoch-analysis-modules-beam) (Broad EPOCH Analysis Modules).
|
|
63
43
|
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
64
46
|
> [!IMPORTANT]
|
|
65
47
|
> To install this package make sure you are using one of the Python versions listed above.
|
|
66
48
|
|
|
67
|
-
## Installation
|
|
68
|
-
|
|
69
49
|
Install from PyPI with:
|
|
70
50
|
|
|
71
51
|
```bash
|
|
72
52
|
pip install sdf-xarray
|
|
73
53
|
```
|
|
74
54
|
|
|
75
|
-
|
|
76
|
-
> For use within jupyter notebooks, run this additional command after installation:
|
|
77
|
-
>
|
|
78
|
-
> ```bash
|
|
79
|
-
> pip install "sdf-xarray[jupyter]"
|
|
80
|
-
> ```
|
|
81
|
-
|
|
82
|
-
or from a local checkout:
|
|
55
|
+
or download this code locally:
|
|
83
56
|
|
|
84
57
|
```bash
|
|
85
|
-
git clone https://github.com/epochpic/sdf-xarray.git
|
|
58
|
+
git clone --recursive https://github.com/epochpic/sdf-xarray.git
|
|
86
59
|
cd sdf-xarray
|
|
87
60
|
pip install .
|
|
88
61
|
```
|
|
@@ -91,6 +64,9 @@ We recommend switching to [uv](https://docs.astral.sh/uv/) to manage packages.
|
|
|
91
64
|
|
|
92
65
|
## Usage
|
|
93
66
|
|
|
67
|
+
Below are some simple examples to get you started. Please read the full
|
|
68
|
+
documentation here <https://sdf-xarray.readthedocs.io>.
|
|
69
|
+
|
|
94
70
|
### Single file loading
|
|
95
71
|
|
|
96
72
|
```python
|
|
@@ -111,15 +87,22 @@ print(df["Electric_Field_Ex"])
|
|
|
111
87
|
|
|
112
88
|
### Multi-file loading
|
|
113
89
|
|
|
114
|
-
|
|
115
|
-
|
|
90
|
+
You can open all the SDF files for a given simulation by calling the `open_mfdataset`
|
|
91
|
+
function from `sdf_xarray`. This will additionally add a time dimension using the `"time"`
|
|
92
|
+
value stored in each files attributes.
|
|
93
|
+
|
|
94
|
+
> [!IMPORTANT]
|
|
95
|
+
> If your simulation has multiple `output` blocks so that not all variables are
|
|
96
|
+
> output at every time step, then at the timesteps where those variables are not
|
|
97
|
+
> present they will have have a value of nan. To clean your dataset by removing
|
|
98
|
+
> these nan values we suggest using the `xarray.DataArray.dropna` function or
|
|
99
|
+
> loading sparse data along separate time dimensions using `separate_times=True`.
|
|
116
100
|
|
|
117
101
|
```python
|
|
118
|
-
|
|
119
|
-
from sdf_xarray import SDFPreprocess
|
|
102
|
+
from sdf_xarray import open_mfdataset
|
|
120
103
|
|
|
121
|
-
|
|
122
|
-
|
|
104
|
+
ds = open_mfdataset("*.sdf")
|
|
105
|
+
print(ds)
|
|
123
106
|
|
|
124
107
|
# Dimensions:
|
|
125
108
|
# time: 301, X_Grid_mid: 128, ...
|
|
@@ -129,15 +112,6 @@ with xr.open_mfdataset("*.sdf", preprocess=SDFPreprocess()) as ds:
|
|
|
129
112
|
# Attributes: (22) ...
|
|
130
113
|
```
|
|
131
114
|
|
|
132
|
-
`SDFPreprocess` checks that all the files are from the same simulation, as
|
|
133
|
-
ensures there's a `time` dimension so the files are correctly concatenated.
|
|
134
|
-
|
|
135
|
-
If your simulation has multiple `output` blocks so that not all variables are
|
|
136
|
-
output at every time step, then those variables will have `NaN` values at the
|
|
137
|
-
corresponding time points.
|
|
138
|
-
|
|
139
|
-
For more in depth documentation please visit: <https://sdf-xarray.readthedocs.io/>
|
|
140
|
-
|
|
141
115
|
## Citing
|
|
142
116
|
|
|
143
117
|
If sdf-xarray contributes to a project that leads to publication, please acknowledge this by citing sdf-xarray. This can be done by clicking the "cite this repository" button located near the top right of this page.
|
|
@@ -173,4 +147,4 @@ To run checks locally before opening a pull request, see [CONTRIBUTING.md](CONTR
|
|
|
173
147
|
|
|
174
148
|

|
|
175
149
|
|
|
176
|
-
Originally developed by [PlasmaFAIR](https://plasmafair.github.io), EPSRC Grant EP/V051822/1
|
|
150
|
+
Originally developed by [PlasmaFAIR](https://plasmafair.github.io), EPSRC Grant EP/V051822/1
|
|
@@ -6,20 +6,21 @@ include/SDFC_14.4.7/sdf_list_type.h,sha256=Quu8v0-SEsQuJpGtEZnm09tAyXqWNitx0sXl5
|
|
|
6
6
|
include/SDFC_14.4.7/sdf_vector_type.h,sha256=dbKjhzRRsvhzrnTwVjtVlvnuisEnRMKY-vvdm94ok_Q,1595
|
|
7
7
|
include/SDFC_14.4.7/stack_allocator.h,sha256=L7U9vmGiVSw3VQLIv9EzTaVq7JbFxs9aNonKStTkUSg,1335
|
|
8
8
|
include/SDFC_14.4.7/uthash.h,sha256=rIyy_-ylY6S_7WaZCCC3VtvXaC9q37rFyA0f1U9xc4w,63030
|
|
9
|
-
lib/SDFC_14.4.7/sdfc.lib,sha256=
|
|
9
|
+
lib/SDFC_14.4.7/sdfc.lib,sha256=ABEAPa767DQyIFFzUpsXkT9-F93atuPapAjmpRTpVvo,350158
|
|
10
10
|
lib/SDFC_14.4.7/SDFCConfig.cmake,sha256=IOA1eusC-KvUK4LNTEiOAmEdaPH1ZvNvbYPgiG1oZio,802
|
|
11
11
|
lib/SDFC_14.4.7/SDFCConfigVersion.cmake,sha256=pN7Qqyf04s3izw7PYQ0XK6imvmhaVegSdR_nEl3Ok_o,2830
|
|
12
12
|
lib/SDFC_14.4.7/SDFCTargets-release.cmake,sha256=G4zdx5PyjePigeD_a6rmZAxbk7L8Nf0klUnV78Lm2fI,828
|
|
13
13
|
lib/SDFC_14.4.7/SDFCTargets.cmake,sha256=OVt1Gm8n7Ew4fiTmA9yHoef3vIIGwsXUZfqeG9p9Bys,4152
|
|
14
|
-
sdf_xarray/__init__.py,sha256=
|
|
15
|
-
sdf_xarray/_version.py,sha256=
|
|
14
|
+
sdf_xarray/__init__.py,sha256=eFVAdNklw3LFGvU3NLsdraGXnRe3k_dtOhnyI0XtUHA,35371
|
|
15
|
+
sdf_xarray/_version.py,sha256=DbdCWfYFkRJvAt-jOwagEQlh0JevGHTJX-w-tGxtNFg,746
|
|
16
16
|
sdf_xarray/csdf.pxd,sha256=ADPjAuHsodAvdOz96Z_XlFF7VL3KmVaXcTifWDP3rK0,4205
|
|
17
|
-
sdf_xarray/dataset_accessor.py,sha256=
|
|
18
|
-
sdf_xarray/
|
|
19
|
-
sdf_xarray/
|
|
20
|
-
sdf_xarray/sdf_interface.
|
|
21
|
-
sdf_xarray
|
|
22
|
-
sdf_xarray-0.
|
|
23
|
-
sdf_xarray-0.
|
|
24
|
-
sdf_xarray-0.
|
|
25
|
-
sdf_xarray-0.
|
|
17
|
+
sdf_xarray/dataset_accessor.py,sha256=u3yJvT3Eg64gOWd_3NUYJwaTO5VVPA1k-TpW2FCNdzg,3984
|
|
18
|
+
sdf_xarray/download.py,sha256=fD3267jwpsprKDOoj5lEQEvMKPjiguwyfTkbKj7UgiM,3166
|
|
19
|
+
sdf_xarray/plotting.py,sha256=KHjJfO_n-3zXo6mNNbSW2Sv9oSxc06rr6RMtSIxLE24,17612
|
|
20
|
+
sdf_xarray/sdf_interface.cp312-win_amd64.pyd,sha256=eKNPfwSeI8t-O4DCPtPSDVVFG7Q9lRxTaFgNzXPpq8w,343040
|
|
21
|
+
sdf_xarray/sdf_interface.pyx,sha256=j0BpaltExUI_T-DMQvWaavKSrq9vqHkrmkJMJfCwDsA,12096
|
|
22
|
+
sdf_xarray-0.5.0.dist-info/METADATA,sha256=zVDIkM4EqPq_bvqWZ6StSPz9SKzydWQUkWjsOmrQfDo,6909
|
|
23
|
+
sdf_xarray-0.5.0.dist-info/WHEEL,sha256=chqeLhPBtPdrOoreR34YMcofSk3yWDQhkrsDJ2n48LU,106
|
|
24
|
+
sdf_xarray-0.5.0.dist-info/entry_points.txt,sha256=mmd-BWj57UCrpJxhzUQgscB7-13_bnbhYH8SUZxXIqU,110
|
|
25
|
+
sdf_xarray-0.5.0.dist-info/licenses/LICENCE,sha256=aHWuyELjtzIL1jTXFHTbI3tr9vyVyhnw3I9_QYPdEX8,1515
|
|
26
|
+
sdf_xarray-0.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|