majoplot 0.1.10__py3-none-any.whl → 0.1.12__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.
- majoplot/domain/importers/PPMS_Resistivity.py +94 -3
- majoplot/domain/scenarios/PPMS_Resistivity/RT.py +11 -7
- majoplot/domain/scenarios/PPMS_Resistivity/RT_Resistivity.py +136 -0
- majoplot/domain/scenarios/PPMS_Resistivity/RT_normalized.py +142 -0
- majoplot/domain/scenarios/VSM/{MT_origin.py → MT_original.py} +1 -1
- {majoplot-0.1.10.dist-info → majoplot-0.1.12.dist-info}/METADATA +1 -1
- {majoplot-0.1.10.dist-info → majoplot-0.1.12.dist-info}/RECORD +10 -8
- {majoplot-0.1.10.dist-info → majoplot-0.1.12.dist-info}/WHEEL +0 -0
- {majoplot-0.1.10.dist-info → majoplot-0.1.12.dist-info}/entry_points.txt +0 -0
- {majoplot-0.1.10.dist-info → majoplot-0.1.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,10 +6,16 @@ from ..utils import skip_lines_then_readline
|
|
|
6
6
|
|
|
7
7
|
ROW_FILEOPENTIME = 3
|
|
8
8
|
ROW_SAMPLE1_NAME = 6
|
|
9
|
+
ROW_SAMPLE1_CROSS_SECTION = 7
|
|
10
|
+
ROW_SAMPLE1_LENGTH = 8
|
|
9
11
|
ROW_SAMPLE1_UNITS = 9
|
|
10
12
|
ROW_SAMPLE2_NAME = 10
|
|
13
|
+
ROW_SAMPLE2_CROSS_SECTION = 11
|
|
14
|
+
ROW_SAMPLE2_LENGTH = 12
|
|
11
15
|
ROW_SAMPLE2_UNITS = 13
|
|
12
16
|
ROW_SAMPLE3_NAME = 14
|
|
17
|
+
ROW_SAMPLE3_CROSS_SECTION = 15
|
|
18
|
+
ROW_SAMPLE3_LENGTH = 16
|
|
13
19
|
ROW_SAMPLE3_UNITS = 17
|
|
14
20
|
ROW_HEADERS = 32
|
|
15
21
|
|
|
@@ -52,8 +58,36 @@ class PPMS_Resistivity:
|
|
|
52
58
|
return fail_signal
|
|
53
59
|
labels["sample1_name"] = LabelValue(s1_name)
|
|
54
60
|
|
|
61
|
+
# S1 Cross Section
|
|
62
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE1_CROSS_SECTION - ROW_SAMPLE1_NAME -1)
|
|
63
|
+
info = line.split(",")
|
|
64
|
+
try:
|
|
65
|
+
if info[-1].strip() != "Sample1 Cross Section":
|
|
66
|
+
return fail_signal
|
|
67
|
+
s1_cross_section = info[1]
|
|
68
|
+
except IndexError:
|
|
69
|
+
return fail_signal
|
|
70
|
+
try:
|
|
71
|
+
labels["sample1_cross_section"] = LabelValue(float(s1_cross_section),unit="mm²")
|
|
72
|
+
except ValueError:
|
|
73
|
+
return fail_signal
|
|
74
|
+
|
|
75
|
+
# S1 Length
|
|
76
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE1_LENGTH - ROW_SAMPLE1_CROSS_SECTION -1)
|
|
77
|
+
info = line.split(",")
|
|
78
|
+
try:
|
|
79
|
+
if info[-1].strip() != "Sample1 Length":
|
|
80
|
+
return fail_signal
|
|
81
|
+
s1_length = info[1]
|
|
82
|
+
except IndexError:
|
|
83
|
+
return fail_signal
|
|
84
|
+
try:
|
|
85
|
+
labels["sample1_length"] = LabelValue(float(s1_length),unit="mm")
|
|
86
|
+
except ValueError:
|
|
87
|
+
return fail_signal
|
|
88
|
+
|
|
55
89
|
# S1 Units
|
|
56
|
-
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE1_UNITS -
|
|
90
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE1_UNITS - ROW_SAMPLE1_LENGTH -1)
|
|
57
91
|
info = line.split(",")
|
|
58
92
|
try:
|
|
59
93
|
if info[-1].strip() != "Sample1 Units":
|
|
@@ -74,8 +108,37 @@ class PPMS_Resistivity:
|
|
|
74
108
|
return fail_signal
|
|
75
109
|
labels["sample2_name"] = LabelValue(s2_name)
|
|
76
110
|
|
|
111
|
+
# S2 Cross Section
|
|
112
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE2_CROSS_SECTION - ROW_SAMPLE2_NAME -1)
|
|
113
|
+
info = line.split(",")
|
|
114
|
+
try:
|
|
115
|
+
if info[-1].strip() != "Sample2 Cross Section":
|
|
116
|
+
return fail_signal
|
|
117
|
+
s2_cross_section = info[1]
|
|
118
|
+
except IndexError:
|
|
119
|
+
return fail_signal
|
|
120
|
+
try:
|
|
121
|
+
labels["sample2_cross_section"] = LabelValue(float(s2_cross_section),unit="mm²")
|
|
122
|
+
except ValueError:
|
|
123
|
+
return fail_signal
|
|
124
|
+
|
|
125
|
+
# S1 Length
|
|
126
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE2_LENGTH - ROW_SAMPLE2_CROSS_SECTION -1)
|
|
127
|
+
info = line.split(",")
|
|
128
|
+
try:
|
|
129
|
+
if info[-1].strip() != "Sample2 Length":
|
|
130
|
+
return fail_signal
|
|
131
|
+
s2_length = info[1]
|
|
132
|
+
except IndexError:
|
|
133
|
+
return fail_signal
|
|
134
|
+
try:
|
|
135
|
+
labels["sample2_length"] = LabelValue(float(s2_length),unit="mm")
|
|
136
|
+
except ValueError:
|
|
137
|
+
return fail_signal
|
|
138
|
+
|
|
139
|
+
|
|
77
140
|
# S2 Units
|
|
78
|
-
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE2_UNITS -
|
|
141
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE2_UNITS - ROW_SAMPLE2_LENGTH -1)
|
|
79
142
|
info = line.split(",")
|
|
80
143
|
try:
|
|
81
144
|
if info[-1].strip() != "Sample2 Units":
|
|
@@ -96,8 +159,36 @@ class PPMS_Resistivity:
|
|
|
96
159
|
return fail_signal
|
|
97
160
|
labels["sample3_name"] = LabelValue(s3_name)
|
|
98
161
|
|
|
162
|
+
# S3 Cross Section
|
|
163
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE3_CROSS_SECTION - ROW_SAMPLE3_NAME -1)
|
|
164
|
+
info = line.split(",")
|
|
165
|
+
try:
|
|
166
|
+
if info[-1].strip() != "Sample3 Cross Section":
|
|
167
|
+
return fail_signal
|
|
168
|
+
s3_cross_section = info[1]
|
|
169
|
+
except IndexError:
|
|
170
|
+
return fail_signal
|
|
171
|
+
try:
|
|
172
|
+
labels["sample3_cross_section"] = LabelValue(float(s3_cross_section),unit="mm²")
|
|
173
|
+
except ValueError:
|
|
174
|
+
return fail_signal
|
|
175
|
+
|
|
176
|
+
# S1 Length
|
|
177
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE3_LENGTH - ROW_SAMPLE3_CROSS_SECTION -1)
|
|
178
|
+
info = line.split(",")
|
|
179
|
+
try:
|
|
180
|
+
if info[-1].strip() != "Sample3 Length":
|
|
181
|
+
return fail_signal
|
|
182
|
+
s3_length = info[1]
|
|
183
|
+
except IndexError:
|
|
184
|
+
return fail_signal
|
|
185
|
+
try:
|
|
186
|
+
labels["sample3_length"] = LabelValue(float(s3_length),unit="mm")
|
|
187
|
+
except ValueError:
|
|
188
|
+
return fail_signal
|
|
189
|
+
|
|
99
190
|
# S3 Units
|
|
100
|
-
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE3_UNITS -
|
|
191
|
+
line = skip_lines_then_readline(raw_data_file, ROW_SAMPLE3_UNITS - ROW_SAMPLE3_LENGTH -1)
|
|
101
192
|
info = line.split(",")
|
|
102
193
|
try:
|
|
103
194
|
if info[-1].strip() != "Sample3 Units":
|
|
@@ -57,8 +57,8 @@ class RT:
|
|
|
57
57
|
# clear null R points
|
|
58
58
|
s_points = np.array([point for point in s_points if point[1]])
|
|
59
59
|
# record
|
|
60
|
-
Imin = np.min(s_points[:,
|
|
61
|
-
Imax = np.max(s_points[:,
|
|
60
|
+
Imin = np.min(s_points[:,2])
|
|
61
|
+
Imax = np.max(s_points[:,2])
|
|
62
62
|
if (Imax - Imin) / Imax < 0.03:
|
|
63
63
|
Irange = f"{np.mean(s_points[:,1]):.1e}"
|
|
64
64
|
else:
|
|
@@ -92,6 +92,8 @@ class RT:
|
|
|
92
92
|
major_grid=None,
|
|
93
93
|
major_tick=TickSpec(),
|
|
94
94
|
legend=LegendSpec(fontsize=5),
|
|
95
|
+
linewidth=1,
|
|
96
|
+
marker_size=2,
|
|
95
97
|
)
|
|
96
98
|
|
|
97
99
|
|
|
@@ -104,13 +106,15 @@ class RT:
|
|
|
104
106
|
title=None,
|
|
105
107
|
figsize=FIGSIZE,
|
|
106
108
|
linestyle_cycle= ("-",),
|
|
109
|
+
|
|
107
110
|
linecolor_cycle = (
|
|
108
|
-
"#
|
|
109
|
-
"#
|
|
110
|
-
"#
|
|
111
|
-
"#fdbb2d", "#fcfdbf",
|
|
111
|
+
"#515151", "#F14040", "#1A6FDF", "#37AD6B", "#B177DE",
|
|
112
|
+
"#CC9900", "#00CBCC", "#7D4E4E", "#8E8E00", "#FB6501",
|
|
113
|
+
"#6699CC", "#6FB802", "#f04f76", "#f86a5a", "#fb8c3c",
|
|
114
|
+
"#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#005F5F",
|
|
115
|
+
"#1F3D2B", "#E8C6E8","#FAB3d1",
|
|
112
116
|
),
|
|
113
|
-
linemarker_cycle = ("o",
|
|
117
|
+
linemarker_cycle = ("o",),
|
|
114
118
|
alpa_cycle = (1.0,),
|
|
115
119
|
)
|
|
116
120
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from ...base import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
FIGSIZE = (8, 6)
|
|
7
|
+
|
|
8
|
+
T = "Temperature (K)"
|
|
9
|
+
H = "Magnetic Field (Oe)"
|
|
10
|
+
R = "Resistivity (Ω·m)"
|
|
11
|
+
RI ={
|
|
12
|
+
1: {"R":"Bridge 1 Resistance (Ohms)", "I":"Bridge 1 Excitation (uA)"},
|
|
13
|
+
2: {"R":"Bridge 2 Resistance (Ohms)", "I":"Bridge 2 Excitation (uA)"},
|
|
14
|
+
3: {"R":"Bridge 3 Resistance (Ohms)", "I":"Bridge 3 Excitation (uA)"},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ResistivityI ={
|
|
18
|
+
1: {"R":"Bridge 1 Resistivity (Ω·m)", "I":"Bridge 1 Excitation (uA)"},
|
|
19
|
+
2: {"R":"Bridge 2 Resistivity (Ω·m)", "I":"Bridge 2 Excitation (uA)"},
|
|
20
|
+
3: {"R":"Bridge 3 Resistivity (Ω·m)", "I":"Bridge 3 Excitation (uA)"},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class RT_Resistivity:
|
|
24
|
+
data_summary_label_names = ["H"]
|
|
25
|
+
axes_label_names = ("date", "raw_data", "bridge", "sample_name")
|
|
26
|
+
figure_label_names = ("date", "raw_data", "bridge", "sample_name")
|
|
27
|
+
figure_summary_label_names = ("raw_data","bridge","sample_name")
|
|
28
|
+
max_axes_in_one_figure = 1
|
|
29
|
+
project_to_child_folder_label_names = {"date":"sample_name"}
|
|
30
|
+
parent_folder_name = "RT"
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def preprocess(cls, raw_datas:list[Data])->list[Data]:
|
|
34
|
+
datas = []
|
|
35
|
+
for raw_data in raw_datas:
|
|
36
|
+
raw_labels = raw_data.labels
|
|
37
|
+
headers = raw_data.headers
|
|
38
|
+
raw_points = raw_data.points
|
|
39
|
+
|
|
40
|
+
# Split by H
|
|
41
|
+
split_datas = []
|
|
42
|
+
|
|
43
|
+
last_H_stage = round(raw_points[0][headers[H]])
|
|
44
|
+
current_points = [ last_H_stage, [ raw_points[0] ] ]
|
|
45
|
+
|
|
46
|
+
for point in raw_points[1:]:
|
|
47
|
+
cur_H_stage = round(point[headers[H]])
|
|
48
|
+
if cur_H_stage != last_H_stage:
|
|
49
|
+
split_datas.append(current_points)
|
|
50
|
+
last_H_stage = cur_H_stage
|
|
51
|
+
current_points = [ last_H_stage, [ point ] ]
|
|
52
|
+
else:
|
|
53
|
+
current_points[1].append(point)
|
|
54
|
+
else:
|
|
55
|
+
split_datas.append(current_points)
|
|
56
|
+
|
|
57
|
+
# 3 bridges
|
|
58
|
+
for H_stage, points in split_datas:
|
|
59
|
+
for i in range(1,4):
|
|
60
|
+
_headerTRI = (T,RI[i]["R"],RI[i]["I"])
|
|
61
|
+
_headers = (T,ResistivityI[i]["R"])
|
|
62
|
+
s_points = [ [point[headers[x]] for x in _headerTRI] for point in points]
|
|
63
|
+
# clear null Resistance points
|
|
64
|
+
s_points = np.array([point for point in s_points if point[1]])
|
|
65
|
+
# calculate resistivity
|
|
66
|
+
cross_section = raw_labels[f"sample{i}_cross_section"].value * 1e-6
|
|
67
|
+
if cross_section <= 0:
|
|
68
|
+
cross_section = np.nan
|
|
69
|
+
length = raw_labels[f"sample{i}_length"].value * 1e-3
|
|
70
|
+
if length <= 0:
|
|
71
|
+
length = np.nan
|
|
72
|
+
r_points = np.column_stack([s_points[:,0], s_points[:,1] * cross_section / length])
|
|
73
|
+
# record
|
|
74
|
+
Imin = np.min(s_points[:,2])
|
|
75
|
+
Imax = np.max(s_points[:,2])
|
|
76
|
+
if (Imax - Imin) / Imax < 0.03:
|
|
77
|
+
Irange = f"{np.mean(s_points[:,1]):.1e}"
|
|
78
|
+
else:
|
|
79
|
+
Irange = f"{Imin:.1e}~{Imax:.1e}"
|
|
80
|
+
labels = LabelDict()
|
|
81
|
+
labels["instrument"] = raw_labels["instrument"]
|
|
82
|
+
labels["raw_data"] = raw_labels["raw_data"]
|
|
83
|
+
labels["date"] = raw_labels["date"]
|
|
84
|
+
labels["bridge"] = LabelValue(i,unit="Bridge",unit_as_postfix=False)
|
|
85
|
+
labels["sample_name"] = raw_labels[f"sample{i}_name"]
|
|
86
|
+
labels["sample_units"] = raw_labels[f"sample{i}_units"]
|
|
87
|
+
labels["H"] = LabelValue(H_stage, unit="Oe")
|
|
88
|
+
labels["I_range"] = LabelValue(Irange,unit="μA")
|
|
89
|
+
labels.summary_names = cls.data_summary_label_names
|
|
90
|
+
datas.append(Data(
|
|
91
|
+
labels=labels,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
points=r_points,
|
|
94
|
+
ignore_outliers=IgnoreOutlierSpec(min_gap_base=1e-8,min_gap_multiple=10),
|
|
95
|
+
))
|
|
96
|
+
|
|
97
|
+
return datas
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def make_axes_spec(cls, axes_labels, data_pool)->AxesSpec:
|
|
103
|
+
return AxesSpec(
|
|
104
|
+
x_axis_title=T,
|
|
105
|
+
y_axis_title=R,
|
|
106
|
+
major_grid=None,
|
|
107
|
+
major_tick=TickSpec(),
|
|
108
|
+
legend=LegendSpec(fontsize=5),
|
|
109
|
+
linewidth=1,
|
|
110
|
+
marker_size=2,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@classmethod
|
|
115
|
+
def make_figure_spec(cls,figure_labels, axes_pool:Iterable[Axes])->FigureSpec:
|
|
116
|
+
figure_name = figure_labels.brief_summary
|
|
117
|
+
|
|
118
|
+
return FigureSpec(
|
|
119
|
+
name=figure_name,
|
|
120
|
+
title=None,
|
|
121
|
+
figsize=FIGSIZE,
|
|
122
|
+
linestyle_cycle= ("-",),
|
|
123
|
+
linecolor_cycle = (
|
|
124
|
+
"#515151", "#F14040", "#1A6FDF", "#37AD6B", "#B177DE",
|
|
125
|
+
"#CC9900", "#00CBCC", "#7D4E4E", "#8E8E00", "#FB6501",
|
|
126
|
+
"#6699CC", "#6FB802", "#f04f76", "#f86a5a", "#fb8c3c",
|
|
127
|
+
"#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#005F5F",
|
|
128
|
+
"#1F3D2B", "#E8C6E8","#FAB3d1",
|
|
129
|
+
),
|
|
130
|
+
linemarker_cycle = ("o","s","^","v","d","*","x","+"),
|
|
131
|
+
alpa_cycle = (1.0,),
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
@classmethod
|
|
135
|
+
def make_muti_axes_spec(cls, axes_pool:list[Axes])->MutiAxesSpec|FAIL|None:
|
|
136
|
+
return None
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from ...base import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
FIGSIZE = (8, 6)
|
|
7
|
+
|
|
8
|
+
T = "Temperature (K)"
|
|
9
|
+
H = "Magnetic Field (Oe)"
|
|
10
|
+
R = "Resistance (Ohms)"
|
|
11
|
+
RI ={
|
|
12
|
+
1: {"R":"Bridge 1 Resistance (Ohms)", "I":"Bridge 1 Excitation (uA)"},
|
|
13
|
+
2: {"R":"Bridge 2 Resistance (Ohms)", "I":"Bridge 2 Excitation (uA)"},
|
|
14
|
+
3: {"R":"Bridge 3 Resistance (Ohms)", "I":"Bridge 3 Excitation (uA)"},
|
|
15
|
+
}
|
|
16
|
+
RI_normalized ={
|
|
17
|
+
1: {"R":"Bridge 1 Normalized Resistance", "I":"Bridge 1 Excitation (uA)"},
|
|
18
|
+
2: {"R":"Bridge 2 Normalied Resistance", "I":"Bridge 2 Excitation (uA)"},
|
|
19
|
+
3: {"R":"Bridge 3 Normalized Resistance", "I":"Bridge 3 Excitation (uA)"},
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class RT_normalized:
|
|
23
|
+
data_summary_label_names = ["H"]
|
|
24
|
+
axes_label_names = ("date", "raw_data", "bridge", "sample_name")
|
|
25
|
+
figure_label_names = ("date", "raw_data", "bridge", "sample_name")
|
|
26
|
+
figure_summary_label_names = ("raw_data","bridge","sample_name")
|
|
27
|
+
max_axes_in_one_figure = 1
|
|
28
|
+
project_to_child_folder_label_names = {"date":"sample_name"}
|
|
29
|
+
parent_folder_name = "RT"
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def preprocess(cls, raw_datas:list[Data])->list[Data]:
|
|
33
|
+
datas = []
|
|
34
|
+
for raw_data in raw_datas:
|
|
35
|
+
raw_labels = raw_data.labels
|
|
36
|
+
headers = raw_data.headers
|
|
37
|
+
raw_points = raw_data.points
|
|
38
|
+
|
|
39
|
+
# Split by H
|
|
40
|
+
split_datas = []
|
|
41
|
+
|
|
42
|
+
last_H_stage = round(raw_points[0][headers[H]])
|
|
43
|
+
current_points = [ last_H_stage, [ raw_points[0] ] ]
|
|
44
|
+
|
|
45
|
+
for point in raw_points[1:]:
|
|
46
|
+
cur_H_stage = round(point[headers[H]])
|
|
47
|
+
if cur_H_stage != last_H_stage:
|
|
48
|
+
split_datas.append(current_points)
|
|
49
|
+
last_H_stage = cur_H_stage
|
|
50
|
+
current_points = [ last_H_stage, [ point ] ]
|
|
51
|
+
else:
|
|
52
|
+
current_points[1].append(point)
|
|
53
|
+
else:
|
|
54
|
+
split_datas.append(current_points)
|
|
55
|
+
|
|
56
|
+
# 3 bridges
|
|
57
|
+
for H_stage, points in split_datas:
|
|
58
|
+
for i in range(1,4):
|
|
59
|
+
_headerTRI = (T,RI[i]["R"],RI[i]["I"])
|
|
60
|
+
_headers = (T,RI_normalized[i]["R"])
|
|
61
|
+
s_points = [ [point[headers[x]] for x in _headerTRI] for point in points]
|
|
62
|
+
# clear null R points
|
|
63
|
+
s_points = np.array([point for point in s_points if point[1]])
|
|
64
|
+
# record
|
|
65
|
+
Imin = np.min(s_points[:,2])
|
|
66
|
+
Imax = np.max(s_points[:,2])
|
|
67
|
+
if (Imax - Imin) / Imax < 0.03:
|
|
68
|
+
Irange = f"{np.mean(s_points[:,1]):.1e}"
|
|
69
|
+
else:
|
|
70
|
+
Irange = f"{Imin:.1e}~{Imax:.1e}"
|
|
71
|
+
|
|
72
|
+
labels = LabelDict()
|
|
73
|
+
labels["instrument"] = raw_labels["instrument"]
|
|
74
|
+
labels["raw_data"] = raw_labels["raw_data"]
|
|
75
|
+
labels["date"] = raw_labels["date"]
|
|
76
|
+
labels["bridge"] = LabelValue(i,unit="Bridge",unit_as_postfix=False)
|
|
77
|
+
labels["sample_name"] = raw_labels[f"sample{i}_name"]
|
|
78
|
+
labels["sample_units"] = raw_labels[f"sample{i}_units"]
|
|
79
|
+
labels["H"] = LabelValue(H_stage, unit="Oe")
|
|
80
|
+
labels["I_range"] = LabelValue(Irange,unit="μA")
|
|
81
|
+
labels.summary_names = cls.data_summary_label_names
|
|
82
|
+
datas.append(Data(
|
|
83
|
+
labels=labels,
|
|
84
|
+
_headers=_headers,
|
|
85
|
+
points=s_points[:,0:2],
|
|
86
|
+
ignore_outliers=IgnoreOutlierSpec(min_gap_base=1e-4,min_gap_multiple=5),
|
|
87
|
+
))
|
|
88
|
+
|
|
89
|
+
# normalize
|
|
90
|
+
for data in datas:
|
|
91
|
+
data: Data
|
|
92
|
+
ymax = np.max(np.abs(data.ylim))
|
|
93
|
+
data.points = np.column_stack( [data.points[:,0], np.asarray(data.points[:,1] / ymax)])
|
|
94
|
+
data.ignore_outliers = None
|
|
95
|
+
data._ignore_outliers_spec_cache = None
|
|
96
|
+
data._points_for_plot = None
|
|
97
|
+
data._x_for_plot = None
|
|
98
|
+
data._y_for_plot = None
|
|
99
|
+
data._xlim = None
|
|
100
|
+
data._ylim = None
|
|
101
|
+
|
|
102
|
+
return datas
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def make_axes_spec(cls, axes_labels, data_pool)->AxesSpec:
|
|
108
|
+
return AxesSpec(
|
|
109
|
+
x_axis_title=T,
|
|
110
|
+
y_axis_title=R,
|
|
111
|
+
major_grid=None,
|
|
112
|
+
major_tick=TickSpec(),
|
|
113
|
+
legend=LegendSpec(fontsize=5),
|
|
114
|
+
linewidth=1,
|
|
115
|
+
marker_size=2,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@classmethod
|
|
120
|
+
def make_figure_spec(cls,figure_labels, axes_pool:Iterable[Axes])->FigureSpec:
|
|
121
|
+
figure_name = figure_labels.brief_summary
|
|
122
|
+
|
|
123
|
+
return FigureSpec(
|
|
124
|
+
name=figure_name,
|
|
125
|
+
title=None,
|
|
126
|
+
figsize=FIGSIZE,
|
|
127
|
+
linestyle_cycle= ("-",),
|
|
128
|
+
|
|
129
|
+
linecolor_cycle = (
|
|
130
|
+
"#515151", "#F14040", "#1A6FDF", "#37AD6B", "#B177DE",
|
|
131
|
+
"#CC9900", "#00CBCC", "#7D4E4E", "#8E8E00", "#FB6501",
|
|
132
|
+
"#6699CC", "#6FB802", "#f04f76", "#f86a5a", "#fb8c3c",
|
|
133
|
+
"#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#005F5F",
|
|
134
|
+
"#1F3D2B", "#E8C6E8","#FAB3d1",
|
|
135
|
+
),
|
|
136
|
+
linemarker_cycle = ("o",),
|
|
137
|
+
alpa_cycle = (1.0,),
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
@classmethod
|
|
141
|
+
def make_muti_axes_spec(cls, axes_pool:list[Axes])->MutiAxesSpec|FAIL|None:
|
|
142
|
+
return None
|
|
@@ -11,7 +11,7 @@ M = "DC Moment Free Ctr (emu)"
|
|
|
11
11
|
H = "Magnetic Field (Oe)"
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class MT_original:
|
|
15
15
|
data_summary_label_names = ["mass","H","cooling_type"]
|
|
16
16
|
axes_label_names = ("material","date","raw_data", "H")
|
|
17
17
|
figure_label_names = ("material","date", "raw_data","H")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: majoplot
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.12
|
|
4
4
|
Summary: Automates scenario-specific data preprocessing and plotting workflows for condensed-matter physics labs (OriginLab COM backend + Matplotlib for preview).
|
|
5
5
|
Project-URL: Homepage, https://github.com/ponyofshadows/majoplot
|
|
6
6
|
Project-URL: Source, https://github.com/ponyofshadows/majoplot
|
|
@@ -7,15 +7,17 @@ majoplot/app/gui.py,sha256=CpRg6LRI3dM2ALswnwz89KSKjONHRlfs69eO8P2VWYE,142
|
|
|
7
7
|
majoplot/domain/base.py,sha256=JlkzZHSnXkh_C_l-ZxHrV7TbFcCEShD0mFnlu3lMUlc,14391
|
|
8
8
|
majoplot/domain/muti_axes_spec.py,sha256=pF4Yy2x12QSFny5x18gave-f-ZYuJMW-czwwsJ-6Ths,6313
|
|
9
9
|
majoplot/domain/utils.py,sha256=X4Wdab6kSBA3eBVuRzpz62Wj-1WTWZp4e9TcYMkGeb8,3332
|
|
10
|
-
majoplot/domain/importers/PPMS_Resistivity.py,sha256
|
|
10
|
+
majoplot/domain/importers/PPMS_Resistivity.py,sha256=ME58Thg_N4tFQYPfnP1ZkiOP_vzYAevF-qSuxqWoAoc,7867
|
|
11
11
|
majoplot/domain/importers/VSM.py,sha256=sEZsz_3n67jtPLy1-grP9A8K1RPVnwuQLMUSrLOtZUk,3576
|
|
12
12
|
majoplot/domain/importers/XRD.py,sha256=_CN3jKLn4vZ3Oa2cm3IcH05R_mrao2so3VTVKVEND98,2840
|
|
13
|
-
majoplot/domain/scenarios/PPMS_Resistivity/RT.py,sha256=
|
|
13
|
+
majoplot/domain/scenarios/PPMS_Resistivity/RT.py,sha256=DzIOqy8BlsHWKMLc6a-LF-4lwF3p51Vs3rZcTXRW2UA,4684
|
|
14
|
+
majoplot/domain/scenarios/PPMS_Resistivity/RT_Resistivity.py,sha256=Pq5ANx0_lk6m5trJwxK8lywMzHubrfXEcLysMfhii6U,5462
|
|
15
|
+
majoplot/domain/scenarios/PPMS_Resistivity/RT_normalized.py,sha256=UnJqY3KCPDl66rLWxQ914pmW4s4_Qmv82HQgupO8zxg,5458
|
|
14
16
|
majoplot/domain/scenarios/VSM/ChiT.py,sha256=NcPxf1-OIFrRNBo1uDaU0LzpaKXU_EUDDo9_78Pk2Vs,6643
|
|
15
17
|
majoplot/domain/scenarios/VSM/ChiT_onlyZFC.py,sha256=IFhw6kCha0OxDZ5AgWeCb9UwSFJ1JOrjxQ3N2lH4Kis,6568
|
|
16
18
|
majoplot/domain/scenarios/VSM/MT.py,sha256=lnqEi6sw6pzIOaGoqkC5OWJQzROWXL32-YvtOH__Rvg,4550
|
|
17
19
|
majoplot/domain/scenarios/VSM/MT_insert.py,sha256=goaB0Y3dUaerBv3Z4DX8S2ixerGBIz4D1e5k6jpAnJc,4711
|
|
18
|
-
majoplot/domain/scenarios/VSM/
|
|
20
|
+
majoplot/domain/scenarios/VSM/MT_original.py,sha256=JiGXVyfM7plmp5TSRm7gyTnXJxeO33o0zYsbwID3A8A,4315
|
|
19
21
|
majoplot/domain/scenarios/VSM/MT_reliability_analysis.py,sha256=eACa4Z5Q5Uew_m_kGSmsQ4jLy5CIpTrASx7VV-a7nBY,5109
|
|
20
22
|
majoplot/domain/scenarios/XRD/Compare.py,sha256=YvyrnYyFzzlp5DK6Unv75AFuf5fbRgbCumy3_zy6XNQ,3870
|
|
21
23
|
majoplot/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -23,8 +25,8 @@ majoplot/gui/main.py,sha256=v5pyi-Gb26o_lmVM4GaM_Tt_-1rTTKVRekgOcBochA0,20291
|
|
|
23
25
|
majoplot/infra/plotters/matplot.py,sha256=DE3nCfFjL9FxNbuEgggJyXlolkP1nWKmNwJElt1bgHw,12281
|
|
24
26
|
majoplot/infra/plotters/origin.py,sha256=xB80d216pmo_mXo5Lx8sGQrjQC6N0NljzzoMNG37w1g,39034
|
|
25
27
|
majoplot/infra/plotters/origin_utils/originlab_type_library.py,sha256=zxOxF7nB57zwnXSaFSoCUV64ZTHhDBDRv57exatiBoU,37398
|
|
26
|
-
majoplot-0.1.
|
|
27
|
-
majoplot-0.1.
|
|
28
|
-
majoplot-0.1.
|
|
29
|
-
majoplot-0.1.
|
|
30
|
-
majoplot-0.1.
|
|
28
|
+
majoplot-0.1.12.dist-info/METADATA,sha256=YThy-qfUqKVRb5MyaVBgVNo-ySaCV4u1mkdkACo6Gmc,2878
|
|
29
|
+
majoplot-0.1.12.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
30
|
+
majoplot-0.1.12.dist-info/entry_points.txt,sha256=zEiPXZtNyJQMvVS-Zl9psx8SpTafOcs8F9S8xGtOaBM,52
|
|
31
|
+
majoplot-0.1.12.dist-info/licenses/LICENSE,sha256=fj2NqLupbHWfA5W-8tqCpT5yjO8A4F1HcKnt_maww20,1070
|
|
32
|
+
majoplot-0.1.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|