majoplot 0.1.12__tar.gz → 0.1.13__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.
Files changed (45) hide show
  1. {majoplot-0.1.12 → majoplot-0.1.13}/PKG-INFO +1 -1
  2. {majoplot-0.1.12 → majoplot-0.1.13}/pyproject.toml +1 -1
  3. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/base.py +9 -3
  4. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/PPMS_Resistivity/RT.py +4 -5
  5. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/PPMS_Resistivity/RT_Resistivity.py +4 -4
  6. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/PPMS_Resistivity/RT_normalized.py +29 -4
  7. {majoplot-0.1.12 → majoplot-0.1.13}/uv.lock +1 -1
  8. {majoplot-0.1.12 → majoplot-0.1.13}/.gitignore +0 -0
  9. {majoplot-0.1.12 → majoplot-0.1.13}/LICENSE +0 -0
  10. {majoplot-0.1.12 → majoplot-0.1.13}/README.md +0 -0
  11. {majoplot-0.1.12 → majoplot-0.1.13}/README.zh-CN.md +0 -0
  12. {majoplot-0.1.12 → majoplot-0.1.13}/TODO.md +0 -0
  13. {majoplot-0.1.12 → majoplot-0.1.13}/doc.zh-CN/Label.md +0 -0
  14. {majoplot-0.1.12 → majoplot-0.1.13}/doc.zh-CN/interactive_steps.md +0 -0
  15. {majoplot-0.1.12 → majoplot-0.1.13}/doc.zh-CN/main_design.md +0 -0
  16. {majoplot-0.1.12 → majoplot-0.1.13}/doc.zh-CN/note_of_labtalk.md +0 -0
  17. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/__init__.py +0 -0
  18. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/__main__.py +0 -0
  19. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/app/__init__.py +0 -0
  20. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/app/cli.py +0 -0
  21. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/app/gui.py +0 -0
  22. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/config.json +0 -0
  23. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/importers/PPMS_Resistivity.py +0 -0
  24. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/importers/VSM.py +0 -0
  25. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/importers/XRD.py +0 -0
  26. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/muti_axes_spec.py +0 -0
  27. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/VSM/ChiT.py +0 -0
  28. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/VSM/ChiT_onlyZFC.py +0 -0
  29. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/VSM/MT.py +0 -0
  30. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/VSM/MT_insert.py +0 -0
  31. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/VSM/MT_original.py +0 -0
  32. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/VSM/MT_reliability_analysis.py +0 -0
  33. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/scenarios/XRD/Compare.py +0 -0
  34. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/domain/utils.py +0 -0
  35. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/gui/__init__.py +0 -0
  36. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/gui/main.py +0 -0
  37. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/infra/plotters/matplot.py +0 -0
  38. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/infra/plotters/origin.py +0 -0
  39. {majoplot-0.1.12 → majoplot-0.1.13}/src/majoplot/infra/plotters/origin_utils/originlab_type_library.py +0 -0
  40. {majoplot-0.1.12 → majoplot-0.1.13}/tests/README.md +0 -0
  41. {majoplot-0.1.12 → majoplot-0.1.13}/tests/conftest.py +0 -0
  42. {majoplot-0.1.12 → majoplot-0.1.13}/tests/domain/test_data_ignore_outliers.py +0 -0
  43. {majoplot-0.1.12 → majoplot-0.1.13}/tests/domain/test_insert_axes_spec.py +0 -0
  44. {majoplot-0.1.12 → majoplot-0.1.13}/tests/domain/test_labeldict_group.py +0 -0
  45. {majoplot-0.1.12 → majoplot-0.1.13}/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.12
3
+ Version: 0.1.13
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.12"
3
+ version = "0.1.13"
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"
@@ -205,7 +205,10 @@ class Data:
205
205
  @property
206
206
  def x_for_plot(self)->NDArray[np.floating]:
207
207
  if self._x_for_plot is None:
208
- self._x_for_plot = self.points_for_plot[:,0]
208
+ try:
209
+ self._x_for_plot = self.points_for_plot[:,0]
210
+ except IndexError:
211
+ return np.asarray(np.nan)
209
212
  return self._x_for_plot
210
213
 
211
214
  @property
@@ -217,13 +220,16 @@ class Data:
217
220
  @property
218
221
  def y_for_plot(self)->NDArray[np.floating]:
219
222
  if self._y_for_plot is None:
220
- self._y_for_plot = self.points_for_plot[:,1]
223
+ try:
224
+ self._y_for_plot = self.points_for_plot[:,1]
225
+ except IndexError:
226
+ return np.asarray(np.nan)
221
227
  return self._y_for_plot
222
228
 
223
229
  @property
224
230
  def ylim(self)->tuple[np.float64,np.float64]:
225
231
  if self._ylim is None:
