pyvlasiator 0.1.3__tar.gz → 0.1.4__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyvlasiator
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Python utilities for processing Vlasiator data
5
5
  Author: Hongyang Zhou
6
6
  Author-email: hyzhou@umich.edu
@@ -17,6 +17,9 @@ Description-Content-Type: text/markdown
17
17
  # pyvlasiator
18
18
 
19
19
  <p align="center">
20
+ <a href="https://badge.fury.io/py/pyvlasiator">
21
+ <img src="https://badge.fury.io/py/pyvlasiator.svg" alt="PyPI version" height="18">
22
+ </a>
20
23
  <a href="https://github.com/henry2004y/pyvlasiator/actions">
21
24
  <img src="https://github.com/henry2004y/pyvlasiator/actions/workflows/CI.yml/badge.svg">
22
25
  </a>
@@ -1,6 +1,9 @@
1
1
  # pyvlasiator
2
2
 
3
3
  <p align="center">
4
+ <a href="https://badge.fury.io/py/pyvlasiator">
5
+ <img src="https://badge.fury.io/py/pyvlasiator.svg" alt="PyPI version" height="18">
6
+ </a>
4
7
  <a href="https://github.com/henry2004y/pyvlasiator/actions">
5
8
  <img src="https://github.com/henry2004y/pyvlasiator/actions/workflows/CI.yml/badge.svg">
6
9
  </a>
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyvlasiator"
3
- version = "0.1.3"
3
+ version = "0.1.4"
4
4
  description = "Python utilities for processing Vlasiator data"
5
5
  authors = ["Hongyang Zhou <hyzhou@umich.edu>"]
6
6
  readme = "README.md"
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import numpy as np
4
+ from numpy.typing import ArrayLike
4
5
  import math
5
6
  import warnings
6
7
  from typing import Callable
@@ -182,6 +183,7 @@ def _plot1d(
182
183
 
183
184
  return c
184
185
 
186
+
185
187
  def pcolormesh(
186
188
  self: Vlsv,
187
189
  var: str = "",
@@ -922,7 +924,6 @@ def vdfslice(
922
924
  meta: Vlsv,
923
925
  location: tuple | list,
924
926
  ax=None,
925
- limits: tuple = (float("-inf"), float("inf"), float("-inf"), float("inf")),
926
927
  verbose: bool = False,
927
928
  species: str = "proton",
928
929
  unit: AxisUnit = AxisUnit.SI,
@@ -967,7 +968,15 @@ def vdfslice(
967
968
 
968
969
  norm = matplotlib.colors.LogNorm(vmin, vmax)
969
970
 
970
- h = ax.hist2d(v1, v2, bins=(r1, r2), weights=weights, norm=norm, shading="flat")
971
+ h = ax.hist2d(
972
+ v1,
973
+ v2,
974
+ bins=(r1, r2),
975
+ weights=weights,
976
+ norm=norm,
977
+ shading="flat",
978
+ **kwargs,
979
+ )
971
980
 
972
981
  ax.set_title(str_title, fontweight="bold")
973
982
  ax.set_xlabel(strx)
@@ -375,16 +375,17 @@ class Vlsv:
375
375
  """
376
376
  Read variables as numpy arrays from the open vlsv file.
377
377
 
378
- Parameters
379
- ----------
380
- cellids : int or list[int] or np.ndarray
381
- If -1 then all data is read. If nonzero then only the vector for the specified
382
- cell id or cellids is read.
383
- sorted : bool
384
- If the returned array is sorted by cell IDs. Only applied for full arrays.
385
- Returns
386
- -------
387
- numpy.ndarray
378
+ Args:
379
+ name (str): The name of the variable to read.
380
+ cellids (int, list[int], np.ndarray, optional):
381
+ Specifies which cell IDs to read data for. Defaults to -1, which reads data for all cells.
382
+ - If an integer (except -1), only the data for that specific cell ID is read.
383
+ - If a list or NumPy array of integers, only the data for the specified cell IDs are read.
384
+ - Specifying cell IDs is not supported for "FSgrid" or "ionosphere" variables.
385
+ sorted (bool, optional): If True, the returned array is sorted by cell IDs (only applicable when reading all cells, cellids=-1). Defaults to True.
386
+
387
+ Returns:
388
+ numpy.ndarray
388
389
  """
389
390
 
390
391
  if self.has_variable(name) and name.startswith("fg_"):
File without changes