majoplot 0.1.6__py3-none-any.whl → 0.1.8__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/scenarios/VSM/{ChiT_ZFC.py → ChiT_onlyZFC.py} +1 -1
- majoplot/domain/scenarios/VSM/MT_origin.py +125 -0
- majoplot/infra/plotters/origin.py +3 -3
- {majoplot-0.1.6.dist-info → majoplot-0.1.8.dist-info}/METADATA +1 -1
- {majoplot-0.1.6.dist-info → majoplot-0.1.8.dist-info}/RECORD +8 -7
- {majoplot-0.1.6.dist-info → majoplot-0.1.8.dist-info}/WHEEL +0 -0
- {majoplot-0.1.6.dist-info → majoplot-0.1.8.dist-info}/entry_points.txt +0 -0
- {majoplot-0.1.6.dist-info → majoplot-0.1.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
|
@@ -590,13 +590,13 @@ def _legend_anchor_xy(leg: LegendSpec) -> tuple[float, float]:
|
|
|
590
590
|
|
|
591
591
|
loc = (leg.loc or "upper right").lower().replace("_", " ")
|
|
592
592
|
table = {
|
|
593
|
-
"upper right": (
|
|
593
|
+
"upper right": (70.0, 90.0),
|
|
594
594
|
"upper left": (10.0, 90.0),
|
|
595
595
|
"lower left": (10.0, 10.0),
|
|
596
|
-
"lower right": (
|
|
596
|
+
"lower right": (70.0, 10.0),
|
|
597
597
|
"center": (50.0, 50.0),
|
|
598
598
|
}
|
|
599
|
-
return table.get(loc, (
|
|
599
|
+
return table.get(loc, (70.0, 90.0))
|
|
600
600
|
|
|
601
601
|
|
|
602
602
|
def _apply_legend_text(og: Any, layer_idx: int, legend_spec: LegendSpec, legend_text: str, scale: float) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: majoplot
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
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
|
|
@@ -12,18 +12,19 @@ majoplot/domain/importers/VSM.py,sha256=sEZsz_3n67jtPLy1-grP9A8K1RPVnwuQLMUSrLOt
|
|
|
12
12
|
majoplot/domain/importers/XRD.py,sha256=_CN3jKLn4vZ3Oa2cm3IcH05R_mrao2so3VTVKVEND98,2840
|
|
13
13
|
majoplot/domain/scenarios/PPMS_Resistivity/RT.py,sha256=SZa5f25di9GC9DCBv_aDZtxXwn75jKBgxR87SV1CJ78,4584
|
|
14
14
|
majoplot/domain/scenarios/VSM/ChiT.py,sha256=RNpO4xInT0mRr90v4DEZt4K0m6p9cmJNNm7f6F-RN34,6643
|
|
15
|
-
majoplot/domain/scenarios/VSM/
|
|
15
|
+
majoplot/domain/scenarios/VSM/ChiT_onlyZFC.py,sha256=gcnzmUn_B8EFEZigIUaqNz0deTM2KjtUgaak9kqdlKA,6568
|
|
16
16
|
majoplot/domain/scenarios/VSM/MT.py,sha256=lnqEi6sw6pzIOaGoqkC5OWJQzROWXL32-YvtOH__Rvg,4550
|
|
17
17
|
majoplot/domain/scenarios/VSM/MT_insert.py,sha256=goaB0Y3dUaerBv3Z4DX8S2ixerGBIz4D1e5k6jpAnJc,4711
|
|
18
|
+
majoplot/domain/scenarios/VSM/MT_origin.py,sha256=6uxvv1YWurHMI8nVspwqqasXd_4pyOxwTLpqOzCwe3Q,4313
|
|
18
19
|
majoplot/domain/scenarios/VSM/MT_reliability_analysis.py,sha256=eACa4Z5Q5Uew_m_kGSmsQ4jLy5CIpTrASx7VV-a7nBY,5109
|
|
19
20
|
majoplot/domain/scenarios/XRD/Compare.py,sha256=YvyrnYyFzzlp5DK6Unv75AFuf5fbRgbCumy3_zy6XNQ,3870
|
|
20
21
|
majoplot/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
22
|
majoplot/gui/main.py,sha256=v5pyi-Gb26o_lmVM4GaM_Tt_-1rTTKVRekgOcBochA0,20291
|
|
22
23
|
majoplot/infra/plotters/matplot.py,sha256=DE3nCfFjL9FxNbuEgggJyXlolkP1nWKmNwJElt1bgHw,12281
|
|
23
|
-
majoplot/infra/plotters/origin.py,sha256=
|
|
24
|
+
majoplot/infra/plotters/origin.py,sha256=xB80d216pmo_mXo5Lx8sGQrjQC6N0NljzzoMNG37w1g,39034
|
|
24
25
|
majoplot/infra/plotters/origin_utils/originlab_type_library.py,sha256=zxOxF7nB57zwnXSaFSoCUV64ZTHhDBDRv57exatiBoU,37398
|
|
25
|
-
majoplot-0.1.
|
|
26
|
-
majoplot-0.1.
|
|
27
|
-
majoplot-0.1.
|
|
28
|
-
majoplot-0.1.
|
|
29
|
-
majoplot-0.1.
|
|
26
|
+
majoplot-0.1.8.dist-info/METADATA,sha256=QgV8-T8UEJLfvmGuH49Kj2xLQHdLGLUGhz9xHtvGkKw,2877
|
|
27
|
+
majoplot-0.1.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
28
|
+
majoplot-0.1.8.dist-info/entry_points.txt,sha256=zEiPXZtNyJQMvVS-Zl9psx8SpTafOcs8F9S8xGtOaBM,52
|
|
29
|
+
majoplot-0.1.8.dist-info/licenses/LICENSE,sha256=fj2NqLupbHWfA5W-8tqCpT5yjO8A4F1HcKnt_maww20,1070
|
|
30
|
+
majoplot-0.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|