226
- self._ylim = (min(self.y_for_plot), max(self.y_for_plot))
232
+ self._ylim = (np.min(self.y_for_plot), np.max(self.y_for_plot))
227
233
  return self._ylim
228
234
 
229
235
  @property
@@ -106,15 +106,14 @@ class RT:
106
106
  title=None,
107
107
  figsize=FIGSIZE,
108
108
  linestyle_cycle= ("-",),
109
-
109
+ linemarker_cycle = ("o",),
110
110
  linecolor_cycle = (
111
111
  "#515151", "#F14040", "#1A6FDF", "#37AD6B", "#B177DE",
112
112
  "#CC9900", "#00CBCC", "#7D4E4E", "#8E8E00", "#FB6501",
113
- "#6699CC", "#6FB802", "#f04f76", "#f86a5a", "#fb8c3c",
114
- "#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#005F5F",
115
- "#1F3D2B", "#E8C6E8","#FAB3d1",
113
+ "#6699CC", "#6FB802", "#FD0000FF", "#15ff00", "#FF9447",
114
+ "#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#00FFFF",
115
+ "#6DFFA7", "#FDBAFD","#FAB3d1",
116
116
  ),
117
- linemarker_cycle = ("o",),
118
117
  alpa_cycle = (1.0,),
119
118
  )
120
119
 
@@ -123,11 +123,11 @@ class RT_Resistivity:
123
123
  linecolor_cycle = (
124
124
  "#515151", "#F14040", "#1A6FDF", "#37AD6B", "#B177DE",
125
125
  "#CC9900", "#00CBCC", "#7D4E4E", "#8E8E00", "#FB6501",
126
- "#6699CC", "#6FB802", "#f04f76", "#f86a5a", "#fb8c3c",
127
- "#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#005F5F",
128
- "#1F3D2B", "#E8C6E8","#FAB3d1",
126
+ "#6699CC", "#6FB802", "#FD0000FF", "#15ff00", "#FF9447",
127
+ "#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#00FFFF",
128
+ "#6DFFA7", "#FDBAFD","#FAB3d1",
129
129
  ),
130
- linemarker_cycle = ("o","s","^","v","d","*","x","+"),
130
+ linemarker_cycle = ("o"),
131
131
  alpa_cycle = (1.0,),
132
132
  )
133
133
 
@@ -85,7 +85,32 @@ class RT_normalized:
85
85
  points=s_points[:,0:2],
86
86
  ignore_outliers=IgnoreOutlierSpec(min_gap_base=1e-4,min_gap_multiple=5),
87
87
  ))
88
-
88
+ # find common range
89
+ comm_left_margin = -273.15
90
+ comm_right_margin = 3890
91
+ for data in datas:
92
+ if data.points.size < 20:
93
+ break
94
+ data_left_margin, data_right_margin = data.xlim
95
+ if data_left_margin > comm_left_margin:
96
+ comm_left_margin = data_left_margin
97
+ if data_right_margin < comm_right_margin:
98
+ comm_right_margin = data_right_margin
99
+ comm_right_margin = round(comm_right_margin)
100
+ comm_left_margin = round(comm_left_margin)
101
+
102
+ for data in datas:
103
+ points = data.points
104
+ mask = (points[:,0] > comm_left_margin) & (points[:, 0] < comm_right_margin)
105
+ points = points[mask,:]
106
+ data.points = points
107
+ data._ignore_outliers_spec_cache = None
108
+ data._points_for_plot = None
109
+ data._x_for_plot = None
110
+ data._y_for_plot = None
111
+ data._xlim = None
112
+ data._ylim = None
113
+
89
114
  # normalize
90
115
  for data in datas:
91
116
  data: Data
@@ -129,9 +154,9 @@ class RT_normalized:
129
154
  linecolor_cycle = (
130
155
  "#515151", "#F14040", "#1A6FDF", "#37AD6B", "#B177DE",
131
156
  "#CC9900", "#00CBCC", "#7D4E4E", "#8E8E00", "#FB6501",
132
- "#6699CC", "#6FB802", "#f04f76", "#f86a5a", "#fb8c3c",
133
- "#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#005F5F",
134
- "#1F3D2B", "#E8C6E8","#FAB3d1",
157
+ "#6699CC", "#6FB802", "#FD0000FF", "#15ff00", "#FF9447",
158
+ "#fdbb2d", "#fcfdbf","#2B2E83", "#E6007A", "#00FFFF",
159
+ "#6DFFA7", "#FDBAFD","#FAB3d1",
135
160
  ),
136
161
  linemarker_cycle = ("o",),
137
162
  alpa_cycle = (1.0,),
@@ -252,7 +252,7 @@ wheels = [
252
252
 
253
253
  [[package]]
254
254
  name = "majoplot"
255
- version = "0.1.11"
255
+ version = "0.1.12"
256
256
  source = { editable = "." }
257
257
  dependencies = [
258
258
  { name = "matplotlib" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes