langevin 2025.11.8a2__cp314-cp314-macosx_14_0_arm64.whl → 2025.11.10a2__cp314-cp314-macosx_14_0_arm64.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.
- langevin/__init__.py +1 -1
- langevin/base/__init__.py +1 -1
- langevin/dp/dplvn.cpython-314-darwin.so +0 -0
- langevin/dp/simulation.py +50 -18
- {langevin-2025.11.8a2.dist-info → langevin-2025.11.10a2.dist-info}/METADATA +6 -3
- {langevin-2025.11.8a2.dist-info → langevin-2025.11.10a2.dist-info}/RECORD +7 -7
- {langevin-2025.11.8a2.dist-info → langevin-2025.11.10a2.dist-info}/WHEEL +0 -0
langevin/__init__.py
CHANGED
langevin/base/__init__.py
CHANGED
|
Binary file
|
langevin/dp/simulation.py
CHANGED
|
@@ -10,8 +10,14 @@ from datetime import datetime, timedelta
|
|
|
10
10
|
from numpy.typing import NDArray
|
|
11
11
|
import numpy as np
|
|
12
12
|
from numpy.lib.npyio import NpzFile
|
|
13
|
+
try:
|
|
14
|
+
import ffmpeg
|
|
15
|
+
except:
|
|
16
|
+
# Quietly fail
|
|
17
|
+
pass
|
|
13
18
|
import sys, os
|
|
14
|
-
|
|
19
|
+
from os.path import join, pardir
|
|
20
|
+
sys.path.insert(0, join(pardir, "Packages"))
|
|
15
21
|
from langevin.base.file import (
|
|
16
22
|
create_directories, export_info, export_plots,
|
|
17
23
|
)
|
|
@@ -199,12 +205,12 @@ class Simulation:
|
|
|
199
205
|
do_verbose: report how the exporting is going
|
|
200
206
|
"""
|
|
201
207
|
if self.do_verbose | do_verbose:
|
|
202
|
-
print(f"Outfo/
|
|
208
|
+
print(f"Outfo/graphs/videos/data path: {self.misc["path"]}")
|
|
203
209
|
seed_dir_name: str = f"rs{self.parameters["random_seed"]}"
|
|
204
210
|
|
|
205
211
|
outfo_path: str = \
|
|
206
212
|
create_directories(
|
|
207
|
-
(
|
|
213
|
+
(pardir, *self.misc["path"]), seed_dir_name,
|
|
208
214
|
)
|
|
209
215
|
outfo: dict = {
|
|
210
216
|
"Parameters" : self.parameters,
|
|
@@ -214,30 +220,56 @@ class Simulation:
|
|
|
214
220
|
if not do_dummy:
|
|
215
221
|
_ = export_info(outfo_path, "Outfo", outfo, module,)
|
|
216
222
|
|
|
217
|
-
if self.misc["do_export_graphs"]:
|
|
218
|
-
graphs_path: str = \
|
|
219
|
-
create_directories(
|
|
220
|
-
(os.path.pardir, *self.misc["path"], seed_dir_name,), ".",
|
|
221
|
-
)
|
|
222
|
-
if not do_dummy:
|
|
223
|
-
_ = export_plots(
|
|
224
|
-
self.graphs.fdict,
|
|
225
|
-
graphs_path,
|
|
226
|
-
do_verbose=self.do_verbose,
|
|
227
|
-
)
|
|
228
|
-
|
|
229
223
|
if self.misc["do_export_data"]:
|
|
230
224
|
data_path: str = \
|
|
231
225
|
create_directories(
|
|
232
|
-
(
|
|
226
|
+
(pardir, *self.misc["path"], seed_dir_name,), ".",
|
|
233
227
|
)
|
|
234
228
|
if not do_dummy:
|
|
235
229
|
np.savez_compressed(
|
|
236
|
-
|
|
230
|
+
join(data_path, "ρ_t",),
|
|
237
231
|
t_epochs=self.t_epochs,
|
|
238
232
|
mean_densities=self.mean_densities,
|
|
239
233
|
)
|
|
240
234
|
data_npz: NpzFile = np.load(
|
|
241
|
-
|
|
235
|
+
join(data_path, "ρ_t"+".npz",),
|
|
242
236
|
)
|
|
243
237
|
data_npz["t_epochs"][-10:], data_npz["mean_densities"][-10:]
|
|
238
|
+
|
|
239
|
+
if self.misc["do_export_graphs"]:
|
|
240
|
+
graphs_path: str = \
|
|
241
|
+
create_directories(
|
|
242
|
+
(pardir, *self.misc["path"], seed_dir_name,), ".",
|
|
243
|
+
)
|
|
244
|
+
if not do_dummy:
|
|
245
|
+
_ = export_plots(
|
|
246
|
+
self.graphs.fdict,
|
|
247
|
+
graphs_path,
|
|
248
|
+
do_verbose=self.do_verbose,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
if self.misc["do_make_video"]:
|
|
252
|
+
print("Video export not working yet")
|
|
253
|
+
# videos_path: str = create_directories(
|
|
254
|
+
# (pardir, pardir, "experiments", sim_dir_name,), "Videos",
|
|
255
|
+
# )
|
|
256
|
+
|
|
257
|
+
# video_frame_rate: int = misc["video_frame_rate"]
|
|
258
|
+
# video_format: str = misc["video_format"]
|
|
259
|
+
# video_images_wildcard: str = "ρ_t"+"?"*n_digits+".png"
|
|
260
|
+
# input = ffmpeg.input(
|
|
261
|
+
# join(images_path, video_images_wildcard),
|
|
262
|
+
# pattern_type="glob",
|
|
263
|
+
# framerate=video_frame_rate,
|
|
264
|
+
# pix_fmt="yuv420p",
|
|
265
|
+
# )
|
|
266
|
+
# output = ffmpeg.output(
|
|
267
|
+
# input.video,
|
|
268
|
+
# join(
|
|
269
|
+
# videos_path,
|
|
270
|
+
# f"ρ_{sim_dir_name}_rs{parameters["random_seed"]}.{video_format}"
|
|
271
|
+
# ),
|
|
272
|
+
# vf="crop=floor(iw/2)*2:floor(ih/2)*2",
|
|
273
|
+
# vcodec="libx264",
|
|
274
|
+
# format=video_format,
|
|
275
|
+
# )
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: langevin
|
|
3
|
-
Version: 2025.11.
|
|
3
|
+
Version: 2025.11.10a2
|
|
4
4
|
Summary: Tools to integrate Langevin equations of absorbing phase transition type
|
|
5
5
|
Keywords: Langevin equation,directed percolation,operator splitting,stochastic differential equations,phase transition
|
|
6
6
|
Author-Email: "Colin P. Stark" <cstarkjp@gmail.com>
|
|
@@ -31,8 +31,11 @@ Description-Content-Type: text/markdown
|
|
|
31
31
|
|
|
32
32
|
Tools to integrate Langevin equations of absorbing phase transition (APT) type — with a focus on simulation of directed percolation (DP).
|
|
33
33
|
|
|
34
|
-

|
|
36
|
+
|
|
37
|
+
<!--  -->
|
|
36
39
|
|
|
37
40
|
The `langevin` package implements the operator-splitting method originally developed by Dornic et al (2005), Pechenik & Levine (1999) and others, and improved upon by Weissmann et al (2018).
|
|
38
41
|
It provides a Python wrapper around core C++ heavily adapted from a code base written by [Paula Villa Martín](https://github.com/pvillamartin), extended by [Victor Buendía](https://github.com/VictorSeven) ("VMB"), and arising from earlier efforts by Ivan Dornic and Juan Bonachela. The wrapper provides easy access to the Langevin integrator, and broad opportunity to experiment, adapt, and extend it further.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
langevin-2025.11.
|
|
2
|
-
langevin-2025.11.
|
|
3
|
-
langevin/dp/dplvn.cpython-314-darwin.so,sha256=
|
|
4
|
-
langevin/__init__.py,sha256=
|
|
5
|
-
langevin/base/__init__.py,sha256=
|
|
1
|
+
langevin-2025.11.10a2.dist-info/METADATA,sha256=L9Wlxj8axZzpyFGyhkKOCY87Qfud-k-6EPoLkNHS4wg,10909
|
|
2
|
+
langevin-2025.11.10a2.dist-info/WHEEL,sha256=2WELbI4DqHl1bnndfO7vTz5YnWqTyWkPR2epmRKfq6I,93
|
|
3
|
+
langevin/dp/dplvn.cpython-314-darwin.so,sha256=QZu7K0r5hLDwpyu_HliyiJ2Foo1KfMrRkh0EIzqWBUU,602584
|
|
4
|
+
langevin/__init__.py,sha256=Iyxs0lHaL9-v6bwMAj5uINROmM1ssbWjfyPDBtHnflA,42
|
|
5
|
+
langevin/base/__init__.py,sha256=zT3VQmhSGPv1J_E4xa0odZ5H09gQNhlvTF2iDQcr5Uo,114
|
|
6
6
|
langevin/base/file.py,sha256=pvdPSXlRy2u05L8sR5zWUlrUI8Any_OpUO-PXPtUwSc,7380
|
|
7
7
|
langevin/base/initialize.py,sha256=1y-yRyFLC2U-1qriOxMWycjfLUrPmzZxNgJp8mgEk_8,3017
|
|
8
8
|
langevin/base/serialize.py,sha256=ArW2O-OVtOhVfwRKWl2Wh_3XvWgdqbkXC2NHINafMQw,5313
|
|
@@ -10,6 +10,6 @@ langevin/base/utils.py,sha256=isNapp1JdGhE8jJ1bBvGYRo4-cq6qFwcsthk2PvBMNQ,6786
|
|
|
10
10
|
langevin/base/viz.py,sha256=JAEaxsMz7a-ob69EpFJLBFkeMzDM_d3ZKnpaabH-WWo,6350
|
|
11
11
|
langevin/dp/__init__.py,sha256=IVrwOm-19xhtvmLhXazGEh2EGd5ri2BzaLEchKbhRBw,139
|
|
12
12
|
langevin/dp/ensemble.py,sha256=HAUa3j-cUk-xsj1Gn7v3ENw-aX5ObBwde6tWaJ4rdI0,9279
|
|
13
|
-
langevin/dp/simulation.py,sha256=
|
|
13
|
+
langevin/dp/simulation.py,sha256=PjIH4tijWweuj6p5p5hcuAPomCJteJcp9wW62BJcUWo,9692
|
|
14
14
|
langevin/dp/vizdp.py,sha256=8SPw7ZCs6l7SeUZp0GutgPAF-QjTr8fr3EOSAR07_94,12447
|
|
15
|
-
langevin-2025.11.
|
|
15
|
+
langevin-2025.11.10a2.dist-info/RECORD,,
|
|
File without changes
|