pymdea 0.3.2__tar.gz → 0.3.3__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.
- {pymdea-0.3.2 → pymdea-0.3.3}/PKG-INFO +1 -1
- {pymdea-0.3.2 → pymdea-0.3.3}/pyproject.toml +1 -1
- {pymdea-0.3.2 → pymdea-0.3.3}/src/pymdea/plot.py +4 -4
- pymdea-0.3.3/tests/test_plot.py +44 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.gitattributes +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.github/ISSUE_TEMPLATE//360/237/220/236-bug-report.md" +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.github/ISSUE_TEMPLATE//360/237/222/241-new-enhancement.md" +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.github/pull_request_template.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.github/workflows/mkdocs.yml +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.github/workflows/pytest.yml +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.github/workflows/ruff.yml +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/.gitignore +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/CITATION.cff +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/CONTRIBUTING.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/LICENSE +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/README.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/api-reference/core.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/api-reference/plot.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/assets/images/S-vs-L.png +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/assets/images/two-mu-rules.png +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/index.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/javascripts/mathjax.js +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/user-guide/further-reading.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/user-guide/getting-started.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/user-guide/interpreting.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/docs/user-guide/tuning.md +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/mkdocs.yml +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/src/pymdea/__init__.py +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/src/pymdea/core.py +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/tests/__init__.py +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/tests/test_core.py +0 -0
- {pymdea-0.3.2 → pymdea-0.3.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymdea
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Modified diffusion entropy analysis; a temporal complexity analysis method
|
|
5
5
|
Project-URL: Documentation, https://garland-culbreth.github.io/pymdea
|
|
6
6
|
Project-URL: Repository, https://github.com/garland-culbreth/pymdea
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pymdea"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
description = "Modified diffusion entropy analysis; a temporal complexity analysis method"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Garland Culbreth", email = "culbreth.garland@gmail.com"},
|
|
@@ -52,7 +52,7 @@ class DeaPlotter:
|
|
|
52
52
|
|
|
53
53
|
"""
|
|
54
54
|
x_line = np.linspace(start=1, stop=np.max(self.window_lengths), num=3)
|
|
55
|
-
fig, ax = plt.subplots(figsize=(fig_width, fig_height))
|
|
55
|
+
fig, ax = plt.subplots(figsize=(fig_width, fig_height), layout="constrained")
|
|
56
56
|
ax.plot(
|
|
57
57
|
self.window_lengths,
|
|
58
58
|
self.entropies,
|
|
@@ -72,7 +72,7 @@ class DeaPlotter:
|
|
|
72
72
|
ax.set_ylabel("$S(L)$")
|
|
73
73
|
ax.legend(loc=0)
|
|
74
74
|
sns.despine(trim=True)
|
|
75
|
-
|
|
75
|
+
self.fig_s_vs_l = fig
|
|
76
76
|
|
|
77
77
|
def mu_candidates(self: Self, fig_width: int = 4, fig_height: int = 3) -> None:
|
|
78
78
|
"""Plot the possible values of mu.
|
|
@@ -92,7 +92,7 @@ class DeaPlotter:
|
|
|
92
92
|
y2 = 1 / (x2 - 1)
|
|
93
93
|
y3 = np.full(100, 0.5)
|
|
94
94
|
|
|
95
|
-
fig, ax = plt.subplots(figsize=(fig_width, fig_height))
|
|
95
|
+
fig, ax = plt.subplots(figsize=(fig_width, fig_height), layout="constrained")
|
|
96
96
|
ax.plot(x1, y1, color="k")
|
|
97
97
|
ax.plot(x2, y2, color="k")
|
|
98
98
|
ax.plot(x3, y3, color="k")
|
|
@@ -123,4 +123,4 @@ class DeaPlotter:
|
|
|
123
123
|
ax.legend(loc=0)
|
|
124
124
|
ax.grid(visible=True)
|
|
125
125
|
sns.despine(left=True, bottom=True)
|
|
126
|
-
|
|
126
|
+
self.fig_mu_candidates = fig
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Tests for the core methods."""
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
import matplotlib.pyplot as plt
|
|
6
|
+
|
|
7
|
+
from src.pymdea.core import DeaEngine, DeaLoader
|
|
8
|
+
from src.pymdea.plot import DeaPlotter
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TestPlotter:
|
|
12
|
+
"""Tests for the DeaEngine."""
|
|
13
|
+
|
|
14
|
+
def test_s_vs_l(self: Self) -> None:
|
|
15
|
+
"""Test the _calculate_mu method."""
|
|
16
|
+
dea_loader = DeaLoader()
|
|
17
|
+
dea_loader.make_sample_data(1000)
|
|
18
|
+
dea_engine = DeaEngine(dea_loader)
|
|
19
|
+
dea_engine.analyze_with_stripes(fit_start=0.1, fit_stop=0.9)
|
|
20
|
+
dea_plotter = DeaPlotter(dea_engine)
|
|
21
|
+
dea_plotter.s_vs_l()
|
|
22
|
+
assert hasattr(dea_plotter, "fig_s_vs_l"), "fig_s_vs_l is missing"
|
|
23
|
+
assert isinstance(
|
|
24
|
+
dea_plotter.fig_s_vs_l, plt.Figure,
|
|
25
|
+
), "fig_s_vs_l is not a matplotlib figure."
|
|
26
|
+
|
|
27
|
+
def test_mu_candidates(self: Self) -> None:
|
|
28
|
+
"""Test the _calculate_mu method."""
|
|
29
|
+
dea_loader = DeaLoader()
|
|
30
|
+
dea_loader.make_sample_data(1000)
|
|
31
|
+
dea_engine = DeaEngine(dea_loader)
|
|
32
|
+
dea_engine.analyze_with_stripes(fit_start=0.1, fit_stop=0.9)
|
|
33
|
+
dea_plotter = DeaPlotter(dea_engine)
|
|
34
|
+
dea_plotter.mu_candidates()
|
|
35
|
+
assert hasattr(dea_plotter, "fig_mu_candidates"), "fig_mu_candidates is missing"
|
|
36
|
+
assert isinstance(
|
|
37
|
+
dea_plotter.fig_mu_candidates, plt.Figure,
|
|
38
|
+
), "fig_mu_candidates is not a matplotlib figure."
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
if __name__ == "__main__":
|
|
42
|
+
test_plotter = TestPlotter()
|
|
43
|
+
test_plotter.test_s_vs_l()
|
|
44
|
+
test_plotter.test_mu_candidates()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|