py2ls 0.1.9.8__py3-none-any.whl → 0.1.9.9__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.
- py2ls/data/styles/style10.json +213 -0
- py2ls/data/styles/style11.json +213 -0
- py2ls/data/styles/style12.json +192 -0
- py2ls/ich2ls.py +136 -0
- py2ls/ips.py +1 -0
- py2ls/plot.py +216 -61
- py2ls/stats.py +1 -3
- {py2ls-0.1.9.8.dist-info → py2ls-0.1.9.9.dist-info}/METADATA +1 -1
- {py2ls-0.1.9.8.dist-info → py2ls-0.1.9.9.dist-info}/RECORD +10 -6
- {py2ls-0.1.9.8.dist-info → py2ls-0.1.9.9.dist-info}/WHEEL +0 -0
@@ -0,0 +1,213 @@
|
|
1
|
+
{
|
2
|
+
"style": "style6",
|
3
|
+
"layer": [
|
4
|
+
"b",
|
5
|
+
"bx",
|
6
|
+
"e",
|
7
|
+
"v",
|
8
|
+
"s",
|
9
|
+
"l"
|
10
|
+
],
|
11
|
+
"b": {
|
12
|
+
"go": 0,
|
13
|
+
"loc": "c",
|
14
|
+
"FaceAlpha": 1,
|
15
|
+
"EdgeColor": "k",
|
16
|
+
"EdgeAlpha": 1,
|
17
|
+
"LineStyle": "-",
|
18
|
+
"LineWidth": 0.8,
|
19
|
+
"x_width": 0.85,
|
20
|
+
"ShowBaseLine": "off",
|
21
|
+
"hatch": null,
|
22
|
+
"FaceColor": [
|
23
|
+
"#474747",
|
24
|
+
"#FF2C00",
|
25
|
+
"#0C5DA5",
|
26
|
+
"#845B97",
|
27
|
+
"#58BBCC"
|
28
|
+
],
|
29
|
+
"x_dist": 0.85
|
30
|
+
},
|
31
|
+
"e": {
|
32
|
+
"go": 0,
|
33
|
+
"loc": "l",
|
34
|
+
"LineWidth": 1,
|
35
|
+
"CapLineWidth": 1,
|
36
|
+
"CapSize": 2,
|
37
|
+
"Marker": "none",
|
38
|
+
"LineStyle": "none",
|
39
|
+
"LineColor": "k",
|
40
|
+
"LineJoin": "round",
|
41
|
+
"MarkerSize": "auto",
|
42
|
+
"MarkerEdgeColor": "none",
|
43
|
+
"Visible": true,
|
44
|
+
"Orientation": "vertical",
|
45
|
+
"error": "sem",
|
46
|
+
"x_width": 0.16999999999999998,
|
47
|
+
"cap_dir": "b",
|
48
|
+
"LineAlpha": 0.5,
|
49
|
+
"FaceColor": [
|
50
|
+
"#474747",
|
51
|
+
"#FF2C00",
|
52
|
+
"#0C5DA5",
|
53
|
+
"#845B97",
|
54
|
+
"#58BBCC"
|
55
|
+
],
|
56
|
+
"x_dist": 0.16999999999999998
|
57
|
+
},
|
58
|
+
"s": {
|
59
|
+
"go": 0,
|
60
|
+
"loc": "r",
|
61
|
+
"cmap": null,
|
62
|
+
"FaceAlpha": 1,
|
63
|
+
"x_width": 0.16999999999999998,
|
64
|
+
"Marker": "o",
|
65
|
+
"MarkerSize": 15,
|
66
|
+
"LineWidth": 0.8,
|
67
|
+
"MarkerEdgeColor": "k",
|
68
|
+
"FaceColor": [
|
69
|
+
"#474747",
|
70
|
+
"#FF2C00",
|
71
|
+
"#0C5DA5",
|
72
|
+
"#845B97",
|
73
|
+
"#58BBCC"
|
74
|
+
],
|
75
|
+
"x_dist": 0.16999999999999998
|
76
|
+
},
|
77
|
+
"l": {
|
78
|
+
"go": 1,
|
79
|
+
"LineStyle": "-",
|
80
|
+
"LineColor": "k",
|
81
|
+
"LineWidth": 0.5,
|
82
|
+
"LineAlpha": 0.5
|
83
|
+
},
|
84
|
+
"bx": {
|
85
|
+
"go": 1,
|
86
|
+
"loc": "c",
|
87
|
+
"EdgeColor": "k",
|
88
|
+
"FaceAlpha": 0.85,
|
89
|
+
"EdgeAlpha": 1,
|
90
|
+
"LineStyle": "-",
|
91
|
+
"x_width": 0.1,
|
92
|
+
"ShowBaseLine": "off",
|
93
|
+
"Notch": false,
|
94
|
+
"Outliers": false,
|
95
|
+
"OutlierMarker": "+",
|
96
|
+
"OutlierColor": "r",
|
97
|
+
"OutlierSize": 6,
|
98
|
+
"LineWidth": 0.5,
|
99
|
+
"Whisker": 0.5,
|
100
|
+
"Orientation": "vertical",
|
101
|
+
"BoxLineWidth": 0.5,
|
102
|
+
"WhiskerLineStyle": "-",
|
103
|
+
"WhiskerLineColor": "k",
|
104
|
+
"WhiskerLineWidth": 0.5,
|
105
|
+
"Caps": true,
|
106
|
+
"CapLineColor": "k",
|
107
|
+
"CapLineWidth": 0.5,
|
108
|
+
"CapSize": 0,
|
109
|
+
"MedianLine": false,
|
110
|
+
"MedianLineStyle": "-",
|
111
|
+
"MedianStyle": "line",
|
112
|
+
"MedianLineColor": "k",
|
113
|
+
"MedianLineWidth": 2.0,
|
114
|
+
"MedianLineTop": false,
|
115
|
+
"MeanLine": true,
|
116
|
+
"showmeans": false,
|
117
|
+
"MeanLineStyle": "-",
|
118
|
+
"MeanLineColor": "w",
|
119
|
+
"MeanLineWidth": 2.0,
|
120
|
+
"FaceColor": [
|
121
|
+
"#474747",
|
122
|
+
"#FF2C00",
|
123
|
+
"#0C5DA5",
|
124
|
+
"#845B97",
|
125
|
+
"#58BBCC"
|
126
|
+
],
|
127
|
+
"x_dist": 0.2,
|
128
|
+
"OutlierFaceColor": "r",
|
129
|
+
"OutlierEdgeColor": "r"
|
130
|
+
},
|
131
|
+
"v": {
|
132
|
+
"go": 1,
|
133
|
+
"x_width": 0.3,
|
134
|
+
"loc": "r",
|
135
|
+
"EdgeColor": "none",
|
136
|
+
"FaceAlpha": 0.9,
|
137
|
+
"BandWidth": "scott",
|
138
|
+
"Function": "pdf",
|
139
|
+
"Kernel": "gau",
|
140
|
+
"NumPoints": 500,
|
141
|
+
"BoundaryCorrection": "reflection",
|
142
|
+
"x_dist": 0.1,
|
143
|
+
"FaceColor": [
|
144
|
+
"#474747",
|
145
|
+
"#FF2C00",
|
146
|
+
"#0C5DA5",
|
147
|
+
"#845B97",
|
148
|
+
"#58BBCC"
|
149
|
+
]
|
150
|
+
},
|
151
|
+
"c": [
|
152
|
+
"#474747",
|
153
|
+
"#FF2C00",
|
154
|
+
"#0C5DA5",
|
155
|
+
"#845B97",
|
156
|
+
"#58BBCC"
|
157
|
+
],
|
158
|
+
"loc": {
|
159
|
+
"go": 0,
|
160
|
+
"xloc": [
|
161
|
+
1,
|
162
|
+
2,
|
163
|
+
3,
|
164
|
+
4,
|
165
|
+
5
|
166
|
+
]
|
167
|
+
},
|
168
|
+
"r": {
|
169
|
+
"go": 0,
|
170
|
+
"bw_adjust": 1,
|
171
|
+
"clip": false,
|
172
|
+
"FaceColor": [
|
173
|
+
"#474747",
|
174
|
+
"#FF2C00",
|
175
|
+
"#0C5DA5",
|
176
|
+
"#845B97",
|
177
|
+
"#58BBCC",
|
178
|
+
"#FF9500",
|
179
|
+
"#D57DBE",
|
180
|
+
"#474747",
|
181
|
+
"#FF2C00",
|
182
|
+
"#0C5DA5",
|
183
|
+
"#845B97",
|
184
|
+
"#58BBCC",
|
185
|
+
"#FF9500",
|
186
|
+
"#D57DBE",
|
187
|
+
"#474747",
|
188
|
+
"#FF2C00",
|
189
|
+
"#0C5DA5",
|
190
|
+
"#845B97",
|
191
|
+
"#58BBCC",
|
192
|
+
"#FF9500"
|
193
|
+
],
|
194
|
+
"FaceAlpha": 1,
|
195
|
+
"EdgeLineWidth": 1.5,
|
196
|
+
"fill": true,
|
197
|
+
"EdgeColor": "none",
|
198
|
+
"xLineWidth": 2.0,
|
199
|
+
"xLineColor": "none",
|
200
|
+
"aspect": 8,
|
201
|
+
"subplot_hspace": -0.3,
|
202
|
+
"subplot_height": 0.75,
|
203
|
+
"subplot_ylabel": "",
|
204
|
+
"column4color": null,
|
205
|
+
"row_labels": null,
|
206
|
+
"row_label_loc_xscale": 0.01,
|
207
|
+
"row_label_loc_yscale": 0.05,
|
208
|
+
"fontweight": "normal",
|
209
|
+
"fontsize": 11.0,
|
210
|
+
"color_row_label": "k",
|
211
|
+
"ylabel": null
|
212
|
+
}
|
213
|
+
}
|
@@ -0,0 +1,213 @@
|
|
1
|
+
{
|
2
|
+
"style": "style6",
|
3
|
+
"layer": [
|
4
|
+
"b",
|
5
|
+
"bx",
|
6
|
+
"e",
|
7
|
+
"v",
|
8
|
+
"s",
|
9
|
+
"l"
|
10
|
+
],
|
11
|
+
"b": {
|
12
|
+
"go": 0,
|
13
|
+
"loc": "c",
|
14
|
+
"FaceAlpha": 1,
|
15
|
+
"EdgeColor": "k",
|
16
|
+
"EdgeAlpha": 1,
|
17
|
+
"LineStyle": "-",
|
18
|
+
"LineWidth": 0.8,
|
19
|
+
"x_width": 0.85,
|
20
|
+
"ShowBaseLine": "off",
|
21
|
+
"hatch": null,
|
22
|
+
"FaceColor": [
|
23
|
+
"#474747",
|
24
|
+
"#FF2C00",
|
25
|
+
"#0C5DA5",
|
26
|
+
"#845B97",
|
27
|
+
"#58BBCC"
|
28
|
+
],
|
29
|
+
"x_dist": 0.85
|
30
|
+
},
|
31
|
+
"e": {
|
32
|
+
"go": 0,
|
33
|
+
"loc": "l",
|
34
|
+
"LineWidth": 1,
|
35
|
+
"CapLineWidth": 1,
|
36
|
+
"CapSize": 2,
|
37
|
+
"Marker": "none",
|
38
|
+
"LineStyle": "none",
|
39
|
+
"LineColor": "k",
|
40
|
+
"LineJoin": "round",
|
41
|
+
"MarkerSize": "auto",
|
42
|
+
"MarkerEdgeColor": "none",
|
43
|
+
"Visible": true,
|
44
|
+
"Orientation": "vertical",
|
45
|
+
"error": "sem",
|
46
|
+
"x_width": 0.16999999999999998,
|
47
|
+
"cap_dir": "b",
|
48
|
+
"LineAlpha": 0.5,
|
49
|
+
"FaceColor": [
|
50
|
+
"#474747",
|
51
|
+
"#FF2C00",
|
52
|
+
"#0C5DA5",
|
53
|
+
"#845B97",
|
54
|
+
"#58BBCC"
|
55
|
+
],
|
56
|
+
"x_dist": 0.16999999999999998
|
57
|
+
},
|
58
|
+
"s": {
|
59
|
+
"go": 0,
|
60
|
+
"loc": "r",
|
61
|
+
"cmap": null,
|
62
|
+
"FaceAlpha": 1,
|
63
|
+
"x_width": 0.16999999999999998,
|
64
|
+
"Marker": "o",
|
65
|
+
"MarkerSize": 15,
|
66
|
+
"LineWidth": 0.8,
|
67
|
+
"MarkerEdgeColor": "k",
|
68
|
+
"FaceColor": [
|
69
|
+
"#474747",
|
70
|
+
"#FF2C00",
|
71
|
+
"#0C5DA5",
|
72
|
+
"#845B97",
|
73
|
+
"#58BBCC"
|
74
|
+
],
|
75
|
+
"x_dist": 0.16999999999999998
|
76
|
+
},
|
77
|
+
"l": {
|
78
|
+
"go": 1,
|
79
|
+
"LineStyle": "-",
|
80
|
+
"LineColor": "k",
|
81
|
+
"LineWidth": 0.5,
|
82
|
+
"LineAlpha": 0.5
|
83
|
+
},
|
84
|
+
"bx": {
|
85
|
+
"go": 1,
|
86
|
+
"loc": "c",
|
87
|
+
"EdgeColor": "k",
|
88
|
+
"FaceAlpha": 0.85,
|
89
|
+
"EdgeAlpha": 1,
|
90
|
+
"LineStyle": "-",
|
91
|
+
"x_width": 0.1,
|
92
|
+
"ShowBaseLine": "off",
|
93
|
+
"Notch": false,
|
94
|
+
"Outliers": false,
|
95
|
+
"OutlierMarker": "+",
|
96
|
+
"OutlierColor": "r",
|
97
|
+
"OutlierSize": 6,
|
98
|
+
"LineWidth": 0.5,
|
99
|
+
"Whisker": 0.5,
|
100
|
+
"Orientation": "vertical",
|
101
|
+
"BoxLineWidth": 0.5,
|
102
|
+
"WhiskerLineStyle": "-",
|
103
|
+
"WhiskerLineColor": "k",
|
104
|
+
"WhiskerLineWidth": 0.5,
|
105
|
+
"Caps": true,
|
106
|
+
"CapLineColor": "k",
|
107
|
+
"CapLineWidth": 0.5,
|
108
|
+
"CapSize": 0,
|
109
|
+
"MedianLine": true,
|
110
|
+
"MedianLineStyle": "-",
|
111
|
+
"MedianStyle": "line",
|
112
|
+
"MedianLineColor": "k",
|
113
|
+
"MedianLineWidth": 2.0,
|
114
|
+
"MedianLineTop": false,
|
115
|
+
"MeanLine": false,
|
116
|
+
"showmeans": false,
|
117
|
+
"MeanLineStyle": "-",
|
118
|
+
"MeanLineColor": "w",
|
119
|
+
"MeanLineWidth": 2.0,
|
120
|
+
"FaceColor": [
|
121
|
+
"#474747",
|
122
|
+
"#FF2C00",
|
123
|
+
"#0C5DA5",
|
124
|
+
"#845B97",
|
125
|
+
"#58BBCC"
|
126
|
+
],
|
127
|
+
"x_dist": 0.2,
|
128
|
+
"OutlierFaceColor": "r",
|
129
|
+
"OutlierEdgeColor": "r"
|
130
|
+
},
|
131
|
+
"v": {
|
132
|
+
"go": 1,
|
133
|
+
"x_width": 0.3,
|
134
|
+
"loc": "r",
|
135
|
+
"EdgeColor": "none",
|
136
|
+
"FaceAlpha": 0.9,
|
137
|
+
"BandWidth": "scott",
|
138
|
+
"Function": "pdf",
|
139
|
+
"Kernel": "gau",
|
140
|
+
"NumPoints": 500,
|
141
|
+
"BoundaryCorrection": "reflection",
|
142
|
+
"x_dist": 0.1,
|
143
|
+
"FaceColor": [
|
144
|
+
"#474747",
|
145
|
+
"#FF2C00",
|
146
|
+
"#0C5DA5",
|
147
|
+
"#845B97",
|
148
|
+
"#58BBCC"
|
149
|
+
]
|
150
|
+
},
|
151
|
+
"c": [
|
152
|
+
"#474747",
|
153
|
+
"#FF2C00",
|
154
|
+
"#0C5DA5",
|
155
|
+
"#845B97",
|
156
|
+
"#58BBCC"
|
157
|
+
],
|
158
|
+
"loc": {
|
159
|
+
"go": 0,
|
160
|
+
"xloc": [
|
161
|
+
1,
|
162
|
+
2,
|
163
|
+
3,
|
164
|
+
4,
|
165
|
+
5
|
166
|
+
]
|
167
|
+
},
|
168
|
+
"r": {
|
169
|
+
"go": 0,
|
170
|
+
"bw_adjust": 1,
|
171
|
+
"clip": false,
|
172
|
+
"FaceColor": [
|
173
|
+
"#474747",
|
174
|
+
"#FF2C00",
|
175
|
+
"#0C5DA5",
|
176
|
+
"#845B97",
|
177
|
+
"#58BBCC",
|
178
|
+
"#FF9500",
|
179
|
+
"#D57DBE",
|
180
|
+
"#474747",
|
181
|
+
"#FF2C00",
|
182
|
+
"#0C5DA5",
|
183
|
+
"#845B97",
|
184
|
+
"#58BBCC",
|
185
|
+
"#FF9500",
|
186
|
+
"#D57DBE",
|
187
|
+
"#474747",
|
188
|
+
"#FF2C00",
|
189
|
+
"#0C5DA5",
|
190
|
+
"#845B97",
|
191
|
+
"#58BBCC",
|
192
|
+
"#FF9500"
|
193
|
+
],
|
194
|
+
"FaceAlpha": 1,
|
195
|
+
"EdgeLineWidth": 1.5,
|
196
|
+
"fill": true,
|
197
|
+
"EdgeColor": "none",
|
198
|
+
"xLineWidth": 2.0,
|
199
|
+
"xLineColor": "none",
|
200
|
+
"aspect": 8,
|
201
|
+
"subplot_hspace": -0.3,
|
202
|
+
"subplot_height": 0.75,
|
203
|
+
"subplot_ylabel": "",
|
204
|
+
"column4color": null,
|
205
|
+
"row_labels": null,
|
206
|
+
"row_label_loc_xscale": 0.01,
|
207
|
+
"row_label_loc_yscale": 0.05,
|
208
|
+
"fontweight": "normal",
|
209
|
+
"fontsize": 11.0,
|
210
|
+
"color_row_label": "k",
|
211
|
+
"ylabel": null
|
212
|
+
}
|
213
|
+
}
|
@@ -0,0 +1,192 @@
|
|
1
|
+
{
|
2
|
+
"style": "style8",
|
3
|
+
"layer": [
|
4
|
+
"v",
|
5
|
+
"e"
|
6
|
+
],
|
7
|
+
"b": {
|
8
|
+
"go": 0,
|
9
|
+
"loc": "c",
|
10
|
+
"FaceAlpha": 1,
|
11
|
+
"EdgeColor": "k",
|
12
|
+
"EdgeAlpha": 1,
|
13
|
+
"LineStyle": "-",
|
14
|
+
"LineWidth": 0.8,
|
15
|
+
"x_width": 0.05,
|
16
|
+
"ShowBaseLine": "off",
|
17
|
+
"hatch": null,
|
18
|
+
"FaceColor": [
|
19
|
+
"#474747",
|
20
|
+
"#FF2C00"
|
21
|
+
],
|
22
|
+
"x_dist": 0.05
|
23
|
+
},
|
24
|
+
"e": {
|
25
|
+
"go": 0,
|
26
|
+
"loc": "c",
|
27
|
+
"LineWidth": 1,
|
28
|
+
"CapLineWidth": 1,
|
29
|
+
"CapSize": 2,
|
30
|
+
"Marker": "d",
|
31
|
+
"LineStyle": "-",
|
32
|
+
"LineColor": "k",
|
33
|
+
"LineJoin": "round",
|
34
|
+
"MarkerSize": "auto",
|
35
|
+
"MarkerEdgeColor": [
|
36
|
+
"none"
|
37
|
+
],
|
38
|
+
"Visible": true,
|
39
|
+
"Orientation": "vertical",
|
40
|
+
"error": "sem",
|
41
|
+
"x_width": 0.03,
|
42
|
+
"cap_dir": "b",
|
43
|
+
"LineAlpha": 0.5,
|
44
|
+
"FaceColor": [
|
45
|
+
"#474747",
|
46
|
+
"#FF2C00"
|
47
|
+
],
|
48
|
+
"x_dist": 0.03
|
49
|
+
},
|
50
|
+
"s": {
|
51
|
+
"go": 0,
|
52
|
+
"loc": "r",
|
53
|
+
"cmap": null,
|
54
|
+
"FaceAlpha": 1,
|
55
|
+
"x_width": 0.1,
|
56
|
+
"Marker": "o",
|
57
|
+
"MarkerSize": 15,
|
58
|
+
"LineWidth": 0.8,
|
59
|
+
"MarkerEdgeColor": "k",
|
60
|
+
"FaceColor": [
|
61
|
+
"#474747",
|
62
|
+
"#FF2C00"
|
63
|
+
],
|
64
|
+
"x_dist": 0.1
|
65
|
+
},
|
66
|
+
"l": {
|
67
|
+
"go": 0,
|
68
|
+
"LineStyle": "-",
|
69
|
+
"LineColor": "k",
|
70
|
+
"LineWidth": 0.5,
|
71
|
+
"LineAlpha": 0.5
|
72
|
+
},
|
73
|
+
"bx": {
|
74
|
+
"go": 1,
|
75
|
+
"loc": "c",
|
76
|
+
"EdgeColor": "k",
|
77
|
+
"FaceAlpha": 1,
|
78
|
+
"EdgeAlpha": 1,
|
79
|
+
"LineStyle": "-",
|
80
|
+
"x_width": 0.1,
|
81
|
+
"ShowBaseLine": "off",
|
82
|
+
"Notch": false,
|
83
|
+
"Outliers": "on",
|
84
|
+
"OutlierMarker": "+",
|
85
|
+
"OutlierColor": "r",
|
86
|
+
"OutlierSize": 6,
|
87
|
+
"LineWidth": 0.5,
|
88
|
+
"Whisker": 0.5,
|
89
|
+
"Orientation": "vertical",
|
90
|
+
"BoxLineWidth": 0.5,
|
91
|
+
"WhiskerLineStyle": "-",
|
92
|
+
"WhiskerLineColor": "w",
|
93
|
+
"WhiskerLineWidth": 1,
|
94
|
+
"Caps": 0,
|
95
|
+
"CapLineColor": "k",
|
96
|
+
"CapLineWidth": 0.5,
|
97
|
+
"CapSize": 0.1,
|
98
|
+
"MedianLine": true,
|
99
|
+
"MedianLineStyle": "-",
|
100
|
+
"MedianStyle": "line",
|
101
|
+
"MedianLineColor": "k",
|
102
|
+
"MedianLineWidth": 2.0,
|
103
|
+
"MedianLineTop": false,
|
104
|
+
"MeanLine": false,
|
105
|
+
"showmeans": false,
|
106
|
+
"MeanLineStyle": "-",
|
107
|
+
"MeanLineColor": "w",
|
108
|
+
"MeanLineWidth": 2.0,
|
109
|
+
"OutlierFaceColor": "r",
|
110
|
+
"OutlierEdgeColor": "r",
|
111
|
+
"FaceColor": [
|
112
|
+
"w",
|
113
|
+
"w"
|
114
|
+
],
|
115
|
+
"x_dist": 0.1
|
116
|
+
},
|
117
|
+
"v": {
|
118
|
+
"go": 1,
|
119
|
+
"x_width": 0.1,
|
120
|
+
"loc": "f",
|
121
|
+
"EdgeColor": "k",
|
122
|
+
"FaceAlpha": 1,
|
123
|
+
"BandWidth": "scott",
|
124
|
+
"Function": "pdf",
|
125
|
+
"Kernel": "gau",
|
126
|
+
"NumPoints": 500,
|
127
|
+
"BoundaryCorrection": "reflection",
|
128
|
+
"x_dist": 0.1,
|
129
|
+
"LineWidth": 0.5,
|
130
|
+
"FaceColor": [
|
131
|
+
"#474747",
|
132
|
+
"#FF2C00"
|
133
|
+
],
|
134
|
+
"hatch": null
|
135
|
+
},
|
136
|
+
"r": {
|
137
|
+
"go": 0,
|
138
|
+
"bw_adjust": 1,
|
139
|
+
"clip": false,
|
140
|
+
"FaceColor": [
|
141
|
+
"#474747",
|
142
|
+
"#FF2C00",
|
143
|
+
"#0C5DA5",
|
144
|
+
"#845B97",
|
145
|
+
"#58BBCC",
|
146
|
+
"#FF9500",
|
147
|
+
"#D57DBE",
|
148
|
+
"#474747",
|
149
|
+
"#FF2C00",
|
150
|
+
"#0C5DA5",
|
151
|
+
"#845B97",
|
152
|
+
"#58BBCC",
|
153
|
+
"#FF9500",
|
154
|
+
"#D57DBE",
|
155
|
+
"#474747",
|
156
|
+
"#FF2C00",
|
157
|
+
"#0C5DA5",
|
158
|
+
"#845B97",
|
159
|
+
"#58BBCC",
|
160
|
+
"#FF9500"
|
161
|
+
],
|
162
|
+
"FaceAlpha": 1,
|
163
|
+
"EdgeLineWidth": 1.5,
|
164
|
+
"fill": true,
|
165
|
+
"EdgeColor": "none",
|
166
|
+
"xLineWidth": 2.0,
|
167
|
+
"xLineColor": "none",
|
168
|
+
"aspect": 8,
|
169
|
+
"subplot_hspace": -0.3,
|
170
|
+
"subplot_height": 0.75,
|
171
|
+
"subplot_ylabel": "",
|
172
|
+
"column4color": null,
|
173
|
+
"row_labels": null,
|
174
|
+
"row_label_loc_xscale": 0.01,
|
175
|
+
"row_label_loc_yscale": 0.05,
|
176
|
+
"fontweight": "normal",
|
177
|
+
"fontsize": 11.0,
|
178
|
+
"color_row_label": "k",
|
179
|
+
"ylabel": null
|
180
|
+
},
|
181
|
+
"c": [
|
182
|
+
"#474747",
|
183
|
+
"#FF2C00"
|
184
|
+
],
|
185
|
+
"loc": {
|
186
|
+
"go": 0,
|
187
|
+
"xloc": [
|
188
|
+
1,
|
189
|
+
2
|
190
|
+
]
|
191
|
+
}
|
192
|
+
}
|
py2ls/ich2ls.py
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
import numpy as np
|
2
|
+
import matplotlib.pyplot as plt
|
3
|
+
from scipy.stats import pearsonr
|
4
|
+
from PIL import Image
|
5
|
+
from skimage import filters, morphology, measure, color
|
6
|
+
|
7
|
+
|
8
|
+
def img_preprocess(dir_img, subtract_background=True, size_obj=50, size_hole=50):
|
9
|
+
"""
|
10
|
+
Processes an image by performing thresholding, morphological operations,
|
11
|
+
and region labeling.
|
12
|
+
|
13
|
+
Parameters:
|
14
|
+
- dir_img: Path to the image file.
|
15
|
+
- size_obj: Minimum size of objects to keep (default: 50).
|
16
|
+
- size_hole: Maximum size of holes to fill (default: 50).
|
17
|
+
|
18
|
+
Returns:
|
19
|
+
- output: Dictionary containing the overlay image, threshold value, and regions.
|
20
|
+
"""
|
21
|
+
props_list = [
|
22
|
+
"area", # Number of pixels in the region. Useful for determining the size of regions.
|
23
|
+
"area_bbox",
|
24
|
+
"area_convex",
|
25
|
+
"area_filled",
|
26
|
+
"axis_major_length", # Lengths of the major and minor axes of the ellipse that fits the region. Useful for understanding the shape's elongation and orientation.
|
27
|
+
"axis_minor_length",
|
28
|
+
"bbox", # Bounding box coordinates (min_row, min_col, max_row, max_col). Useful for spatial localization of regions.
|
29
|
+
"centroid", # Center of mass coordinates (centroid-0, centroid-1). Helps locate the center of each region.
|
30
|
+
"centroid_local",
|
31
|
+
"centroid_weighted",
|
32
|
+
"centroid_weighted_local",
|
33
|
+
"coords",
|
34
|
+
"eccentricity", # Measure of how elongated the region is. Values range from 0 (circular) to 1 (line). Useful for assessing the shape of regions.
|
35
|
+
"equivalent_diameter_area", # Diameter of a circle with the same area as the region. Provides a simple measure of size.
|
36
|
+
"euler_number",
|
37
|
+
"extent", # Ratio of the region's area to the area of its bounding box. Indicates how much of the bounding box is filled by the region.
|
38
|
+
"feret_diameter_max", # Maximum diameter of the region, providing another measure of size.
|
39
|
+
"image",
|
40
|
+
"image_convex",
|
41
|
+
"image_filled",
|
42
|
+
"image_intensity",
|
43
|
+
"inertia_tensor", # ensor describing the distribution of mass in the region, useful for more advanced shape analysis.
|
44
|
+
"inertia_tensor_eigvals",
|
45
|
+
"intensity_max", # Maximum intensity value within the region. Helps identify regions with high-intensity features.
|
46
|
+
"intensity_mean", # Average intensity value within the region. Useful for distinguishing between regions based on their brightness.
|
47
|
+
"intensity_min", # Minimum intensity value within the region. Useful for regions with varying intensity.
|
48
|
+
"intensity_std",
|
49
|
+
"label", # Unique identifier for each region.
|
50
|
+
"moments",
|
51
|
+
"moments_central",
|
52
|
+
"moments_hu", # Hu moments are a set of seven invariant features that describe the shape of the region. Useful for shape recognition and classification.
|
53
|
+
"moments_normalized",
|
54
|
+
"moments_weighted",
|
55
|
+
"moments_weighted_central",
|
56
|
+
"moments_weighted_hu",
|
57
|
+
"moments_weighted_normalized",
|
58
|
+
"orientation", # ngle of the major axis of the ellipse that fits the region. Useful for determining the orientation of elongated regions.
|
59
|
+
"perimeter", # Length of the boundary of the region. Useful for shape analysis.
|
60
|
+
"perimeter_crofton",
|
61
|
+
"slice",
|
62
|
+
"solidity", # Ratio of the area of the region to the area of its convex hull. Indicates how solid or compact a region is.
|
63
|
+
]
|
64
|
+
if isinstance(dir_img, str):
|
65
|
+
# Step 1: Load the image
|
66
|
+
image = Image.open(dir_img)
|
67
|
+
|
68
|
+
# Step 2: Convert the image to grayscale and normalize
|
69
|
+
gray_image = image.convert("L")
|
70
|
+
image_array = np.array(gray_image)
|
71
|
+
normalized_image = image_array / 255.0
|
72
|
+
else:
|
73
|
+
cleaned_image = dir_img
|
74
|
+
image_array = cleaned_image
|
75
|
+
normalized_image = cleaned_image
|
76
|
+
image = cleaned_image
|
77
|
+
binary_image = cleaned_image
|
78
|
+
thr_val = None
|
79
|
+
if subtract_background:
|
80
|
+
# Step 3: Apply thresholding to segment the image
|
81
|
+
thr_val = filters.threshold_otsu(image_array)
|
82
|
+
print(f"Threshold value is: {thr_val}")
|
83
|
+
|
84
|
+
# Apply thresholds and generate binary images
|
85
|
+
binary_image = image_array > thr_val
|
86
|
+
|
87
|
+
# Step 4: Perform morphological operations to clean the image
|
88
|
+
# Remove small objects and fill small holes
|
89
|
+
cleaned_image_rm_min_obj = morphology.remove_small_objects(
|
90
|
+
binary_image, min_size=size_obj
|
91
|
+
)
|
92
|
+
cleaned_image = morphology.remove_small_holes(
|
93
|
+
cleaned_image_rm_min_obj, area_threshold=size_hole
|
94
|
+
)
|
95
|
+
|
96
|
+
# Label the regions
|
97
|
+
label_image = measure.label(cleaned_image)
|
98
|
+
|
99
|
+
# Optional: Overlay labels on the original image
|
100
|
+
overlay_image = color.label2rgb(label_image, image_array)
|
101
|
+
regions = measure.regionprops(label_image, intensity_image=image_array)
|
102
|
+
region_props = measure.regionprops_table(
|
103
|
+
label_image, intensity_image=image_array, properties=props_list
|
104
|
+
)
|
105
|
+
df_regions = pd.DataFrame(region_props)
|
106
|
+
# Pack the results into a single output variable (dictionary)
|
107
|
+
output = {
|
108
|
+
"img": image,
|
109
|
+
"img_array": image_array,
|
110
|
+
"img_scale": normalized_image,
|
111
|
+
"img_binary": binary_image,
|
112
|
+
"img_clean": cleaned_image,
|
113
|
+
"img_label": label_image,
|
114
|
+
"img_overlay": overlay_image,
|
115
|
+
"thr_val": thr_val,
|
116
|
+
"regions": regions,
|
117
|
+
"df_regions": df_regions,
|
118
|
+
}
|
119
|
+
|
120
|
+
return output
|
121
|
+
|
122
|
+
|
123
|
+
def cal_pearson(img1, img2):
|
124
|
+
"""Compute Pearson correlation coefficient between two images."""
|
125
|
+
img1_flat = img1.flatten()
|
126
|
+
img2_flat = img2.flatten()
|
127
|
+
r, p = pearsonr(img1_flat, img2_flat)
|
128
|
+
return r, p
|
129
|
+
|
130
|
+
|
131
|
+
def cal_manders(img1, img2):
|
132
|
+
"""Compute Manders' overlap coefficient between two binary images."""
|
133
|
+
img1_binary = img1 > filters.threshold_otsu(img1)
|
134
|
+
img2_binary = img2 > filters.threshold_otsu(img2)
|
135
|
+
overlap_coef = np.sum(img1_binary & img2_binary) / np.sum(img1_binary)
|
136
|
+
return overlap_coef
|
py2ls/ips.py
CHANGED
py2ls/plot.py
CHANGED
@@ -349,7 +349,11 @@ def catplot(data, *args, **kwargs):
|
|
349
349
|
edgecolor=opt_v["EdgeColor"],
|
350
350
|
label=label[i],
|
351
351
|
lw=opt_v["LineWidth"],
|
352
|
-
hatch=
|
352
|
+
hatch=(
|
353
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
354
|
+
if opt_v["hatch"] is not None
|
355
|
+
else None
|
356
|
+
),
|
353
357
|
)
|
354
358
|
elif (
|
355
359
|
"l" in opt_v["loc"].lower()
|
@@ -364,7 +368,11 @@ def catplot(data, *args, **kwargs):
|
|
364
368
|
edgecolor=opt_v["EdgeColor"],
|
365
369
|
label=label[i],
|
366
370
|
lw=opt_v["LineWidth"],
|
367
|
-
hatch=
|
371
|
+
hatch=(
|
372
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
373
|
+
if opt_v["hatch"] is not None
|
374
|
+
else None
|
375
|
+
),
|
368
376
|
)
|
369
377
|
elif (
|
370
378
|
"o" in opt_v["loc"].lower()
|
@@ -379,7 +387,11 @@ def catplot(data, *args, **kwargs):
|
|
379
387
|
edgecolor=opt_v["EdgeColor"],
|
380
388
|
label=label[i],
|
381
389
|
lw=opt_v["LineWidth"],
|
382
|
-
hatch=
|
390
|
+
hatch=(
|
391
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
392
|
+
if opt_v["hatch"] is not None
|
393
|
+
else None
|
394
|
+
),
|
383
395
|
)
|
384
396
|
elif "i" in opt_v["loc"].lower():
|
385
397
|
if i % 2 == 1: # odd number
|
@@ -394,7 +406,11 @@ def catplot(data, *args, **kwargs):
|
|
394
406
|
edgecolor=opt_v["EdgeColor"],
|
395
407
|
label=label[i],
|
396
408
|
lw=opt_v["LineWidth"],
|
397
|
-
hatch=
|
409
|
+
hatch=(
|
410
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
411
|
+
if opt_v["hatch"] is not None
|
412
|
+
else None
|
413
|
+
),
|
398
414
|
)
|
399
415
|
else:
|
400
416
|
ax.fill_betweenx(
|
@@ -408,7 +424,11 @@ def catplot(data, *args, **kwargs):
|
|
408
424
|
edgecolor=opt_v["EdgeColor"],
|
409
425
|
label=label[i],
|
410
426
|
lw=opt_v["LineWidth"],
|
411
|
-
hatch=
|
427
|
+
hatch=(
|
428
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
429
|
+
if opt_v["hatch"] is not None
|
430
|
+
else None
|
431
|
+
),
|
412
432
|
)
|
413
433
|
elif "f" in opt_v["loc"].lower():
|
414
434
|
ax.fill_betweenx(
|
@@ -420,7 +440,11 @@ def catplot(data, *args, **kwargs):
|
|
420
440
|
edgecolor=opt_v["EdgeColor"],
|
421
441
|
label=label[i],
|
422
442
|
lw=opt_v["LineWidth"],
|
423
|
-
hatch=
|
443
|
+
hatch=(
|
444
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
445
|
+
if opt_v["hatch"] is not None
|
446
|
+
else None
|
447
|
+
),
|
424
448
|
)
|
425
449
|
else:
|
426
450
|
if "r" in opt_v["loc"].lower():
|
@@ -432,7 +456,11 @@ def catplot(data, *args, **kwargs):
|
|
432
456
|
alpha=opt_v["FaceAlpha"],
|
433
457
|
edgecolor=opt_v["EdgeColor"],
|
434
458
|
lw=opt_v["LineWidth"],
|
435
|
-
hatch=
|
459
|
+
hatch=(
|
460
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
461
|
+
if opt_v["hatch"] is not None
|
462
|
+
else None
|
463
|
+
),
|
436
464
|
)
|
437
465
|
elif (
|
438
466
|
"l" in opt_v["loc"].lower() and not "f" in opt_v["loc"].lower()
|
@@ -445,7 +473,11 @@ def catplot(data, *args, **kwargs):
|
|
445
473
|
alpha=opt_v["FaceAlpha"],
|
446
474
|
edgecolor=opt_v["EdgeColor"],
|
447
475
|
lw=opt_v["LineWidth"],
|
448
|
-
hatch=
|
476
|
+
hatch=(
|
477
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
478
|
+
if opt_v["hatch"] is not None
|
479
|
+
else None
|
480
|
+
),
|
449
481
|
)
|
450
482
|
elif "o" in opt_v["loc"].lower() or "both" in opt_v["loc"].lower():
|
451
483
|
ax.fill_betweenx(
|
@@ -456,7 +488,11 @@ def catplot(data, *args, **kwargs):
|
|
456
488
|
alpha=opt_v["FaceAlpha"],
|
457
489
|
edgecolor=opt_v["EdgeColor"],
|
458
490
|
lw=opt_v["LineWidth"],
|
459
|
-
hatch=
|
491
|
+
hatch=(
|
492
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
493
|
+
if opt_v["hatch"] is not None
|
494
|
+
else None
|
495
|
+
),
|
460
496
|
)
|
461
497
|
elif "i" in opt_v["loc"].lower():
|
462
498
|
if i % 2 == 1: # odd number
|
@@ -468,7 +504,11 @@ def catplot(data, *args, **kwargs):
|
|
468
504
|
alpha=opt_v["FaceAlpha"],
|
469
505
|
edgecolor=opt_v["EdgeColor"],
|
470
506
|
lw=opt_v["LineWidth"],
|
471
|
-
hatch=
|
507
|
+
hatch=(
|
508
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
509
|
+
if opt_v["hatch"] is not None
|
510
|
+
else None
|
511
|
+
),
|
472
512
|
)
|
473
513
|
else:
|
474
514
|
ax.fill_betweenx(
|
@@ -479,7 +519,11 @@ def catplot(data, *args, **kwargs):
|
|
479
519
|
alpha=opt_v["FaceAlpha"],
|
480
520
|
edgecolor=opt_v["EdgeColor"],
|
481
521
|
lw=opt_v["LineWidth"],
|
482
|
-
hatch=
|
522
|
+
hatch=(
|
523
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
524
|
+
if opt_v["hatch"] is not None
|
525
|
+
else None
|
526
|
+
),
|
483
527
|
)
|
484
528
|
elif "f" in opt_v["loc"].lower():
|
485
529
|
ax.fill_betweenx(
|
@@ -490,7 +534,11 @@ def catplot(data, *args, **kwargs):
|
|
490
534
|
alpha=opt_v["FaceAlpha"],
|
491
535
|
edgecolor=opt_v["EdgeColor"],
|
492
536
|
lw=opt_v["LineWidth"],
|
493
|
-
hatch=
|
537
|
+
hatch=(
|
538
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
539
|
+
if opt_v["hatch"] is not None
|
540
|
+
else None
|
541
|
+
),
|
494
542
|
)
|
495
543
|
|
496
544
|
def plot_ridgeplot(data, x, y, opt_r, **kwargs_figsets):
|
@@ -723,6 +771,7 @@ def catplot(data, *args, **kwargs):
|
|
723
771
|
col = kwargs.get("col", None)
|
724
772
|
report = kwargs.get("report", True)
|
725
773
|
vertical = kwargs.get("vertical", True)
|
774
|
+
stats_subgroup = kwargs.get("stats_subgroup", True)
|
726
775
|
if not col:
|
727
776
|
kw_figsets = kwargs.get("figsets", None)
|
728
777
|
# check the data type
|
@@ -755,23 +804,100 @@ def catplot(data, *args, **kwargs):
|
|
755
804
|
for i in df[x].unique().tolist():
|
756
805
|
print(i) # to indicate which 'x'
|
757
806
|
if hue and stats_param:
|
758
|
-
if
|
759
|
-
|
760
|
-
|
807
|
+
if stats_subgroup:
|
808
|
+
data_temp = df[df[x] == i]
|
809
|
+
hue_labels = data_temp[hue].unique().tolist()
|
810
|
+
if isinstance(stats_param, dict):
|
811
|
+
if len(hue_labels) > 2:
|
812
|
+
if "factor" in stats_param.keys():
|
813
|
+
res_tmp = FuncMultiCmpt(
|
814
|
+
data=data_temp, dv=y, **stats_param
|
815
|
+
)
|
816
|
+
else:
|
817
|
+
res_tmp = FuncMultiCmpt(
|
818
|
+
data=data_temp,
|
819
|
+
dv=y,
|
820
|
+
factor=hue,
|
821
|
+
**stats_param,
|
822
|
+
)
|
823
|
+
elif bool(stats_param):
|
824
|
+
res_tmp = FuncMultiCmpt(
|
825
|
+
data=data_temp, dv=y, factor=hue
|
826
|
+
)
|
827
|
+
else:
|
828
|
+
res_tmp = "did not work properly"
|
829
|
+
display_output(res_tmp)
|
830
|
+
res = pd.concat(
|
831
|
+
[res, pd.DataFrame([res_tmp])],
|
832
|
+
ignore_index=True,
|
833
|
+
axis=0,
|
834
|
+
)
|
761
835
|
else:
|
762
|
-
|
763
|
-
|
836
|
+
if isinstance(stats_param, dict):
|
837
|
+
pmc = stats_param.get("pmc", "pmc")
|
838
|
+
pair = stats_param.get("pair", "unpaired")
|
839
|
+
else:
|
840
|
+
pmc = "pmc"
|
841
|
+
pair = "unpair"
|
842
|
+
|
843
|
+
res_tmp = FuncCmpt(
|
844
|
+
x1=data_temp.loc[
|
845
|
+
data_temp[hue] == hue_labels[0], y
|
846
|
+
].tolist(),
|
847
|
+
x2=data_temp.loc[
|
848
|
+
data_temp[hue] == hue_labels[1], y
|
849
|
+
].tolist(),
|
850
|
+
pmc=pmc,
|
851
|
+
pair=pair,
|
764
852
|
)
|
765
|
-
|
766
|
-
res_tmp = FuncMultiCmpt(
|
767
|
-
data=df[df[x] == i], dv=y, factor=hue
|
768
|
-
)
|
853
|
+
display_output(res_tmp)
|
769
854
|
else:
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
855
|
+
if isinstance(stats_param, dict):
|
856
|
+
if len(xticklabels) > 2:
|
857
|
+
if "factor" in stats_param.keys():
|
858
|
+
res_tmp = FuncMultiCmpt(
|
859
|
+
data=df, dv=y, **stats_param
|
860
|
+
)
|
861
|
+
else:
|
862
|
+
res_tmp = FuncMultiCmpt(
|
863
|
+
data=df[df[x] == i],
|
864
|
+
dv=y,
|
865
|
+
factor=hue,
|
866
|
+
**stats_param,
|
867
|
+
)
|
868
|
+
elif bool(stats_param):
|
869
|
+
res_tmp = FuncMultiCmpt(
|
870
|
+
data=df[df[x] == i], dv=y, factor=hue
|
871
|
+
)
|
872
|
+
else:
|
873
|
+
res_tmp = "did not work properly"
|
874
|
+
display_output(res_tmp)
|
875
|
+
res = pd.concat(
|
876
|
+
[res, pd.DataFrame([res_tmp])],
|
877
|
+
ignore_index=True,
|
878
|
+
axis=0,
|
879
|
+
)
|
880
|
+
else:
|
881
|
+
if isinstance(stats_param, dict):
|
882
|
+
pmc = stats_param.get("pmc", "pmc")
|
883
|
+
pair = stats_param.get("pair", "unpaired")
|
884
|
+
else:
|
885
|
+
pmc = "pmc"
|
886
|
+
pair = "unpair"
|
887
|
+
|
888
|
+
data_temp = df[df[x] == i]
|
889
|
+
hue_labels = data_temp[hue].unique().tolist()
|
890
|
+
res_tmp = FuncCmpt(
|
891
|
+
x1=data_temp.loc[
|
892
|
+
data_temp[hue] == hue_labels[0], y
|
893
|
+
].tolist(),
|
894
|
+
x2=data_temp.loc[
|
895
|
+
data_temp[hue] == hue_labels[1], y
|
896
|
+
].tolist(),
|
897
|
+
pmc=pmc,
|
898
|
+
pair=pair,
|
899
|
+
)
|
900
|
+
display_output(res_tmp)
|
775
901
|
ihue += 1
|
776
902
|
|
777
903
|
else:
|
@@ -1115,41 +1241,70 @@ def catplot(data, *args, **kwargs):
|
|
1115
1241
|
res,
|
1116
1242
|
xticks_x_loc,
|
1117
1243
|
xticklabels,
|
1118
|
-
y_loc=np.
|
1244
|
+
y_loc=np.nanmax(data),
|
1119
1245
|
report_go=report,
|
1120
1246
|
)
|
1121
1247
|
else: # hue is not None
|
1122
1248
|
ihue = 1
|
1123
1249
|
for i in df[x].unique().tolist():
|
1250
|
+
data_temp = df[df[x] == i]
|
1251
|
+
hue_labels = data_temp[hue].unique().tolist()
|
1124
1252
|
if stats_param:
|
1125
|
-
if
|
1126
|
-
if
|
1253
|
+
if len(hue_labels) > 2:
|
1254
|
+
if isinstance(stats_param, dict):
|
1255
|
+
if "factor" in stats_param.keys():
|
1256
|
+
res_tmp = FuncMultiCmpt(
|
1257
|
+
data=df, dv=y, **stats_param
|
1258
|
+
)
|
1259
|
+
else:
|
1260
|
+
res_tmp = FuncMultiCmpt(
|
1261
|
+
data=df[df[x] == i],
|
1262
|
+
dv=y,
|
1263
|
+
factor=hue,
|
1264
|
+
**stats_param,
|
1265
|
+
)
|
1266
|
+
elif bool(stats_param):
|
1127
1267
|
res_tmp = FuncMultiCmpt(
|
1128
|
-
data=df, dv=y,
|
1268
|
+
data=df[df[x] == i], dv=y, factor=hue
|
1129
1269
|
)
|
1130
1270
|
else:
|
1131
|
-
res_tmp =
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
data
|
1271
|
+
res_tmp = "did not work properly"
|
1272
|
+
xloc_curr = hue_len * (ihue - 1)
|
1273
|
+
|
1274
|
+
add_asterisks(
|
1275
|
+
ax,
|
1276
|
+
res_tmp,
|
1277
|
+
xticks[xloc_curr : xloc_curr + hue_len],
|
1278
|
+
legend_hue,
|
1279
|
+
y_loc=np.nanmax(data),
|
1280
|
+
report_go=report,
|
1140
1281
|
)
|
1141
1282
|
else:
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1283
|
+
if isinstance(stats_param, dict):
|
1284
|
+
pmc = stats_param.get("pmc", "pmc")
|
1285
|
+
pair = stats_param.get("pair", "unpaired")
|
1286
|
+
else:
|
1287
|
+
pmc = "pmc"
|
1288
|
+
pair = "unpair"
|
1289
|
+
res_tmp = FuncCmpt(
|
1290
|
+
x1=data_temp.loc[
|
1291
|
+
data_temp[hue] == hue_labels[0], y
|
1292
|
+
].tolist(),
|
1293
|
+
x2=data_temp.loc[
|
1294
|
+
data_temp[hue] == hue_labels[1], y
|
1295
|
+
].tolist(),
|
1296
|
+
pmc=pmc,
|
1297
|
+
pair=pair,
|
1298
|
+
)
|
1299
|
+
xloc_curr = hue_len * (ihue - 1)
|
1300
|
+
add_asterisks(
|
1301
|
+
ax,
|
1302
|
+
res_tmp,
|
1303
|
+
xticks[xloc_curr : xloc_curr + hue_len],
|
1304
|
+
legend_hue,
|
1305
|
+
y_loc=np.nanmax(data),
|
1306
|
+
report_go=report,
|
1307
|
+
)
|
1153
1308
|
ihue += 1
|
1154
1309
|
else: # 240814: still has some bugs
|
1155
1310
|
if isinstance(res, dict):
|
@@ -2130,20 +2285,20 @@ def add_asterisks(ax, res, xticks_x_loc, xticklabels, **kwargs_funcstars):
|
|
2130
2285
|
pval_groups = res["pval"]
|
2131
2286
|
FuncStars(
|
2132
2287
|
ax=ax,
|
2133
|
-
x1=
|
2134
|
-
x2=
|
2135
|
-
pval=pval_groups,
|
2136
|
-
**kwargs_funcstars,
|
2137
|
-
)
|
2138
|
-
else:
|
2139
|
-
pval_groups = res["pval"]
|
2140
|
-
FuncStars(
|
2141
|
-
ax=ax,
|
2142
|
-
x1=1,
|
2143
|
-
x2=2,
|
2288
|
+
x1=xticks_x_loc[0],
|
2289
|
+
x2=xticks_x_loc[1],
|
2144
2290
|
pval=pval_groups,
|
2145
2291
|
**kwargs_funcstars,
|
2146
2292
|
)
|
2293
|
+
# else:
|
2294
|
+
# pval_groups = res["pval"]
|
2295
|
+
# FuncStars(
|
2296
|
+
# ax=ax,
|
2297
|
+
# x1=1,
|
2298
|
+
# x2=2,
|
2299
|
+
# pval=pval_groups,
|
2300
|
+
# **kwargs_funcstars,
|
2301
|
+
# )
|
2147
2302
|
|
2148
2303
|
|
2149
2304
|
def style_examples(
|
py2ls/stats.py
CHANGED
@@ -705,9 +705,7 @@ def extract_apa(res_tab):
|
|
705
705
|
for irow in range(res_tab.shape[0]):
|
706
706
|
note_tmp = f'{res_tab.Source[irow]}:F{round(res_tab.ddof1[irow]),round(res_tab.ddof2[irow])}={round(res_tab.F[irow],3)},p={round(res_tab["p-unc"][irow],3)}'
|
707
707
|
notes_APA.append(note_tmp)
|
708
|
-
elif "DF" in res_tab:
|
709
|
-
print("here")
|
710
|
-
display(res_tab)
|
708
|
+
elif "DF" in res_tab:
|
711
709
|
for irow in range(res_tab.shape[0] - 1):
|
712
710
|
note_tmp = f'{res_tab.Source[irow]}:F{round(res_tab.DF[irow]),round(res_tab.DF[res_tab.shape[0]-1])}={round(res_tab.F[irow],3)},p={round(res_tab["p-unc"][irow],3)}'
|
713
711
|
notes_APA.append(note_tmp)
|
@@ -161,6 +161,9 @@ py2ls/data/styles/example/style7.pdf,sha256=Sz54Qzvt6k6fCkvvZd6S4RSZjVZvxPxIx_uv
|
|
161
161
|
py2ls/data/styles/example/style8.pdf,sha256=8As6rsajoqQEU9hUy4YDHOsXYpD4PJcbWMz-4iV77gI,62296
|
162
162
|
py2ls/data/styles/example/style9.pdf,sha256=uT4_9bZaoBB7aXoobIY8-k_OX7TNxJ_Zwqvr7o9deO0,65828
|
163
163
|
py2ls/data/styles/style1.json,sha256=Q3tdH0Sf08FjNUZE5mELA45JEw3BXjSAL2nLfFDn1bU,3101
|
164
|
+
py2ls/data/styles/style10.json,sha256=NMKlzsvpQcfSAWRRRRPnU9QvP7AfggamYHFeihnicJo,4830
|
165
|
+
py2ls/data/styles/style11.json,sha256=08kqry14T40KriRiS2FQBHkL4v_b7cn8BecQt9JYi50,4830
|
166
|
+
py2ls/data/styles/style12.json,sha256=GwEb2k116q9uvFEgVn9PMFTeUM-GYR2PD6ZzABCOMJo,4311
|
164
167
|
py2ls/data/styles/style2.json,sha256=2xhDv-_qQOKaODy8fWRoaQk_W5-I3EdA6uh4JNnINGg,3124
|
165
168
|
py2ls/data/styles/style3.json,sha256=0lHmjFGqlf1c7HLllsgGVNFkuEsqSCicBv-iOTB9hRk,3126
|
166
169
|
py2ls/data/styles/style4.json,sha256=G8thPHwmJyS3kDletrh3NkapZ03bNfey2-zpG4erBfk,3072
|
@@ -173,14 +176,15 @@ py2ls/db2ls.py,sha256=MMfFX47aIPIyu7fU9aPvX9lbPRPYOpJ_VXwlnWk-8qo,13615
|
|
173
176
|
py2ls/doc.py,sha256=xN3g1OWfoaGUhikbJ0NqbN5eKy1VZVvWwRlhHMgyVEc,4243
|
174
177
|
py2ls/export_requirements.py,sha256=x2WgUF0jYKz9GfA1MVKN-MdsM-oQ8yUeC6Ua8oCymio,2325
|
175
178
|
py2ls/freqanalysis.py,sha256=F4218VSPbgL5tnngh6xNCYuNnfR-F_QjECUUxrPYZss,32594
|
176
|
-
py2ls/
|
179
|
+
py2ls/ich2ls.py,sha256=LYoMjU8fRJrtu_ZAnIAQkZVs2Vdoy7RvyUGA9Fq_Pt4,5995
|
180
|
+
py2ls/ips.py,sha256=HbktFzKIszBHtB3DtyUCCM6xj9NJZAz38ZCcIomjBFs,105439
|
177
181
|
py2ls/netfinder.py,sha256=oo8Nyqe9Oi3TON7YS9TCs2RBUjPY3KY7772DrsNPkyU,50679
|
178
|
-
py2ls/plot.py,sha256=
|
182
|
+
py2ls/plot.py,sha256=pMopJJSapyUwAFaoizwJMGSawGFVQFcAPDOh1vFM7N4,94253
|
179
183
|
py2ls/setuptools-70.1.0-py3-none-any.whl,sha256=2bi3cUVal8ip86s0SOvgspteEF8SKLukECi-EWmFomc,882588
|
180
184
|
py2ls/sleep_events_detectors.py,sha256=bQA3HJqv5qnYKJJEIhCyhlDtkXQfIzqksnD0YRXso68,52145
|
181
|
-
py2ls/stats.py,sha256=
|
185
|
+
py2ls/stats.py,sha256=fJmXQ9Lq460StOn-kfEljE97cySq7876HUPTnpB5hLs,38123
|
182
186
|
py2ls/translator.py,sha256=bc5FB-wqC4TtQz9gyCP1mE38HqNRJ_pmuRIgKnAlMzM,30581
|
183
187
|
py2ls/wb_detector.py,sha256=7y6TmBUj9exCZeIgBAJ_9hwuhkDh1x_-yg4dvNY1_GQ,6284
|
184
|
-
py2ls-0.1.9.
|
185
|
-
py2ls-0.1.9.
|
186
|
-
py2ls-0.1.9.
|
188
|
+
py2ls-0.1.9.9.dist-info/METADATA,sha256=tRTwCfUkzWCGXAIkgA3xlBL4jUN7V6GI-4P4IcSg4Fc,20017
|
189
|
+
py2ls-0.1.9.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
190
|
+
py2ls-0.1.9.9.dist-info/RECORD,,
|
File without changes
|