majoplot 0.1.7__py3-none-any.whl → 0.1.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.
@@ -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 Resistivity (Ohm-m)", "Bridge 1 Excitation (uA)"
19
- R2, I2 = "Bridge 2 Resistivity (Ohm-m)", "Bridge 2 Excitation (uA)"
20
- R3, I3 = "Bridge 3 Resistivity (Ohm-m)", "Bridge 3 Excitation (uA)"
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 = "Resistivity (Ohm-m)"
10
+ R = "Resistance (Ohms)"
11
11
  RI ={
12
- 1: {"R":"Bridge 1 Resistivity (Ohm-m)", "I":"Bridge 1 Excitation (uA)"},
13
- 2: {"R":"Bridge 2 Resistivity (Ohm-m)", "I":"Bridge 2 Excitation (uA)"},
14
- 3: {"R":"Bridge 3 Resistivity (Ohm-m)", "I":"Bridge 3 Excitation (uA)"},
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-6,min_gap_multiple=10),
80
+ ignore_outliers=IgnoreOutlierSpec(min_gap_base=1e-4,min_gap_multiple=10),
81
81
  ))
82
82
 
83
83
  return datas
@@ -12,7 +12,7 @@ H = "Magnetic Field (Oe)"
12
12
  chi = "χ ( m³ / kg )"
13
13
 
14
14
 
15
- class ChiT_ZFC:
15
+ class ChiT_onlyZFC:
16
16
  data_summary_label_names = ["H","cooling_type"]
17
17
  axes_label_names = ("material","date","raw_data")
18
18
  figure_label_names = ("material","date", "raw_data")
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: majoplot
3
- Version: 0.1.7
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
@@ -7,14 +7,15 @@ 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=6Jf6yA0VB4HnTbeNUjQSmN04fJx3zzGdIT3Z8Y83Qvc,4519
10
+ majoplot/domain/importers/PPMS_Resistivity.py,sha256=-1JbI93VQXK3vab89dmMX8NACtidjIUd9a2aNQH3G4M,4513
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=SZa5f25di9GC9DCBv_aDZtxXwn75jKBgxR87SV1CJ78,4584
13
+ majoplot/domain/scenarios/PPMS_Resistivity/RT.py,sha256=ezP1savHiwKBSOTPq2rJrcxu5IwINvZnEgIVva5gkEE,4576
14
14
  majoplot/domain/scenarios/VSM/ChiT.py,sha256=RNpO4xInT0mRr90v4DEZt4K0m6p9cmJNNm7f6F-RN34,6643
15
- majoplot/domain/scenarios/VSM/ChiT_ZFC.py,sha256=TCD-SD6KYUidZgLSoR4U1FY31De2HELrRuf7_KVlVJA,6564
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
@@ -22,8 +23,8 @@ majoplot/gui/main.py,sha256=v5pyi-Gb26o_lmVM4GaM_Tt_-1rTTKVRekgOcBochA0,20291
22
23
  majoplot/infra/plotters/matplot.py,sha256=DE3nCfFjL9FxNbuEgggJyXlolkP1nWKmNwJElt1bgHw,12281
23
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.7.dist-info/METADATA,sha256=BvDHU3bUUKf4MqpjnA2su0hYiDxOiBB6YX_xlwWTlkw,2877
26
- majoplot-0.1.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
27
- majoplot-0.1.7.dist-info/entry_points.txt,sha256=zEiPXZtNyJQMvVS-Zl9psx8SpTafOcs8F9S8xGtOaBM,52
28
- majoplot-0.1.7.dist-info/licenses/LICENSE,sha256=fj2NqLupbHWfA5W-8tqCpT5yjO8A4F1HcKnt_maww20,1070
29
- majoplot-0.1.7.dist-info/RECORD,,
26
+ majoplot-0.1.9.dist-info/METADATA,sha256=R6i7A7vNOszXycQVcT0u6mkdeE1_SyhxxJj0sKTUWkY,2877
27
+ majoplot-0.1.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
28
+ majoplot-0.1.9.dist-info/entry_points.txt,sha256=zEiPXZtNyJQMvVS-Zl9psx8SpTafOcs8F9S8xGtOaBM,52
29
+ majoplot-0.1.9.dist-info/licenses/LICENSE,sha256=fj2NqLupbHWfA5W-8tqCpT5yjO8A4F1HcKnt_maww20,1070
30
+ majoplot-0.1.9.dist-info/RECORD,,