sdf-xarray 0.7.1__tar.gz → 0.7.2__tar.gz
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.
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/PKG-INFO +1 -1
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/animation.md +12 -7
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/_version.py +3 -3
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/plotting.py +2 -6
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/.github/workflows/build_publish.yml +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/.github/workflows/lint.yml +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/.github/workflows/tests.yml +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/.gitignore +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/.gitmodules +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/.readthedocs.yaml +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/CITATION.cff +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/CMakeLists.txt +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/CONTRIBUTING.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/LICENCE +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/README.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/.gitignore +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_static/BEAM.png +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_static/PlasmaFAIR.svg +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_static/force_render_dark_xarray_objects.css +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_static/sdf-xarray-logo-dark.svg +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_static/sdf-xarray-logo-light.svg +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_templates/custom-class-template.rst +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/_templates/custom-module-template.rst +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/api.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/conf.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/contributing.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/index.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/installation.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/known_issues.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/loading_data.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/make.bat +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/understanding_datasets.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/unit_conversion.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/docs/why_sdf_xarray.md +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/pyproject.toml +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/__init__.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/csdf.pxd +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/dataarray_accessor.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/dataset_accessor.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/download.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/src/sdf_xarray/sdf_interface.pyx +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/tests/test_cython.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/tests/test_dataset.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/tests/test_datatree.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/tests/test_epoch_dataarray_accessor.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/tests/test_epoch_dataset_accessor.py +0 -0
- {sdf_xarray-0.7.1 → sdf_xarray-0.7.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sdf-xarray
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Provides a backend for xarray to read SDF files as created by the EPOCH plasma PIC code.
|
|
5
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>, Sviatoslav Shekhanov <sviatoslav.shekhanov@york.ac.uk>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -16,6 +16,11 @@ import xarray as xr
|
|
|
16
16
|
import matplotlib.pyplot as plt
|
|
17
17
|
from matplotlib.animation import FuncAnimation
|
|
18
18
|
from IPython.display import HTML
|
|
19
|
+
|
|
20
|
+
# Matplotlib will attempt to display the first frame of the video
|
|
21
|
+
# and since we don't want that on the documentation we run in
|
|
22
|
+
# notebook mode
|
|
23
|
+
%matplotlib notebook
|
|
19
24
|
```
|
|
20
25
|
|
|
21
26
|
## Basic usage
|
|
@@ -107,7 +112,7 @@ same way a 2D simulation can be plotted along a line.
|
|
|
107
112
|
ds = sdfxr.open_mfdataset("tutorial_dataset_3d/*.sdf")
|
|
108
113
|
|
|
109
114
|
da = ds["Derived_Number_Density"]
|
|
110
|
-
da_lineout = da.sel(Y_Grid_mid = 0, method="nearest")
|
|
115
|
+
da_lineout = da.sel(Y_Grid_mid = 0, method = "nearest")
|
|
111
116
|
anim = da_lineout.epoch.animate(title = "Y = 0 [m]", fps = 2)
|
|
112
117
|
anim.show()
|
|
113
118
|
```
|
|
@@ -144,7 +149,7 @@ ds = xr.open_mfdataset(
|
|
|
144
149
|
)
|
|
145
150
|
|
|
146
151
|
da = ds["Derived_Number_Density_Beam_Electrons"]
|
|
147
|
-
anim = da.epoch.animate(move_window=True, fps = 5)
|
|
152
|
+
anim = da.epoch.animate(move_window = True, fps = 5)
|
|
148
153
|
anim.show()
|
|
149
154
|
```
|
|
150
155
|
|
|
@@ -180,7 +185,7 @@ anim = da.epoch.animate(
|
|
|
180
185
|
max_percentile = 95,
|
|
181
186
|
title = "Target A",
|
|
182
187
|
cmap = "plasma",
|
|
183
|
-
|
|
188
|
+
)
|
|
184
189
|
anim.show()
|
|
185
190
|
```
|
|
186
191
|
|
|
@@ -200,9 +205,9 @@ ds = sdfxr.open_mfdataset("tutorial_dataset_1d/*.sdf")
|
|
|
200
205
|
anim = ds.epoch.animate_multiple(
|
|
201
206
|
ds["Derived_Number_Density_Electron"],
|
|
202
207
|
ds["Derived_Number_Density_Ion"],
|
|
203
|
-
datasets_kwargs=[{"label": "Electron"}, {"label": "Ion"}],
|
|
204
|
-
ylim=(0e27,4e27),
|
|
205
|
-
ylabel="Derived Number Density [1/m$^3$]"
|
|
208
|
+
datasets_kwargs = [{"label": "Electron"}, {"label": "Ion"}],
|
|
209
|
+
ylim = (0e27,4e27),
|
|
210
|
+
ylabel = "Derived Number Density [1/m$^3$]"
|
|
206
211
|
)
|
|
207
212
|
|
|
208
213
|
anim.show()
|
|
@@ -242,7 +247,7 @@ flux_norm = LogNorm(
|
|
|
242
247
|
anim = ds.epoch.animate_multiple(
|
|
243
248
|
ds["Derived_Number_Density_Electron"],
|
|
244
249
|
flux_masked,
|
|
245
|
-
datasets_kwargs=[
|
|
250
|
+
datasets_kwargs = [
|
|
246
251
|
{"alpha": 1.0},
|
|
247
252
|
{"cmap": "hot", "norm": flux_norm, "alpha": 0.9},
|
|
248
253
|
],
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.7.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 7,
|
|
21
|
+
__version__ = version = '0.7.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 7, 2)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g80091946f'
|
|
@@ -365,9 +365,7 @@ def animate(
|
|
|
365
365
|
|
|
366
366
|
# Create plot if no ax is provided
|
|
367
367
|
if ax is None:
|
|
368
|
-
|
|
369
|
-
# Prevents figure from prematurely displaying in Jupyter notebook
|
|
370
|
-
plt.close(fig)
|
|
368
|
+
_, ax = plt.subplots()
|
|
371
369
|
|
|
372
370
|
animation = _generate_animation(
|
|
373
371
|
data,
|
|
@@ -457,9 +455,7 @@ def animate_multiple(
|
|
|
457
455
|
|
|
458
456
|
# Create plot if no ax is provided
|
|
459
457
|
if ax is None:
|
|
460
|
-
|
|
461
|
-
# Prevents figure from prematurely displaying in Jupyter notebook
|
|
462
|
-
plt.close(fig)
|
|
458
|
+
_, ax = plt.subplots()
|
|
463
459
|
|
|
464
460
|
n_datasets = len(datasets)
|
|
465
461
|
if datasets_kwargs is None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|