osiris-utils 1.1.2__py3-none-any.whl → 1.1.4__py3-none-any.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.
osiris_utils/utils.py CHANGED
@@ -24,7 +24,7 @@ def courant2D(dx, dy):
24
24
  dt = 1 / (np.sqrt(1/dx**2 + 1/dy**2))
25
25
  return dt
26
26
 
27
- def time_estimation(n_cells, ppc, push_time, t_steps, n_cpu, hours = False):
27
+ def time_estimation(n_cells, ppc, t_steps, n_cpu, push_time = 1e-7, hours = False):
28
28
  '''
29
29
  Estimate the simulation time.
30
30
 
@@ -106,45 +106,6 @@ def integrate(array, dx):
106
106
  int = -scipy.integrate.cumulative_simpson(flip_array, dx = dx, initial = 0)
107
107
  return np.flip(int)
108
108
 
109
- def animate_2D(datafiles, frames, interval, fps, savename, **kwargs):
110
- '''
111
- Animate 2D OSIRIS files.
112
-
113
- Parameters
114
- ----------
115
- datafiles : str
116
- The path to the files.
117
- Must be of the type 'path/to/file_%06d.h5'.
118
- kwargs : dict
119
- Additional keyword arguments for plotting.
120
-
121
- Returns
122
- -------
123
- matplotlib.animation.FuncAnimation
124
- The animation.
125
- '''
126
- fig, ax = plt.subplots(figsize=(12, 6), tight_layout=True)
127
- im = 0
128
-
129
- def animate(i):
130
- # Assuming this returns (x, y, data, out) correctly
131
- x, y, data, _ = open2D(datafiles % i)
132
- ax.clear()
133
- # Display image data, make sure data shape is valid for imshow
134
- im = ax.imshow(-data, extent=[x.min(), x.max(), y.min(), y.max()], aspect='auto', origin='lower', **kwargs)
135
- plt.xlabel(r'x [c/$\omega_p$]')
136
- plt.ylabel(r'y [c/$\omega_p$]')
137
-
138
-
139
- # Creating the animation, and frames should be updated accordingly
140
- ani = animation.FuncAnimation(fig, animate, frames=frames, interval=interval)
141
-
142
- # Save the animation as a GIF (you can set the path and filename)
143
- ani.save(savename, writer='pillow', fps=fps) # fps can be adjusted
144
-
145
- # Display the animation
146
- return ani
147
-
148
109
  def save_data(data, savename, option='numpy'):
149
110
  """
150
111
  Save the data to a .txt (with Numpy) or .csv (with Pandas) file.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osiris_utils
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Utilities to manipulate and visualize OSIRIS framework output data
5
5
  Author: ['João Pedro Ferreira Biu', 'João Cândido', 'Diogo Carvalho']
6
6
  Author-email: ['joaopedrofbiu@tecnico.ulisboa.pt']
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Topic :: Scientific/Engineering
22
- Requires-Python: >=3.11
22
+ Requires-Python: >=3.10
23
23
  Description-Content-Type: text/x-rst
24
24
  License-File: LICENSE.txt
25
25
  Requires-Dist: numpy
@@ -48,6 +48,10 @@ OSIRIS_UTILS
48
48
  |Pypi|
49
49
 
50
50
  This package contains a set of utilities to open and analyze OSIRIS output files, using Python. All the methods implemented are fully integrated with `NumPy`, and use `np.ndarray` as the main data structure.
51
+ High-level functions are provided to manipulate data from OSIRIS, from reading the data of the diagnostics, to making post-processing calculations.
52
+
53
+ All code is written in Python. To contact the dev team, please send an email to João Biu: `joaopedrofbiu@tecnico.ulisboa.pt <mailto:joaopedrofbiu@tecnico.ulisboa.pt>`_.
54
+ The full dev team can be found below in the Authors and Contributors section.
51
55
 
52
56
  How to install it?
53
57
  ------------------
@@ -58,6 +62,12 @@ To install this package, you can use `pip`::
58
62
 
59
63
  To install it from source, you can clone this repository and run (in the folder containing ``setup.py``)::
60
64
 
65
+ git clone https://github.com/joaopedrobiu6/osiris_utils.git
66
+ pip install .
67
+
68
+ Finally, you can install it in editor mode if you want to contribute to the code::
69
+
70
+ git clone https://github.com/joaopedrobiu6/osiris_utils.git
61
71
  pip install -e .
62
72
 
63
73
  Documentation
@@ -69,3 +79,11 @@ The documentation is available at https://osiris-utils.readthedocs.io or via thi
69
79
  :target: https://pypi.org/project/osiris-utils/
70
80
  :alt: Pypi
71
81
 
82
+ .. _authors:
83
+
84
+ Authors and Contributors
85
+ ------------------------
86
+
87
+ - João Biu
88
+ - João Cândido
89
+ - Diogo Carvalho
@@ -0,0 +1,22 @@
1
+ osiris_utils/__init__.py,sha256=X9n7gUvc4oYjLn8nPY3f-Rm77l7ByrvQvwet_FvsTfo,856
2
+ osiris_utils/utils.py,sha256=D-WyvksBl1LGHgYWHeUx2PIPhBVjGFpfuuHlf9EPzbU,3472
3
+ osiris_utils/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ osiris_utils/data/data.py,sha256=tEmjM_2IOp6P3OjBL1zesLQ52V2V5XHF7No1VDUkG4M,15938
5
+ osiris_utils/data/diagnostic.py,sha256=fJk7J48H4_0W4TImNhyCAH_hbjOSCia71_WUgFgfJNo,38344
6
+ osiris_utils/data/simulation.py,sha256=anLjjHCWlfoMg9F8WmiGXMTLberFEorE1aAe4zSSAms,6719
7
+ osiris_utils/decks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ osiris_utils/decks/decks.py,sha256=Ug1_fSfZL9iJwn7dnTvHM0k1Zc4kGpI427QvO0V2pwg,10173
9
+ osiris_utils/decks/species.py,sha256=uZA1oMSltofc2m1s3rK__wjxXfTAQ_3wB2aKRG_PmKo,1066
10
+ osiris_utils/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ osiris_utils/gui/gui.py,sha256=s4not0GzHI3CrA4uQVnjt9jFavkVAeGbQ6rJpM4jir4,10538
12
+ osiris_utils/postprocessing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ osiris_utils/postprocessing/derivative.py,sha256=bS_qVdsdgmfNKmxGMV1d5jCwwVpeiGDb_jYI-GLLFUI,10152
14
+ osiris_utils/postprocessing/fft.py,sha256=zu59iBOpsoRMBPgUTqLTas__qZvZSFz_tuEODxaER9E,9159
15
+ osiris_utils/postprocessing/mft.py,sha256=wnDguPz1v0sDxtxEfHBXxb2ywaNwAznQMlMtOfd4N9I,12537
16
+ osiris_utils/postprocessing/mft_for_gridfile.py,sha256=ZaLgwsND9nbD-v-JfCZYxh7-dz3RA-IILwBjZnZGCiE,1522
17
+ osiris_utils/postprocessing/postprocess.py,sha256=f2ZXLnAvLpsLFd-Pygb_sYxwkU4zn1OoF_byVKYAPII,1115
18
+ osiris_utils-1.1.4.dist-info/licenses/LICENSE.txt,sha256=Cawy2v7wKc7n8yL8guFu-cH9sQw9r1gll1pEFPFAB-Q,1084
19
+ osiris_utils-1.1.4.dist-info/METADATA,sha256=lbpLiKYzdLQc0HLRF15GAlbCsCxMzzytVfbn8ORGrec,3070
20
+ osiris_utils-1.1.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
21
+ osiris_utils-1.1.4.dist-info/top_level.txt,sha256=mM-_dX5fjzIKB7te655PhZOrPACVY-bJmiASCqW1eOA,13
22
+ osiris_utils-1.1.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (77.0.3)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +0,0 @@
1
- osiris_utils/__init__.py,sha256=MUWaLyViH0S_HLSDxMJJo_KMhXp40sTJS2ahgWWd0iw,752
2
- osiris_utils/utils.py,sha256=pj2hrmZla-6T_95eRZB_c4TSXJqBvNRvMTzuw1lPZyA,4708
3
- osiris_utils-1.1.2.dist-info/licenses/LICENSE.txt,sha256=Cawy2v7wKc7n8yL8guFu-cH9sQw9r1gll1pEFPFAB-Q,1084
4
- osiris_utils-1.1.2.dist-info/METADATA,sha256=-A1dCd0uVTABjyyGG8cbsuZslMs111LfcKurQZYhFW4,2327
5
- osiris_utils-1.1.2.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
6
- osiris_utils-1.1.2.dist-info/top_level.txt,sha256=mM-_dX5fjzIKB7te655PhZOrPACVY-bJmiASCqW1eOA,13
7
- osiris_utils-1.1.2.dist-info/RECORD,,