majoplot 0.1.7__tar.gz → 0.1.9__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.
- {majoplot-0.1.7 → majoplot-0.1.9}/PKG-INFO +1 -1
- {majoplot-0.1.7 → majoplot-0.1.9}/pyproject.toml +1 -1
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/importers/PPMS_Resistivity.py +3 -3
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/PPMS_Resistivity/RT.py +5 -5
- majoplot-0.1.7/src/majoplot/domain/scenarios/VSM/ChiT_ZFC.py → majoplot-0.1.9/src/majoplot/domain/scenarios/VSM/ChiT_onlyZFC.py +1 -1
- majoplot-0.1.9/src/majoplot/domain/scenarios/VSM/MT_origin.py +125 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/uv.lock +1 -1
- {majoplot-0.1.7 → majoplot-0.1.9}/.gitignore +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/LICENSE +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/README.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/README.zh-CN.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/TODO.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/doc.zh-CN/Label.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/doc.zh-CN/interactive_steps.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/doc.zh-CN/main_design.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/doc.zh-CN/note_of_labtalk.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/__init__.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/__main__.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/app/__init__.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/app/cli.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/app/gui.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/config.json +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/base.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/importers/VSM.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/importers/XRD.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/muti_axes_spec.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/VSM/ChiT.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/VSM/MT.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/VSM/MT_insert.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/VSM/MT_reliability_analysis.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/XRD/Compare.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/utils.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/gui/__init__.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/gui/main.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/infra/plotters/matplot.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/infra/plotters/origin.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/infra/plotters/origin_utils/originlab_type_library.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/tests/README.md +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/tests/conftest.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/tests/domain/test_data_ignore_outliers.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/tests/domain/test_insert_axes_spec.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/tests/domain/test_labeldict_group.py +0 -0
- {majoplot-0.1.7 → majoplot-0.1.9}/tests/domain/test_labelvalue.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: majoplot
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "majoplot"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.9"
|
|
4
4
|
description = "Automates scenario-specific data preprocessing and plotting workflows for condensed-matter physics labs (OriginLab COM backend + Matplotlib for preview)."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -15,9 +15,9 @@ ROW_HEADERS = 32
|
|
|
15
15
|
|
|
16
16
|
T = "Temperature (K)"
|
|
17
17
|
H = "Magnetic Field (Oe)"
|
|
18
|
-
R1, I1 = "Bridge 1
|
|
19
|
-
R2, I2 = "Bridge 2
|
|
20
|
-
R3, I3 = "Bridge 3
|
|
18
|
+
R1, I1 = "Bridge 1 Resistance (Ohms)", "Bridge 1 Excitation (uA)"
|
|
19
|
+
R2, I2 = "Bridge 2 Resistance (Ohms)", "Bridge 2 Excitation (uA)"
|
|
20
|
+
R3, I3 = "Bridge 3 Resistance (Ohms)", "Bridge 3 Excitation (uA)"
|
|
21
21
|
|
|
22
22
|
class PPMS_Resistivity:
|
|
23
23
|
instrument = "PPMS"
|
|
@@ -7,11 +7,11 @@ FIGSIZE = (8, 6)
|
|
|
7
7
|
|
|
8
8
|
T = "Temperature (K)"
|
|
9
9
|
H = "Magnetic Field (Oe)"
|
|
10
|
-
R = "
|
|
10
|
+
R = "Resistance (Ohms)"
|
|
11
11
|
RI ={
|
|
12
|
-
1: {"R":"Bridge 1
|
|
13
|
-
2: {"R":"Bridge 2
|
|
14
|
-
3: {"R":"Bridge 3
|
|
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
15
|
}
|
|
16
16
|
|
|
17
17
|
class RT:
|
|
@@ -77,7 +77,7 @@ class RT:
|
|
|
77
77
|
labels=labels,
|
|
78
78
|
_headers=_headers,
|
|
79
79
|
points=s_points[:,0:2],
|
|
80
|
-
ignore_outliers=IgnoreOutlierSpec(min_gap_base=1e-
|
|
80
|
+
ignore_outliers=IgnoreOutlierSpec(min_gap_base=1e-4,min_gap_multiple=10),
|
|
81
81
|
))
|
|
82
82
|
|
|
83
83
|
return datas
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from copy import copy
|
|
3
|
+
|
|
4
|
+
from ...base import *
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
FIGSIZE = (8, 6)
|
|
8
|
+
|
|
9
|
+
T = "Temperature (K)"
|
|
10
|
+
M = "DC Moment Free Ctr (emu)"
|
|
11
|
+
H = "Magnetic Field (Oe)"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class MT_origin:
|
|
15
|
+
data_summary_label_names = ["mass","H","cooling_type"]
|
|
16
|
+
axes_label_names = ("material","date","raw_data", "H")
|
|
17
|
+
figure_label_names = ("material","date", "raw_data","H")
|
|
18
|
+
figure_summary_label_names = ("raw_data","date")
|
|
19
|
+
max_axes_in_one_figure = 1
|
|
20
|
+
project_to_child_folder_label_names = {"material":"date","date":"material"}
|
|
21
|
+
parent_folder_name = "MT"
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
def preprocess(cls, raw_datas:list[Data])->list[Data]:
|
|
25
|
+
datas = []
|
|
26
|
+
for raw_data in raw_datas:
|
|
27
|
+
raw_labels = raw_data.labels
|
|
28
|
+
headers = raw_data.headers
|
|
29
|
+
raw_points = raw_data.points
|
|
30
|
+
iT = headers[T]
|
|
31
|
+
iH = headers[H]
|
|
32
|
+
iM = headers[M]
|
|
33
|
+
|
|
34
|
+
check_deque = []
|
|
35
|
+
|
|
36
|
+
current_points = []
|
|
37
|
+
current_cool_type = "ZFC"
|
|
38
|
+
try:
|
|
39
|
+
current_points.append(raw_points[0])
|
|
40
|
+
H_stage = round(raw_points[0, iH])
|
|
41
|
+
except KeyError:
|
|
42
|
+
return []
|
|
43
|
+
|
|
44
|
+
def append_data():
|
|
45
|
+
nonlocal current_points, check_deque, datas
|
|
46
|
+
nonlocal current_cool_type
|
|
47
|
+
current_points.append(check_deque.pop(0))
|
|
48
|
+
labels = copy(raw_labels)
|
|
49
|
+
labels["H"] = LabelValue(H_stage, "Oe")
|
|
50
|
+
if current_points[-1][iT] < current_points[0][iT]:
|
|
51
|
+
labels["cooling_type"] = "cooling"
|
|
52
|
+
else:
|
|
53
|
+
if current_cool_type == "ZFC":
|
|
54
|
+
labels["cooling_type"] = "ZFC"
|
|
55
|
+
current_cool_type = "FC"
|
|
56
|
+
else:
|
|
57
|
+
labels["cooling_type"] = "FC"
|
|
58
|
+
current_cool_type = "ZFC"
|
|
59
|
+
labels["scenario"] = "MT"
|
|
60
|
+
labels.summary_names = cls.data_summary_label_names
|
|
61
|
+
datas.append(
|
|
62
|
+
Data(
|
|
63
|
+
labels=labels,
|
|
64
|
+
_headers=(T,M),
|
|
65
|
+
points=np.array(current_points)[:,[iT,iM]],
|
|
66
|
+
ignore_outliers=None
|
|
67
|
+
))
|
|
68
|
+
|
|
69
|
+
for point in raw_points[1:]:
|
|
70
|
+
check_deque.append(point)
|
|
71
|
+
if len(check_deque) == 2:
|
|
72
|
+
# not the same H?
|
|
73
|
+
if abs(check_deque[1][iH] - H_stage) > 1.5:
|
|
74
|
+
append_data()
|
|
75
|
+
current_points = [check_deque.pop()]
|
|
76
|
+
H_stage = round(current_points[0][iH])
|
|
77
|
+
current_cool_type = "ZFC"
|
|
78
|
+
# not the same heating curve?
|
|
79
|
+
elif (check_deque[0][iT] - current_points[0][iT])>2 and (check_deque[0][iT] - check_deque[1][iT])>2:
|
|
80
|
+
append_data()
|
|
81
|
+
current_points = [check_deque.pop()]
|
|
82
|
+
else:
|
|
83
|
+
# the same curve
|
|
84
|
+
current_points.append(check_deque.pop(0))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
else:
|
|
88
|
+
while check_deque:
|
|
89
|
+
append_data()
|
|
90
|
+
|
|
91
|
+
return datas
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def make_axes_spec(cls,axes_labels, data_pool)->AxesSpec:
|
|
96
|
+
return AxesSpec(
|
|
97
|
+
x_axis_title=T,
|
|
98
|
+
y_axis_title=M,
|
|
99
|
+
major_grid=None,
|
|
100
|
+
major_tick=TickSpec(),
|
|
101
|
+
legend=LegendSpec(),
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def make_figure_spec(cls,figure_labels, axes_pool:Iterable[Axes])->FigureSpec:
|
|
107
|
+
H_stages = {}
|
|
108
|
+
for axes in axes_pool:
|
|
109
|
+
H_stages[axes.labels["H"]] = None
|
|
110
|
+
|
|
111
|
+
figure_name = f"{figure_labels.brief_summary}-{",".join(str(H_stage) for H_stage in H_stages)}"
|
|
112
|
+
|
|
113
|
+
return FigureSpec(
|
|
114
|
+
name=figure_name,
|
|
115
|
+
title=None,
|
|
116
|
+
figsize=FIGSIZE,
|
|
117
|
+
linestyle_cycle= ("-", "--"),
|
|
118
|
+
linecolor_cycle = ("black", "red"),
|
|
119
|
+
linemarker_cycle = ("o","o","s","s","^","^","v","v","d","d","*","*","x","x","+","+"),
|
|
120
|
+
alpa_cycle = (1.0,),
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
def make_muti_axes_spec(cls, axes_pool:list[Axes])->MutiAxesSpec|FAIL|None:
|
|
125
|
+
return None
|
|
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
|
{majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/domain/scenarios/VSM/MT_reliability_analysis.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{majoplot-0.1.7 → majoplot-0.1.9}/src/majoplot/infra/plotters/origin_utils/originlab_type_library.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|