pyvlasiator 0.1.0__tar.gz → 0.1.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.
Potentially problematic release.
This version of pyvlasiator might be problematic. Click here for more details.
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/PKG-INFO +3 -4
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/README.md +1 -1
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/pyproject.toml +3 -3
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/plot/plot.py +5 -3
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/vlsv/reader.py +9 -7
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/LICENSE.md +0 -0
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/__init__.py +0 -0
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/plot/__init__.py +0 -0
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/pyvlasiator.py +0 -0
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/vlsv/__init__.py +0 -0
- {pyvlasiator-0.1.0 → pyvlasiator-0.1.2}/src/pyvlasiator/vlsv/variables.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyvlasiator
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Python utilities for processing Vlasiator data
|
|
5
5
|
Author: Hongyang Zhou
|
|
6
6
|
Author-email: hyzhou@umich.edu
|
|
7
7
|
Requires-Python: >=3.11,<4.0
|
|
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
12
12
|
Provides-Extra: plot
|
|
13
13
|
Requires-Dist: matplotlib (>=3.7.2,<4.0.0) ; extra == "plot"
|
|
14
14
|
Requires-Dist: numpy (>=1.25.1,<2.0.0)
|
|
15
|
-
Requires-Dist: pytest-benchmark (>=4.0.0,<5.0.0)
|
|
16
15
|
Description-Content-Type: text/markdown
|
|
17
16
|
|
|
18
17
|
# pyvlasiator
|
|
@@ -39,7 +38,7 @@ Lightweight Python package for processing Vlasiator data.
|
|
|
39
38
|
`pyvlasiator` can be installed via
|
|
40
39
|
|
|
41
40
|
```bash
|
|
42
|
-
|
|
41
|
+
python -m pip install pyvlasiator
|
|
43
42
|
```
|
|
44
43
|
|
|
45
44
|
## Usage
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pyvlasiator"
|
|
3
|
-
version = "0.1.
|
|
4
|
-
description = ""
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
description = "Python utilities for processing Vlasiator data"
|
|
5
5
|
authors = ["Hongyang Zhou <hyzhou@umich.edu>"]
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
|
|
@@ -9,13 +9,13 @@ readme = "README.md"
|
|
|
9
9
|
python = "^3.11"
|
|
10
10
|
numpy = "^1.25.1"
|
|
11
11
|
matplotlib = {version = "^3.7.2", optional = true}
|
|
12
|
-
pytest-benchmark = "^4.0.0"
|
|
13
12
|
|
|
14
13
|
[tool.poetry.extras]
|
|
15
14
|
plot = ["matplotlib"]
|
|
16
15
|
|
|
17
16
|
[tool.poetry.group.dev.dependencies]
|
|
18
17
|
pytest = "^7.4.0"
|
|
18
|
+
pytest-benchmark = "^4.0.0"
|
|
19
19
|
pytest-cov = "^4.1.0"
|
|
20
20
|
requests = "^2.31.0"
|
|
21
21
|
jupyter = "^1.0.0"
|
|
@@ -867,6 +867,7 @@ def vdfslice(
|
|
|
867
867
|
center: str = None,
|
|
868
868
|
weight: str = "particle",
|
|
869
869
|
flimit: float = -1.0,
|
|
870
|
+
addcolorbar: bool = True,
|
|
870
871
|
**kwargs,
|
|
871
872
|
):
|
|
872
873
|
v1, v2, r1, r2, weights, strx, stry, str_title = prep_vdf(
|
|
@@ -908,9 +909,10 @@ def vdfslice(
|
|
|
908
909
|
ax.grid(color="grey", linestyle="-")
|
|
909
910
|
ax.tick_params(direction="in")
|
|
910
911
|
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
912
|
+
if addcolorbar:
|
|
913
|
+
cb = plt.colorbar(h[3], ax=ax, fraction=0.04, pad=0.02)
|
|
914
|
+
cb.ax.tick_params(which="both", direction="in")
|
|
915
|
+
cb_title = cb.ax.set_ylabel("f(v)")
|
|
914
916
|
|
|
915
917
|
# TODO: Draw vector of magnetic field direction
|
|
916
918
|
# if slicetype in ("xy", "xz", "yz"):
|
|
@@ -405,14 +405,16 @@ class Vlsv:
|
|
|
405
405
|
)
|
|
406
406
|
if hasattr(cellids, "__len__"): # part of cells requested
|
|
407
407
|
return np.float32(raw)
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
408
|
+
elif cellids == -1:
|
|
409
|
+
if sorted:
|
|
410
|
+
if raw.ndim == 1:
|
|
411
|
+
v = raw[self.cellindex]
|
|
412
|
+
else:
|
|
413
|
+
v = raw[self.cellindex, :]
|
|
414
|
+
if v.dtype == np.float64: # 32-bit is enough for analysis
|
|
415
|
+
v = np.float32(v)
|
|
412
416
|
else:
|
|
413
|
-
v = raw
|
|
414
|
-
if v.dtype == np.float64: # 32-bit is enough for analysis
|
|
415
|
-
v = np.float32(v)
|
|
417
|
+
v = raw
|
|
416
418
|
else:
|
|
417
419
|
v = raw
|
|
418
420
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|