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.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sdf-xarray
3
- Version: 0.3.2
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
- Requires-Python: <3.14,>=3.10
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
  ![Build/Publish](https://github.com/epochpic/sdf-xarray/actions/workflows/build_publish.yml/badge.svg)
55
35
  ![Tests](https://github.com/epochpic/sdf-xarray/actions/workflows/tests.yml/badge.svg)
56
36
  [![Read the Docs](https://img.shields.io/readthedocs/sdf-xarray?logo=readthedocs&link=https%3A%2F%2Fsdf-xarray.readthedocs.io%2F)](https://sdf-xarray.readthedocs.io)
57
- [![Formatted with black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
37
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](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
- > [!NOTE]
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
- To open a whole simulation at once, pass `preprocess=sdf_xarray.SDFPreprocess()`
115
- to `xarray.open_mfdataset`:
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
- import xarray as xr
119
- from sdf_xarray import SDFPreprocess
102
+ from sdf_xarray import open_mfdataset
120
103
 
121
- with xr.open_mfdataset("*.sdf", preprocess=SDFPreprocess()) as ds:
122
- print(ds)
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
  ![PlasmaFAIR logo](PlasmaFAIR.svg)
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=VyuxkhB3q8QOeICxMhp3a7jpi7GXvHRmIwFKCSHSyrA,350158
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=obgAD4Aecvvpd8GkxLIAiIagSaY0bFVP2Q397N48_5g,24201
15
- sdf_xarray/_version.py,sha256=bmLiJYnZTISDv_NDGANk6QDMSY0XTk0CwXXKhbOvW3Y,746
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=TvnVMBefnT1d94Bkllhd-__O3ittzpaVjZKfze-3WQ4,2484
18
- sdf_xarray/plotting.py,sha256=PnbEspR4XkA5SHkpoFKA2G7BYj5J3mVgR1TEeGol6Vw,7041
19
- sdf_xarray/sdf_interface.cp312-win_amd64.pyd,sha256=08xrwtYkgFqyN5GCr4sV5QP3g0mOozAPMg1DCVAqZm8,360960
20
- sdf_xarray/sdf_interface.pyx,sha256=PFC6upg14OZBqiGInLgBoxztIIKBk-HOh3WC9Ro4YUw,11975
21
- sdf_xarray-0.3.2.dist-info/METADATA,sha256=xvADFsOdsd5EzaZbVYGOUgmEMe4RzrTDF9IbyijadqE,7624
22
- sdf_xarray-0.3.2.dist-info/WHEEL,sha256=chqeLhPBtPdrOoreR34YMcofSk3yWDQhkrsDJ2n48LU,106
23
- sdf_xarray-0.3.2.dist-info/entry_points.txt,sha256=gP7BIQpXNg6vIf7S7p-Rw_EJZTC1X50BsVTkK7dA7g0,57
24
- sdf_xarray-0.3.2.dist-info/licenses/LICENCE,sha256=aHWuyELjtzIL1jTXFHTbI3tr9vyVyhnw3I9_QYPdEX8,1515
25
- sdf_xarray-0.3.2.dist-info/RECORD,,
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,,
@@ -1,3 +1,6 @@
1
1
  [xarray.backends]
2
2
  sdf_engine = sdf_xarray:SDFEntrypoint
3
3
 
4
+ [xr_tui.backends]
5
+ *.sdf = sdf_xarray:XrTUIEntrpoint
6
+