sdf-xarray 0.2.2__tar.gz → 0.2.3__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.
Potentially problematic release.
This version of sdf-xarray might be problematic. Click here for more details.
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/PKG-INFO +15 -2
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/README.md +5 -1
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/getting_started.rst +8 -1
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/key_functionality.rst +8 -5
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/pyproject.toml +11 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/src/sdf_xarray/__init__.py +2 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/src/sdf_xarray/_version.py +2 -2
- sdf_xarray-0.2.3/tests/example_dist_fn/0000.sdf +0 -0
- sdf_xarray-0.2.3/tests/example_dist_fn/0001.sdf +0 -0
- sdf_xarray-0.2.3/tests/example_dist_fn/0002.sdf +0 -0
- sdf_xarray-0.2.3/tests/example_dist_fn/input.deck +154 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/test_basic.py +7 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.github/workflows/black.yml +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.github/workflows/build_publish.yml +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.github/workflows/lint.yml +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.github/workflows/tests.yml +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.gitignore +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.gitmodules +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/.readthedocs.yaml +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/BEAM.png +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/CITATION.cff +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/CMakeLists.txt +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/CONTRIBUTING.md +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/LICENCE +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/PlasmaFAIR.svg +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/.gitignore +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/_templates/custom-class-template.rst +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/_templates/custom-module-template.rst +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/api.rst +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/conf.py +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/contributing.rst +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/index.rst +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/make.bat +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0000.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0001.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0002.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0003.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0004.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0005.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0006.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0007.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0008.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0009.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0010.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0011.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0012.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0013.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0014.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0015.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0016.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0017.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0018.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0019.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0020.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0021.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0022.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0023.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0024.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0025.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0026.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0027.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0028.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0029.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0030.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0031.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0032.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0033.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0034.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0035.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0036.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0037.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0038.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0039.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/0040.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/deck.status +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/epoch1d.dat +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/input.deck +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/normal.visit +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/tutorial_dataset_1d/restart.visit +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/docs/unit_conversion.rst +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/src/sdf_xarray/csdf.pxd +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/src/sdf_xarray/plotting.py +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/src/sdf_xarray/sdf_interface.pyx +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_array_no_grids/0000.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_array_no_grids/0001.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_array_no_grids/README.md +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_array_no_grids/input.deck +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0000.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0001.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0002.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0003.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0004.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0005.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0006.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0007.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0008.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0009.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/0010.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/README.md +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_files/input.deck +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_mismatched_files/0000.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_mismatched_files/0001.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/example_mismatched_files/0002.sdf +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/test_cython.py +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/tests/test_epoch_accessor.py +0 -0
- {sdf_xarray-0.2.2 → sdf_xarray-0.2.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sdf-xarray
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
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>
|
|
6
6
|
License: Copyright 2024, Peter Hill, Joel Adams, epochpic team
|
|
@@ -32,6 +32,15 @@ License: Copyright 2024, Peter Hill, Joel Adams, epochpic team
|
|
|
32
32
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
33
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
34
|
|
|
35
|
+
Classifier: Programming Language :: Python
|
|
36
|
+
Classifier: Programming Language :: Python :: 3
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Intended Audience :: Science/Research
|
|
42
|
+
Classifier: Topic :: Scientific/Engineering
|
|
43
|
+
Classifier: Operating System :: OS Independent
|
|
35
44
|
Requires-Python: >=3.10
|
|
36
45
|
Requires-Dist: numpy>=2.0.0
|
|
37
46
|
Requires-Dist: xarray>=2024.1.0
|
|
@@ -67,9 +76,13 @@ Description-Content-Type: text/markdown
|
|
|
67
76
|
|
|
68
77
|
# sdf-xarray
|
|
69
78
|
|
|
70
|
-

|
|
80
|
+
[](https://pypi.org/project/sdf-xarray/)
|
|
71
81
|

|
|
72
82
|

|
|
83
|
+
[](https://sdf-xarray.readthedocs.io)
|
|
84
|
+
[](https://github.com/python/black)
|
|
85
|
+
|
|
73
86
|
|
|
74
87
|
sdf-xarray provides a backend for [xarray](https://xarray.dev) to read SDF files as created by
|
|
75
88
|
[EPOCH](https://epochpic.github.io) using the [SDF-C](https://github.com/epochpic/SDF_C) library.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# sdf-xarray
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+
[](https://pypi.org/project/sdf-xarray/)
|
|
4
5
|

|
|
5
6
|

|
|
7
|
+
[](https://sdf-xarray.readthedocs.io)
|
|
8
|
+
[](https://github.com/python/black)
|
|
9
|
+
|
|
6
10
|
|
|
7
11
|
sdf-xarray provides a backend for [xarray](https://xarray.dev) to read SDF files as created by
|
|
8
12
|
[EPOCH](https://epochpic.github.io) using the [SDF-C](https://github.com/epochpic/SDF_C) library.
|
|
@@ -25,7 +25,14 @@ Usage
|
|
|
25
25
|
-----
|
|
26
26
|
|
|
27
27
|
``sdf-xarray`` is a backend for xarray, and so is usable directly from
|
|
28
|
-
`xarray`.
|
|
28
|
+
`xarray`. There are several ways to load SDF files:
|
|
29
|
+
|
|
30
|
+
- To load a single file, use :func:`xarray.open_dataset`.
|
|
31
|
+
- To load multiple files, use :func:`xarray.open_mfdataset` or :func:`sdf_xarray.open_mfdataset`.
|
|
32
|
+
- To access the raw contents of a single SDF file, use :func:`sdf_xarray.sdf_interface.SDFFile`.
|
|
33
|
+
|
|
34
|
+
.. note::
|
|
35
|
+
When loading ``*.sdf`` files, variables related to ``boundaries``, ``cpu`` and ``output file`` are excluded as they are problematic.
|
|
29
36
|
|
|
30
37
|
Single file loading
|
|
31
38
|
~~~~~~~~~~~~~~~~~~~
|
|
@@ -13,11 +13,14 @@ Key Functionality
|
|
|
13
13
|
|
|
14
14
|
Loading SDF Files
|
|
15
15
|
-----------------
|
|
16
|
-
There are several ways to load
|
|
17
|
-
|
|
18
|
-
load
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
There are several ways to load SDF files:
|
|
17
|
+
|
|
18
|
+
- To load a single file, use :func:`xarray.open_dataset`.
|
|
19
|
+
- To load multiple files, use :func:`xarray.open_mfdataset` or :func:`sdf_xarray.open_mfdataset`.
|
|
20
|
+
- To access the raw contents of a single SDF file, use :func:`sdf_xarray.sdf_interface.SDFFile`.
|
|
21
|
+
|
|
22
|
+
.. note::
|
|
23
|
+
When loading ``*.sdf`` files, variables related to ``boundaries``, ``cpu`` and ``output file`` are excluded as they are problematic.
|
|
21
24
|
|
|
22
25
|
Loading a Single SDF File
|
|
23
26
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
@@ -25,6 +25,17 @@ dependencies = [
|
|
|
25
25
|
"cython>=3.0",
|
|
26
26
|
]
|
|
27
27
|
description = "Provides a backend for xarray to read SDF files as created by the EPOCH plasma PIC code."
|
|
28
|
+
classifiers = [
|
|
29
|
+
"Programming Language :: Python",
|
|
30
|
+
"Programming Language :: Python :: 3",
|
|
31
|
+
"Programming Language :: Python :: 3.10",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Programming Language :: Python :: 3.13",
|
|
35
|
+
"Intended Audience :: Science/Research",
|
|
36
|
+
"Topic :: Scientific/Engineering",
|
|
37
|
+
"Operating System :: OS Independent",
|
|
38
|
+
]
|
|
28
39
|
|
|
29
40
|
[project.optional-dependencies]
|
|
30
41
|
docs = [
|
|
@@ -310,6 +310,8 @@ class SDFDataStore(AbstractDataStore):
|
|
|
310
310
|
# Had some problems with these variables, so just ignore them for now
|
|
311
311
|
if "cpu" in key.lower():
|
|
312
312
|
continue
|
|
313
|
+
if "boundary" in key.lower():
|
|
314
|
+
continue
|
|
313
315
|
if "output file" in key.lower():
|
|
314
316
|
continue
|
|
315
317
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
begin:control
|
|
2
|
+
|
|
3
|
+
# global number of gridpoints
|
|
4
|
+
# Divide nx and ny by 2 from 40 to 20
|
|
5
|
+
nx = 16 # in x
|
|
6
|
+
ny = 8
|
|
7
|
+
nparticles = nx * ny * 4
|
|
8
|
+
|
|
9
|
+
# maximum number of iterations
|
|
10
|
+
# set to -1 to run until finished
|
|
11
|
+
nsteps = -1
|
|
12
|
+
|
|
13
|
+
# final time of simulation
|
|
14
|
+
t_end = 200e-15
|
|
15
|
+
|
|
16
|
+
# size of domain
|
|
17
|
+
x_min = 0e-6
|
|
18
|
+
x_max = 40e-6
|
|
19
|
+
y_min = -10e-6
|
|
20
|
+
y_max = -y_min
|
|
21
|
+
|
|
22
|
+
dt_multiplier = 0.8
|
|
23
|
+
dlb_threshold = 0.8
|
|
24
|
+
|
|
25
|
+
end:control
|
|
26
|
+
|
|
27
|
+
begin:laser
|
|
28
|
+
|
|
29
|
+
boundary = x_min
|
|
30
|
+
intensity_w_cm2 = 1.0e23
|
|
31
|
+
lambda = 1e-6
|
|
32
|
+
phase = 0.0
|
|
33
|
+
t_profile = gauss(time, 40.0e-15, 30.0e-15) # This profile means your laser pulse has a maximum intensity at t=40 fs, and the intensity will smoothly decrease as time moves away from this point, with a width parameter of 30 fs.
|
|
34
|
+
t_start = 0.0
|
|
35
|
+
t_end = end
|
|
36
|
+
end:laser
|
|
37
|
+
|
|
38
|
+
begin:collisions
|
|
39
|
+
|
|
40
|
+
use_collisions = T
|
|
41
|
+
coulomb_log = auto
|
|
42
|
+
collide = all
|
|
43
|
+
|
|
44
|
+
end:collisions
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
begin:boundaries
|
|
48
|
+
|
|
49
|
+
bc_x_min = simple_laser
|
|
50
|
+
bc_x_max = open
|
|
51
|
+
bc_y_min = periodic
|
|
52
|
+
bc_y_max = periodic
|
|
53
|
+
|
|
54
|
+
end:boundaries
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
begin:species
|
|
58
|
+
|
|
59
|
+
# electrons
|
|
60
|
+
name = Electron
|
|
61
|
+
fraction = 0.5
|
|
62
|
+
dump = T
|
|
63
|
+
|
|
64
|
+
temperature = 0
|
|
65
|
+
number_density = if ((x gt 10e-6) and (x lt 30e-6), 1e22, 0)
|
|
66
|
+
number_density_min = 1
|
|
67
|
+
|
|
68
|
+
identify:electron
|
|
69
|
+
|
|
70
|
+
end:species
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
begin:output_global
|
|
74
|
+
|
|
75
|
+
force_final_to_be_restartable = F
|
|
76
|
+
|
|
77
|
+
end:output_global
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
begin:output
|
|
81
|
+
|
|
82
|
+
name = normal
|
|
83
|
+
|
|
84
|
+
# If use_offset_grid is true then the code dumps a grid which displays
|
|
85
|
+
# positions relative to the left hand edge of the window
|
|
86
|
+
use_offset_grid = F
|
|
87
|
+
|
|
88
|
+
# number of timesteps between output dumps
|
|
89
|
+
dt_snapshot = 100.0e-15 # 100.0e-15 / 100.0
|
|
90
|
+
|
|
91
|
+
# Properties at particle positions
|
|
92
|
+
particles = never
|
|
93
|
+
px = never
|
|
94
|
+
py = never
|
|
95
|
+
pz = never
|
|
96
|
+
vx = never
|
|
97
|
+
vy = never
|
|
98
|
+
vz = never
|
|
99
|
+
charge = never
|
|
100
|
+
mass = never
|
|
101
|
+
particle_weight = never
|
|
102
|
+
species_id = never
|
|
103
|
+
|
|
104
|
+
# Properties on grid
|
|
105
|
+
grid = always
|
|
106
|
+
ex = never
|
|
107
|
+
ey = always
|
|
108
|
+
ez = never
|
|
109
|
+
bx = never
|
|
110
|
+
by = never
|
|
111
|
+
bz = never
|
|
112
|
+
jx = never
|
|
113
|
+
jy = never
|
|
114
|
+
jz = never
|
|
115
|
+
poynt_flux = always
|
|
116
|
+
average_particle_energy = never
|
|
117
|
+
mass_density = never
|
|
118
|
+
charge_density = never
|
|
119
|
+
number_density = never
|
|
120
|
+
temperature = never
|
|
121
|
+
|
|
122
|
+
# extended io
|
|
123
|
+
distribution_functions = always
|
|
124
|
+
particle_probes = never
|
|
125
|
+
absorption = never
|
|
126
|
+
total_energy_sum = never
|
|
127
|
+
|
|
128
|
+
end:output
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
begin:dist_fn
|
|
132
|
+
|
|
133
|
+
name = x_px_py
|
|
134
|
+
ndims = 3
|
|
135
|
+
dumpmask = always
|
|
136
|
+
|
|
137
|
+
direction1 = dir_x
|
|
138
|
+
direction2 = dir_px
|
|
139
|
+
direction3 = dir_py
|
|
140
|
+
|
|
141
|
+
# range is ignored for spatial coordinates
|
|
142
|
+
range1 = (1, 1)
|
|
143
|
+
range2 = (1.6e-20, 1.6e-19)
|
|
144
|
+
range3 = (1.6e-20, 1.6e-19)
|
|
145
|
+
|
|
146
|
+
# resolution is ignored for spatial coordinates
|
|
147
|
+
resolution1 = 1
|
|
148
|
+
resolution2 = 20
|
|
149
|
+
resolution3 = 20
|
|
150
|
+
|
|
151
|
+
#include_species:Photon
|
|
152
|
+
include_species:Electron
|
|
153
|
+
|
|
154
|
+
end:dist_fn
|
|
@@ -10,6 +10,7 @@ EXAMPLE_MISMATCHED_FILES_DIR = (
|
|
|
10
10
|
pathlib.Path(__file__).parent / "example_mismatched_files"
|
|
11
11
|
)
|
|
12
12
|
EXAMPLE_ARRAYS_DIR = pathlib.Path(__file__).parent / "example_array_no_grids"
|
|
13
|
+
EXAMPLE_3D_DIST_FN = pathlib.Path(__file__).parent / "example_dist_fn"
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
def test_basic():
|
|
@@ -178,3 +179,9 @@ def test_arrays_with_no_grids_multifile():
|
|
|
178
179
|
random_states = "Random_States"
|
|
179
180
|
assert random_states in df
|
|
180
181
|
assert df[random_states].shape == (2, 8)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def test_3d_distribution_function():
|
|
185
|
+
with xr.open_dataset(EXAMPLE_3D_DIST_FN / "0000.sdf") as df:
|
|
186
|
+
distribution_function = "dist_fn_x_px_py_Electron"
|
|
187
|
+
assert df[distribution_function].shape == (16, 20, 20)
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|