pynamicalsys 1.3.1__py3-none-any.whl → 1.4.0__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.
- pynamicalsys/__init__.py +2 -0
- pynamicalsys/__version__.py +2 -2
- pynamicalsys/common/time_series_metrics.py +85 -0
- pynamicalsys/continuous_time/chaotic_indicators.py +305 -7
- pynamicalsys/continuous_time/models.py +25 -0
- pynamicalsys/continuous_time/trajectory_analysis.py +457 -10
- pynamicalsys/core/continuous_dynamical_systems.py +933 -35
- pynamicalsys/core/discrete_dynamical_systems.py +20 -9
- pynamicalsys/core/hamiltonian_systems.py +1193 -0
- pynamicalsys/core/time_series_metrics.py +65 -0
- pynamicalsys/discrete_time/dynamical_indicators.py +5 -94
- pynamicalsys/hamiltonian_systems/__init__.py +16 -0
- pynamicalsys/hamiltonian_systems/chaotic_indicators.py +638 -0
- pynamicalsys/hamiltonian_systems/models.py +68 -0
- pynamicalsys/hamiltonian_systems/numerical_integrators.py +248 -0
- pynamicalsys/hamiltonian_systems/trajectory_analysis.py +293 -0
- pynamicalsys/hamiltonian_systems/validators.py +114 -0
- {pynamicalsys-1.3.1.dist-info → pynamicalsys-1.4.0.dist-info}/METADATA +37 -8
- pynamicalsys-1.4.0.dist-info/RECORD +36 -0
- pynamicalsys-1.3.1.dist-info/RECORD +0 -28
- {pynamicalsys-1.3.1.dist-info → pynamicalsys-1.4.0.dist-info}/WHEEL +0 -0
- {pynamicalsys-1.3.1.dist-info → pynamicalsys-1.4.0.dist-info}/top_level.txt +0 -0
@@ -36,7 +36,7 @@ from pynamicalsys.discrete_time.dynamical_indicators import (
|
|
36
36
|
finite_time_hurst_exponent,
|
37
37
|
finite_time_lyapunov,
|
38
38
|
finite_time_RTE,
|
39
|
-
|
39
|
+
hurst_exponent_wrapped,
|
40
40
|
lagrangian_descriptors,
|
41
41
|
lyapunov_1D,
|
42
42
|
lyapunov_er,
|
@@ -556,9 +556,13 @@ class DiscreteDynamicalSystem:
|
|
556
556
|
validate_transient_time(transient_time, total_time, type_=Integral)
|
557
557
|
|
558
558
|
if u.ndim == 1:
|
559
|
-
|
559
|
+
result = generate_trajectory(
|
560
560
|
u, parameters, total_time, self.__mapping, transient_time=transient_time
|
561
561
|
)
|
562
|
+
if self.__system_dimension == 1:
|
563
|
+
return result[:, 0]
|
564
|
+
else:
|
565
|
+
return result
|
562
566
|
else:
|
563
567
|
return ensemble_trajectories(
|
564
568
|
u, parameters, total_time, self.__mapping, transient_time=transient_time
|
@@ -2663,13 +2667,10 @@ class DiscreteDynamicalSystem:
|
|
2663
2667
|
----------
|
2664
2668
|
u : NDArray[np.float64]
|
2665
2669
|
Initial condition vector of shape (n,).
|
2666
|
-
parameters : Union[None, float, Sequence[np.float64], NDArray[np.float64]], optional
|
2667
|
-
Parameters passed to the mapping function.
|
2668
2670
|
total_time : int
|
2669
2671
|
Total number of iterations used to generate the trajectory.
|
2670
|
-
|
2671
|
-
|
2672
|
-
A function that defines the system dynamics, i.e., how `u` evolves over time given `parameters`.
|
2672
|
+
parameters : Union[None, float, Sequence[np.float64], NDArray[np.float64]], optional
|
2673
|
+
Parameters passed to the mapping function.
|
2673
2674
|
wmin : int, optional
|
2674
2675
|
Minimum window size for the rescaled range calculation. Default is 2.
|
2675
2676
|
transient_time : Optional[int], optional
|
@@ -2721,12 +2722,17 @@ class DiscreteDynamicalSystem:
|
|
2721
2722
|
validate_transient_time(transient_time, total_time, Integral)
|
2722
2723
|
|
2723
2724
|
validate_positive(wmin, "wmin", Integral)
|
2724
|
-
|
2725
|
+
|
2726
|
+
if (
|
2727
|
+
wmin < 2
|
2728
|
+
or wmin
|
2729
|
+
>= (total_time - (transient_time if transient_time is not None else 0)) // 2
|
2730
|
+
):
|
2725
2731
|
raise ValueError(
|
2726
2732
|
f"`wmin` must be an integer >= 2 and <= total_time / 2. Got {wmin}."
|
2727
2733
|
)
|
2728
2734
|
|
2729
|
-
|
2735
|
+
result = hurst_exponent_wrapped(
|
2730
2736
|
u,
|
2731
2737
|
parameters,
|
2732
2738
|
total_time,
|
@@ -2735,6 +2741,11 @@ class DiscreteDynamicalSystem:
|
|
2735
2741
|
transient_time=transient_time,
|
2736
2742
|
)
|
2737
2743
|
|
2744
|
+
if self.__system_dimension == 1:
|
2745
|
+
return result[0]
|
2746
|
+
else:
|
2747
|
+
return result
|
2748
|
+
|
2738
2749
|
def finite_time_hurst_exponent(
|
2739
2750
|
self,
|
2740
2751
|
u: Union[NDArray[np.float64], Sequence[float], float],
|