DiaModality 0.1.7__tar.gz → 0.2.0__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.
- {diamodality-0.1.7/src/DiaModality.egg-info → diamodality-0.2.0}/PKG-INFO +9 -3
- {diamodality-0.1.7 → diamodality-0.2.0}/README.md +4 -1
- {diamodality-0.1.7 → diamodality-0.2.0}/pyproject.toml +6 -3
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality/ModalityPlot.py +6 -2
- diamodality-0.2.0/src/DiaModality/_version.py +1 -0
- {diamodality-0.1.7 → diamodality-0.2.0/src/DiaModality.egg-info}/PKG-INFO +9 -3
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality.egg-info/SOURCES.txt +0 -1
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality.egg-info/requires.txt +1 -0
- diamodality-0.1.7/src/DiaModality/CsvParser.py +0 -77
- diamodality-0.1.7/src/DiaModality/_version.py +0 -1
- {diamodality-0.1.7 → diamodality-0.2.0}/LICENSE +0 -0
- {diamodality-0.1.7 → diamodality-0.2.0}/MANIFEST.in +0 -0
- {diamodality-0.1.7 → diamodality-0.2.0}/setup.cfg +0 -0
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality/__init__.py +0 -0
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality/__main__.py +0 -0
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality.egg-info/dependency_links.txt +0 -0
- {diamodality-0.1.7 → diamodality-0.2.0}/src/DiaModality.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: DiaModality
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Tool to plot modality vector diagrams
|
|
5
5
|
Author-email: konung-yaropolk <yaropolk1995@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -26,8 +26,10 @@ License: MIT License
|
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
Project-URL: Homepage, https://github.com/konung-yaropolk/DiaModality
|
|
28
28
|
Project-URL: Issues, https://github.com/konung-yaropolk/DiaModality/issues
|
|
29
|
-
Keywords: Visualization,Plotting,Matplotlib
|
|
29
|
+
Keywords: Visualization,Science,Plotting,Matplotlib
|
|
30
|
+
Classifier: Programming Language :: Python
|
|
30
31
|
Classifier: Programming Language :: Python :: 3
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
31
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
34
|
Classifier: Operating System :: OS Independent
|
|
33
35
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -39,14 +41,18 @@ Description-Content-Type: text/markdown
|
|
|
39
41
|
License-File: LICENSE
|
|
40
42
|
Requires-Dist: numpy
|
|
41
43
|
Requires-Dist: matplotlib
|
|
44
|
+
Requires-Dist: scsv
|
|
42
45
|
|
|
43
46
|
# DiaModality - The Modality Diagram
|
|
44
47
|
|
|
45
48
|
Simple tool to plot vector modality diagram
|
|
46
49
|
|
|
47
50
|
[](https://pypi.org/project/diamodality)
|
|
51
|
+
[](https://github.com/konung-yaropolk/DiaModality)
|
|
48
52
|
[](https://pypi.org/project/diamodality)
|
|
49
53
|
[](https://pypi.org/project/diamodality)
|
|
54
|
+
[](https://pypi.org/project/diamodality)
|
|
55
|
+
|
|
50
56
|
|
|
51
57
|
|
|
52
58
|
### To install package run the command:
|
|
@@ -100,8 +106,8 @@ with open(file_path, mode='w', newline='') as file:
|
|
|
100
106
|
---
|
|
101
107
|
``plot_sample_data.py``:
|
|
102
108
|
```python
|
|
103
|
-
import DiaModality.CsvParser as csv
|
|
104
109
|
import DiaModality.ModalityPlot as plt
|
|
110
|
+
import scsv as csv
|
|
105
111
|
import os
|
|
106
112
|
|
|
107
113
|
# input files:
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
Simple tool to plot vector modality diagram
|
|
4
4
|
|
|
5
5
|
[](https://pypi.org/project/diamodality)
|
|
6
|
+
[](https://github.com/konung-yaropolk/DiaModality)
|
|
6
7
|
[](https://pypi.org/project/diamodality)
|
|
7
8
|
[](https://pypi.org/project/diamodality)
|
|
9
|
+
[](https://pypi.org/project/diamodality)
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
### To install package run the command:
|
|
@@ -58,8 +61,8 @@ with open(file_path, mode='w', newline='') as file:
|
|
|
58
61
|
---
|
|
59
62
|
``plot_sample_data.py``:
|
|
60
63
|
```python
|
|
61
|
-
import DiaModality.CsvParser as csv
|
|
62
64
|
import DiaModality.ModalityPlot as plt
|
|
65
|
+
import scsv as csv
|
|
63
66
|
import os
|
|
64
67
|
|
|
65
68
|
# input files:
|
|
@@ -10,11 +10,13 @@ authors = [
|
|
|
10
10
|
{ name="konung-yaropolk", email="yaropolk1995@gmail.com" },
|
|
11
11
|
]
|
|
12
12
|
description = "Tool to plot modality vector diagrams"
|
|
13
|
-
keywords = ["Visualization", "Plotting", "Matplotlib"]
|
|
14
|
-
readme = "README.md"
|
|
13
|
+
keywords = ["Visualization", "Science", "Plotting", "Matplotlib"]
|
|
14
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
|
15
15
|
requires-python = ">=3.10"
|
|
16
16
|
classifiers = [
|
|
17
|
+
"Programming Language :: Python",
|
|
17
18
|
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
18
20
|
"License :: OSI Approved :: MIT License",
|
|
19
21
|
"Operating System :: OS Independent",
|
|
20
22
|
"Development Status :: 4 - Beta",
|
|
@@ -25,6 +27,7 @@ classifiers = [
|
|
|
25
27
|
dependencies = [
|
|
26
28
|
"numpy",
|
|
27
29
|
"matplotlib",
|
|
30
|
+
"scsv",
|
|
28
31
|
]
|
|
29
32
|
|
|
30
33
|
[project.urls]
|
|
@@ -32,4 +35,4 @@ Homepage = "https://github.com/konung-yaropolk/DiaModality"
|
|
|
32
35
|
Issues = "https://github.com/konung-yaropolk/DiaModality/issues"
|
|
33
36
|
|
|
34
37
|
[tool.setuptools.dynamic]
|
|
35
|
-
version = {attr = "DiaModality.__version__"}
|
|
38
|
+
version = {attr = "DiaModality.__version__"}
|
|
@@ -20,6 +20,7 @@ class __Figure():
|
|
|
20
20
|
linewidth=0.5,
|
|
21
21
|
alpha=0.8,
|
|
22
22
|
figsize=(10, 10),
|
|
23
|
+
dpi=300,
|
|
23
24
|
title='',
|
|
24
25
|
) -> None:
|
|
25
26
|
|
|
@@ -28,11 +29,12 @@ class __Figure():
|
|
|
28
29
|
self.linewidth = linewidth
|
|
29
30
|
self.alpha = alpha
|
|
30
31
|
self.figsize = figsize
|
|
32
|
+
self.dpi = dpi
|
|
31
33
|
self.title = title
|
|
32
34
|
self.debug_flag = DEBUG
|
|
33
35
|
|
|
34
36
|
# Prepare figure:
|
|
35
|
-
self.fig = plt.figure(figsize=self.figsize)
|
|
37
|
+
self.fig = plt.figure(figsize=self.figsize, dpi=self.dpi)
|
|
36
38
|
self._make_layout()
|
|
37
39
|
|
|
38
40
|
def _make_layout(self) -> None:
|
|
@@ -81,10 +83,11 @@ class ModalityPlot(__Figure, __Output):
|
|
|
81
83
|
linewidth=0.5,
|
|
82
84
|
alpha=0.8,
|
|
83
85
|
same_scale=False, # Draw all the subplots in the same scale
|
|
84
|
-
|
|
86
|
+
# Draw all vectors in the central subplot, else draw trimodal vectors only
|
|
85
87
|
full_center=True,
|
|
86
88
|
whole_sum=True, # Calculate all three modality vectors despite binarization
|
|
87
89
|
figsize=(10, 10),
|
|
90
|
+
dpi=300,
|
|
88
91
|
title='',
|
|
89
92
|
colors=(
|
|
90
93
|
'tab:green', # Set 1 color
|
|
@@ -135,6 +138,7 @@ class ModalityPlot(__Figure, __Output):
|
|
|
135
138
|
linewidth,
|
|
136
139
|
alpha,
|
|
137
140
|
figsize,
|
|
141
|
+
dpi,
|
|
138
142
|
title,
|
|
139
143
|
)
|
|
140
144
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: DiaModality
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Tool to plot modality vector diagrams
|
|
5
5
|
Author-email: konung-yaropolk <yaropolk1995@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -26,8 +26,10 @@ License: MIT License
|
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
Project-URL: Homepage, https://github.com/konung-yaropolk/DiaModality
|
|
28
28
|
Project-URL: Issues, https://github.com/konung-yaropolk/DiaModality/issues
|
|
29
|
-
Keywords: Visualization,Plotting,Matplotlib
|
|
29
|
+
Keywords: Visualization,Science,Plotting,Matplotlib
|
|
30
|
+
Classifier: Programming Language :: Python
|
|
30
31
|
Classifier: Programming Language :: Python :: 3
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
31
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
34
|
Classifier: Operating System :: OS Independent
|
|
33
35
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -39,14 +41,18 @@ Description-Content-Type: text/markdown
|
|
|
39
41
|
License-File: LICENSE
|
|
40
42
|
Requires-Dist: numpy
|
|
41
43
|
Requires-Dist: matplotlib
|
|
44
|
+
Requires-Dist: scsv
|
|
42
45
|
|
|
43
46
|
# DiaModality - The Modality Diagram
|
|
44
47
|
|
|
45
48
|
Simple tool to plot vector modality diagram
|
|
46
49
|
|
|
47
50
|
[](https://pypi.org/project/diamodality)
|
|
51
|
+
[](https://github.com/konung-yaropolk/DiaModality)
|
|
48
52
|
[](https://pypi.org/project/diamodality)
|
|
49
53
|
[](https://pypi.org/project/diamodality)
|
|
54
|
+
[](https://pypi.org/project/diamodality)
|
|
55
|
+
|
|
50
56
|
|
|
51
57
|
|
|
52
58
|
### To install package run the command:
|
|
@@ -100,8 +106,8 @@ with open(file_path, mode='w', newline='') as file:
|
|
|
100
106
|
---
|
|
101
107
|
``plot_sample_data.py``:
|
|
102
108
|
```python
|
|
103
|
-
import DiaModality.CsvParser as csv
|
|
104
109
|
import DiaModality.ModalityPlot as plt
|
|
110
|
+
import scsv as csv
|
|
105
111
|
import os
|
|
106
112
|
|
|
107
113
|
# input files:
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
import csv
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class LoadCsv:
|
|
6
|
-
'''
|
|
7
|
-
The input CSV file must be comma delimited and contains only numeric
|
|
8
|
-
data or empty cells. Each empty cell concideres as None.
|
|
9
|
-
'''
|
|
10
|
-
|
|
11
|
-
def __init__(self, file_path: str) -> None:
|
|
12
|
-
self.file_path = file_path
|
|
13
|
-
|
|
14
|
-
def ParseCsv(self, *args) -> list:
|
|
15
|
-
'''
|
|
16
|
-
The input is a list of integers.
|
|
17
|
-
Output is list of matrices.
|
|
18
|
-
Each int represent each output matrix and defines
|
|
19
|
-
how many columns to include into matrix.
|
|
20
|
-
Eg: input: (3, 2)
|
|
21
|
-
output: list of two matrices, first one with 1-3 cols
|
|
22
|
-
and second one with 4-5 cols from the original csv.
|
|
23
|
-
'''
|
|
24
|
-
|
|
25
|
-
with open(self.file_path, 'r') as file:
|
|
26
|
-
reader = csv.reader(file)
|
|
27
|
-
table = tuple(reader)
|
|
28
|
-
output = []
|
|
29
|
-
|
|
30
|
-
for i, arg in enumerate(args):
|
|
31
|
-
|
|
32
|
-
output.append([])
|
|
33
|
-
start = sum(args) - sum(args[i:])
|
|
34
|
-
stop = start + arg
|
|
35
|
-
|
|
36
|
-
for row in table:
|
|
37
|
-
output[i].append(
|
|
38
|
-
tuple(
|
|
39
|
-
float(cell) if cell
|
|
40
|
-
else None
|
|
41
|
-
for cell in row[start:stop]
|
|
42
|
-
)
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
return output
|
|
46
|
-
|
|
47
|
-
def ParseCsv_old(self) -> list:
|
|
48
|
-
'''
|
|
49
|
-
Ugly legacy method specific for modality plot only
|
|
50
|
-
to be removed if new one works well
|
|
51
|
-
'''
|
|
52
|
-
with open(self.file_path, 'r') as file:
|
|
53
|
-
reader = csv.reader(file)
|
|
54
|
-
data, binarization = [], []
|
|
55
|
-
for row in reader:
|
|
56
|
-
data.append(
|
|
57
|
-
tuple(
|
|
58
|
-
float(cell)
|
|
59
|
-
if cell
|
|
60
|
-
else 0
|
|
61
|
-
for cell in row[:3]
|
|
62
|
-
)
|
|
63
|
-
)
|
|
64
|
-
binarization.append(
|
|
65
|
-
tuple(
|
|
66
|
-
True
|
|
67
|
-
if cell
|
|
68
|
-
else False
|
|
69
|
-
for cell in row[3:6]
|
|
70
|
-
)
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
return data, binarization
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if __name__ == '__main__':
|
|
77
|
-
print('\nThis script can be used as an imported module only\n')
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|