ararpy 0.1.1__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.
ararpy/smp/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  from . import (
3
- sample as samples, consts, json, basic, corr, raw, initial,
3
+ sample as samples, info, consts, json, basic, corr, raw, initial,
4
4
  plots, style, table, calculation, export, diffusion_funcs
5
5
  )
6
6
 
ararpy/smp/basic.py CHANGED
@@ -534,10 +534,11 @@ def set_params(smp: Sample, params: Union[List, str], flag: Optional[str] = None
534
534
  smp.TotalParam[58:67] = remove_none(smp.TotalParam[58:67], params[4:13], n, 67 - 58)
535
535
  smp.TotalParam[97:100] = remove_none(smp.TotalParam[97:100], params[13:16], n, 100 - 97)
536
536
  smp.TotalParam[115:120] = remove_none(smp.TotalParam[115:120], params[16:21], n, 120 - 115)
537
- smp.TotalParam[120:123] = remove_none(smp.TotalParam[120:123], params[21:24], n, 123 - 120)
537
+ smp.TotalParam[126:136] = remove_none(smp.TotalParam[126:136], params[21:31], n, 136 - 126)
538
+ smp.TotalParam[120:123] = remove_none(smp.TotalParam[120:123], params[31:34], n, 123 - 120)
538
539
  smp.TotalParam[100:114] = remove_none(
539
540
  smp.TotalParam[100:114],
540
- [['Linear', 'Exponential', 'Power'][params[24:27].index(True)] if True in params[24:27] else '', *params[27:]], n, 114 - 100)
541
+ [['Linear', 'Exponential', 'Power'][params[34:37].index(True)] if True in params[34:37] else '', *params[37:]], n, 114 - 100)
541
542
  else:
542
543
  raise KeyError(f"{flag = } is not supported. It must be 'calc' for Calc Params, "
543
544
  f"'irra' for Irradiation Params, or 'smp' for Sample Params.")
ararpy/smp/calculation.py CHANGED
@@ -47,6 +47,7 @@ def recalculate(
47
47
  re_plot_style
48
48
  re_set_table
49
49
  re_table_style
50
+ re_corr_gain
50
51
  kwargs
51
52
 
52
53
  Returns
@@ -59,11 +60,14 @@ def recalculate(
59
60
  # print(f"{sample.SelectedSequence1 = }")
60
61
  # print(f"{sample.SelectedSequence2 = }")
61
62
  # --- initializing ---
63
+ re_corr_gain = re_corr_blank
62
64
  if re_initial: # 1
63
65
  initial.re_set_smp(sample)
64
66
  # --- calculating ---
65
67
  if re_corr_blank: # 2
66
68
  corr.corr_blank(sample)
69
+ if re_corr_gain: # 2 2024-10-04 add
70
+ corr.corr_gain(sample)
67
71
  if re_corr_massdiscr: # 3
68
72
  corr.corr_massdiscr(sample)
69
73
  if re_corr_decay: # 4
ararpy/smp/corr.py CHANGED
@@ -45,6 +45,32 @@ def corr_blank(sample: Sample):
45
45
  sample.CorrectedValues = copy.deepcopy(sample.BlankCorrected)
46
46
 
47
47
 
48
+ # =======================
49
+ # Corr Blank
50
+ # =======================
51
+ def corr_gain(sample: Sample):
52
+ """Blank Correction"""
53
+ corrGain = True
54
+ # if not corrBlank:
55
+ # sample.BlankCorrected = copy.deepcopy(sample.SampleIntercept)
56
+ # sample.CorrectedValues = copy.deepcopy(sample.BlankCorrected)
57
+ # return
58
+ gain_corrected = [[]] * 10
59
+ try:
60
+ for i in range(5):
61
+ gain_corrected[i * 2:2 + i * 2] = calc.corr.gain(
62
+ *sample.BlankCorrected[i * 2:2 + i * 2], *sample.TotalParam[126 + i * 2:128 + i * 2])
63
+ except Exception as e:
64
+ print(f"Gain correction failed")
65
+ print(traceback.format_exc())
66
+ return
67
+ for i in range(0, 10, 2):
68
+ gain_corrected[i] = [gain_corrected[i][index] if corrGain else j for index, j in enumerate(sample.BlankCorrected[i])]
69
+ gain_corrected[i + 1] = [gain_corrected[i + 1][index] if corrGain else j for index, j in enumerate(sample.BlankCorrected[i + 1])]
70
+ sample.BlankCorrected = copy.deepcopy(gain_corrected)
71
+ sample.CorrectedValues = copy.deepcopy(sample.BlankCorrected)
72
+
73
+
48
74
  # =======================
49
75
  # Mass Discrimination
50
76
  # =======================
@@ -167,7 +167,7 @@ class DiffArrmultiFunc(DiffSample):
167
167
  print(f"{self.telab = }")
168
168
  print(f"{self.tilab = }")
169
169
 
170
- def main(self):
170
+ def main(self, **params):
171
171
 
172
172
  print(f"\n======================================")
173
173
  print(f"Run Arrmulti Main | ")
@@ -1436,7 +1436,7 @@ class DiffArrmultiFunc(DiffSample):
1436
1436
  return xran, yran
1437
1437
 
1438
1438
  def arr(self, e, ord, dzx, fmod, f, telab, tilab, xlogd,
1439
- ns=200, r=1.987e-3, pi=3.141592654, ee=0.4342944879, acut=0, b=1, imp=1):
1439
+ ns=200, r=1.987e-3, pi=3.141592654, ee=0.4342944879, acut=0.5, b=8, imp=2):
1440
1440
 
1441
1441
  # print(f"{e = }")
1442
1442
  # print(f"{ord = }")
@@ -3677,13 +3677,10 @@ class InsideTemperatureCalibration:
3677
3677
 
3678
3678
 
3679
3679
  class SmpTemperatureCalibration:
3680
- def __init__(self, arr_path="", helix_log_path="", libano_log_path=None,
3680
+ def __init__(self, helix_log_path="", libano_log_path=None,
3681
3681
  name="smp_example", loc=r'D:\DjangoProjects\webarar\static\settings'):
3682
3682
 
3683
3683
  self.name = name
3684
- self.smp = ap.from_arr(file_path=arr_path)
3685
- if isinstance(self.smp, Sample):
3686
- self.name = self.smp.name()
3687
3684
 
3688
3685
  self.loc = loc
3689
3686
 
@@ -3858,27 +3855,28 @@ class SmpTemperatureCalibration:
3858
3855
 
3859
3856
  file_out.close()
3860
3857
 
3858
+ np.savetxt(os.path.join(self.loc, f"{self.name}-temp.txt"), libano_log, delimiter=',')
3859
+ heating_out = open(os.path.join(self.loc, f"{self.name}-heated-index.txt"), "w")
3860
+ heating_out.writelines([f'{min(i)},{max(i)}\n' for i in yellow_data_index])
3861
+ heating_out.close()
3861
3862
 
3862
- fig, ax = plt.subplots()
3863
- fig.set_size_inches(w=12, h=10)
3863
+ plt_plot = False
3864
+ if plt_plot:
3864
3865
 
3865
- ax.plot(libano_log[0], libano_log[1], c='green')
3866
- ax.plot(libano_log[0], libano_log[2], c='blue')
3867
- ax.plot(libano_log[0], libano_log[4], c='red')
3868
- ax.plot(libano_log[0], libano_log[5], c='red')
3869
- for i in range(nstep):
3870
- _index = yellow_data_index[i]
3871
- ax.plot(libano_log[0, _index], libano_log[4, _index], c='yellow')
3872
- ax.plot(libano_log[0, _index], libano_log[5, _index], c='yellow')
3866
+ fig, ax = plt.subplots()
3867
+ fig.set_size_inches(w=12, h=10)
3873
3868
 
3874
- fig.tight_layout()
3875
- plt.show()
3869
+ ax.plot(libano_log[0], libano_log[1], c='green')
3870
+ ax.plot(libano_log[0], libano_log[2], c='blue')
3871
+ ax.plot(libano_log[0], libano_log[4], c='red')
3872
+ ax.plot(libano_log[0], libano_log[5], c='red')
3873
+ for i in range(nstep):
3874
+ _index = yellow_data_index[i]
3875
+ ax.plot(libano_log[0, _index], libano_log[4, _index], c='yellow')
3876
+ ax.plot(libano_log[0, _index], libano_log[5, _index], c='yellow')
3876
3877
 
3877
-
3878
- np.savetxt(os.path.join(self.loc, f"{self.name}-temp.txt"), libano_log, delimiter=',')
3879
- heating_out = open(os.path.join(self.loc, f"{self.name}-heated-index.txt"), "w")
3880
- heating_out.writelines([','.join([str(j) for j in i]) for i in yellow_data_index])
3881
- heating_out.close()
3878
+ fig.tight_layout()
3879
+ plt.show()
3882
3880
 
3883
3881
 
3884
3882
  #
@@ -4613,15 +4611,15 @@ def dr2_lovera(f, ti, ar, sar):
4613
4611
  # Lovera
4614
4612
  f = np.array(f)
4615
4613
  ti = np.array(ti)
4616
- ar = np.array(ar)
4617
- sar = np.array(sar)
4614
+ # ar = np.array(ar)
4615
+ # sar = np.array(sar)
4618
4616
  ti = ti * 60 # in seconds
4619
4617
  pi = math.pi
4620
4618
  pi = 3.141592654
4621
4619
 
4622
4620
  # sf = sqrt(b ** 2 * siga ** 2 + a ** 2 * sigb ** 2) / (a + b) ** 2
4623
- sf = [math.sqrt(sar[i + 1:].sum() ** 2 * (sar[:i + 1] ** 2).sum() + ar[:i + 1].sum() ** 2 * (sar[i + 1:] ** 2).sum()) / ar.sum() ** 2 for i in range(len(ar) - 1)]
4624
- sf.append(0)
4621
+ # sf = [math.sqrt(sar[i + 1:].sum() ** 2 * (sar[:i + 1] ** 2).sum() + ar[:i + 1].sum() ** 2 * (sar[i + 1:] ** 2).sum()) / ar.sum() ** 2 for i in range(len(ar) - 1)]
4622
+ # sf.append(0)
4625
4623
 
4626
4624
  f = np.where(f >= 1, 0.9999999999999999, f)
4627
4625
 
@@ -4631,41 +4629,67 @@ def dr2_lovera(f, ti, ar, sar):
4631
4629
  dr2 = [(dtr2[i] - (dtr2[i - 1] if i > 0 else 0)) / ti[i] * imp ** 2 for i in range(len(dtr2))]
4632
4630
  xlogd = [np.log10(i) for i in dr2]
4633
4631
 
4634
- wt = errcal(f, ti, a39=ar, sig39=sar)
4632
+ wt = errcal(f, ti, ar, sar)
4635
4633
 
4636
4634
  return dr2, xlogd, wt
4637
4635
 
4638
4636
 
4639
- def dr2_yang(f, ti):
4637
+ def dr2_yang(f, ti, ar, sar):
4638
+ """
4639
+
4640
+ if i == 0:
4641
+ dr2[i] = _dr2(f[i]) / ti[i]
4642
+ else:
4643
+ dr2[i] = _dr2((f[i] - f[i - 1]) / (1 - f[i - 1])) / ti[i]
4644
+
4645
+ Parameters
4646
+ ----------
4647
+ f: array NOTE:这里的 f 既不是释放百分数也不是累积百分数,而是各个阶段释放量占其及后续所有气体的分数,即占释放前的比例
4648
+ ti
4649
+
4650
+ Returns
4651
+ -------
4652
+
4653
+ """
4640
4654
  f = np.array(f)
4641
4655
  ti = np.array(ti)
4642
4656
  n = min(len(f), len(ti))
4643
4657
  ti = ti * 60 # in seconds
4658
+ sti = 5.
4644
4659
  pi = math.pi
4645
4660
  pi = 3.141592654
4661
+ ee = 0.4342944819
4646
4662
  dr2 = np.zeros(n)
4663
+ sdr2 = np.zeros(n)
4647
4664
 
4648
- if f[-1] >= 1:
4649
- f[-1] = 0.99999999
4665
+ f = np.where(f >= 1, 0.9999999999999999, f)
4650
4666
 
4651
4667
  def _dr2(_fi):
4668
+ # return: dr2, dy/df
4652
4669
  if _fi <= 0.85:
4653
- return (1 - math.sqrt(1 - pi * _fi / 3)) ** 2 / pi
4670
+ return (1 - math.sqrt(1 - pi * _fi / 3)) ** 2 / pi, 1 / (3 * math.sqrt(1 - pi * _fi / 3)) - 1 / 3
4654
4671
  else:
4655
- return math.log((1 - _fi) / (6 / pi ** 2)) / - (pi ** 2)
4672
+ return math.log((1 - _fi) / (6 / pi ** 2)) / - (pi ** 2), 1 / (pi ** 2 * (1 - _fi))
4656
4673
 
4657
- for i in range(len(f)):
4658
- if i == 0:
4659
- dr2[i] = _dr2(f[i]) / ti[i]
4660
- else:
4661
- dr2[i] = _dr2((f[i] - f[i - 1]) / (1 - f[i - 1])) / ti[i]
4674
+ for i in range(n):
4675
+ dtr2, d = _dr2((f[i] - (f[i-1] if i > 0 else 0)) / (1 - (f[i-1] if i > 0 else 0)))
4676
+ # sf 中 f = (f[i] - f[i - 1]) / (1 - f[i - 1])
4677
+ sf = sum([ar[i] ** 2 * sar[j] ** 2 / sum(ar[i:]) ** 4 for j in range(i+1, n)]) + sum(ar[i+1:]) ** 2 * sar[i] ** 2 / sum(ar[i:]) ** 4
4678
+ sdtr2 = math.sqrt(d ** 2 * sf)
4679
+ dr2[i] = dtr2 / ti[i]
4680
+ sdr2[i] = ap.calc.err.div((dtr2, sdtr2), (ti[i], sti))
4681
+
4682
+ xlogd = np.log(dr2)
4683
+ sxlogd = np.abs(sdr2 / dr2)
4662
4684
 
4663
4685
  print(f"yang {dr2 = }")
4686
+ print(f"yang {xlogd = }")
4687
+ print(f"yang {sxlogd = }")
4664
4688
 
4665
- return dr2, np.log(dr2)
4689
+ return dr2, xlogd, sxlogd
4666
4690
 
4667
4691
 
4668
- def errcal(f, ti, a39, sig39):
4692
+ def errcal(f, ti, ar, sar):
4669
4693
 
4670
4694
  # ns = 200
4671
4695
  # r = 1.987E-3
@@ -4681,9 +4705,9 @@ def errcal(f, ti, a39, sig39):
4681
4705
  sigt0 = 90.
4682
4706
 
4683
4707
  ni = len(f)
4684
- sumat = sum(a39)
4685
- sigsm = [i / sumat for i in sig39]
4686
- siga = [sig39[i] / a39[i] for i in range(ni)]
4708
+ sumat = sum(ar)
4709
+ sigsm = [i / sumat for i in sar]
4710
+ siga = [sar[i] / ar[i] for i in range(ni)]
4687
4711
 
4688
4712
  an1 = math.pi ** 2
4689
4713
  sigat = 0.
ararpy/smp/export.py CHANGED
@@ -41,6 +41,52 @@ def to_pdf(file_path: str, figure: str, smp: Sample):
41
41
  pdf.save(figure=figure)
42
42
 
43
43
 
44
+ def export_chart_to_pdf(data: dict):
45
+ # create a canvas
46
+ cv = pm.Canvas(width=17, height=12, unit="cm", show_frame=True, clip_outside_plot_areas=False)
47
+ # change frame outline style
48
+ cv.show_frame(color="grey", line_width=0.5)
49
+ sc = (*data['xAxis'][0]['extent'], *data['yAxis'][0]['extent'])
50
+ pt = cv.add_plot_area(name="Plot1", plot_area=(0.15, 0.15, 0.8, 0.8), plot_scale=sc, show_frame=True)
51
+ # draw axis
52
+ for stick in data['xAxis'][0]['interval']:
53
+ start = pt.scale_to_points(stick, sc[2])
54
+ end = pt.scale_to_points(stick, sc[2])
55
+ end = (end[0], end[1] - 5)
56
+ pt.line(start=start, end=end, width=1, line_style="solid", y_clip=False, coordinate="pt", z_index=100)
57
+ pt.text(x=start[0], y=end[1] - 15, text=f"{stick}", clip=False,
58
+ coordinate="pt", h_align="middle", z_index=150)
59
+ for stick in data['yAxis'][0]['interval']:
60
+ start = pt.scale_to_points(sc[0], stick)
61
+ end = pt.scale_to_points(sc[0], stick)
62
+ end = (end[0] - 5, end[1])
63
+ pt.line(start=start, end=end, width=1, line_style="solid", x_clip=False, coordinate="pt", z_index=100)
64
+ pt.text(x=end[0] - 5, y=end[1], text=f"{stick}", clip=False,
65
+ coordinate="pt", h_align="right", v_align="center", z_index=150)
66
+ # axis titles
67
+ nameLocation = pt.scale_to_points(sum(sc[:2]) / 2, sc[2])
68
+ pt.text(x=nameLocation[0], y=nameLocation[1] - 30, text=data['xAxis'][0]['title'], clip=False, coordinate="pt",
69
+ h_align="middle", v_align="top", z_index=150)
70
+ nameLocation = pt.scale_to_points(sc[0], sum(sc[2:4]) / 2)
71
+ pt.text(x=nameLocation[0] - 50, y=nameLocation[1], text=data['yAxis'][0]['title'], clip=False, coordinate="pt",
72
+ h_align="middle", v_align="bottom", rotate=90, z_index=150)
73
+ # draw series
74
+ for se in data['series']:
75
+ data = se.get('data', [])
76
+ if 'line' in se['type']:
77
+ for index in range(1, len(data)):
78
+ pt.line(start=data[index - 1], end=data[index], width=1, line_style='solid', name=se['name'],
79
+ color=se.get('color', 'black'), clip=True, line_caps=se.get('line_caps', 'none'), z_index=9)
80
+ if 'scatter' in se['type'] and se['name'] != 'Text':
81
+ for each in data:
82
+ pt.scatter(each[0], each[1], fill_color=se.get('color', 'black'), size=2)
83
+ if 'scatter' in se['type'] and se['name'] == 'Text' or 'text' in se['type']:
84
+ for each in data:
85
+ pt.text(*each[:2], **se)
86
+
87
+ return cv
88
+
89
+
44
90
  class ExcelTemplate:
45
91
  def __init__(self, **kwargs):
46
92
  self.name = ""
ararpy/smp/info.py ADDED
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2024 Yang. - All Rights Reserved
2
+
3
+ # !/usr/bin/env python
4
+ # -*- coding: UTF-8 -*-
5
+ """
6
+ # ==========================================
7
+ # Copyright 2024 Yang
8
+ # ararpy - info
9
+ # ==========================================
10
+ #
11
+ #
12
+ #
13
+ """
14
+
15
+
16
+ def name(smp, n: str = None):
17
+ if n is None:
18
+ return smp.Info.sample.name
19
+ elif isinstance(n, str):
20
+ smp.Info.sample.name = n
21
+ return n
22
+ else:
23
+ raise ValueError(f"{n} is not a string")
ararpy/smp/json.py CHANGED
@@ -22,7 +22,8 @@ def dumps(a):
22
22
 
23
23
 
24
24
  def loads(a):
25
- return json.loads(a)
25
+ # null will be converted to None by default, replace None with np.nan
26
+ return json.loads(a, object_hook=myHook)
26
27
 
27
28
 
28
29
  class MyEncoder(json.JSONEncoder):
@@ -51,3 +52,13 @@ class MyEncoder(json.JSONEncoder):
51
52
  if not isinstance(obj, (int, str, list, dict, tuple, float)):
52
53
  print(f"Special type, {type(obj) = }, {obj = }")
53
54
  return super(MyEncoder, self).default(obj)
55
+
56
+
57
+ def myHook(obj):
58
+ if isinstance(obj, dict):
59
+ return {k: myHook(v) for k, v in obj.items()}
60
+ elif isinstance(obj, list):
61
+ return [myHook(v) for v in obj]
62
+ elif obj is None:
63
+ return np.nan
64
+ return obj
ararpy/smp/plots.py CHANGED
@@ -61,16 +61,20 @@ def set_plot_data(sample: Sample, isInit: bool = True, isIsochron: bool = True,
61
61
  try:
62
62
  initial_plot_data(sample)
63
63
  except (Exception, BaseException):
64
- print(traceback.format_exc())
64
+ # print(traceback.format_exc())
65
65
  pass
66
66
 
67
67
  # Recalculate isochron lines
68
68
  if isIsochron:
69
69
  try:
70
70
  recalc_isochrons(sample, **kwargs)
71
+ except (Exception, BaseException):
72
+ # print(traceback.format_exc())
73
+ pass
74
+ try:
71
75
  reset_isochron_line_data(sample)
72
76
  except (Exception, BaseException):
73
- print(traceback.format_exc())
77
+ # print(traceback.format_exc())
74
78
  pass
75
79
 
76
80
  # Recalculate plateaus
@@ -78,7 +82,7 @@ def set_plot_data(sample: Sample, isInit: bool = True, isIsochron: bool = True,
78
82
  try:
79
83
  recalc_plateaus(sample)
80
84
  except (Exception, BaseException):
81
- print(traceback.format_exc())
85
+ # print(traceback.format_exc())
82
86
  pass
83
87
 
84
88
 
@@ -237,7 +241,7 @@ def get_isochron_results(data: list, smp: Sample, sequence, figure_type: int = 0
237
241
  try:
238
242
  regression_res = regression_method(*data[:5])
239
243
  except (Exception, BaseException):
240
- print(f"Warning: {traceback.format_exc()}")
244
+ # print(f"Warning: {traceback.format_exc()}")
241
245
  return iso_res
242
246
  else:
243
247
  iso_res.update(dict(zip(reg_res_index, regression_res)))
@@ -305,11 +309,11 @@ def get_3D_results(data: list, sequence: list, sample: Sample):
305
309
  Q = 1 - np.exp(-1 * sample.TotalParam[46][0] * sum(sample.TotalParam[32]) / len(sample.TotalParam[32]))
306
310
  P = PQ / Q
307
311
  except:
308
- print(f"Warning: {traceback.format_exc()}")
312
+ # print(f"Warning: {traceback.format_exc()}")
309
313
  P = 0
310
314
  age = basic.calc_age([f, sf], smp=sample)
311
315
  except:
312
- print(f"Warning: {traceback.format_exc()}")
316
+ # print(f"Warning: {traceback.format_exc()}")
313
317
  k = [0] * 15
314
318
  age = [0] * 4
315
319
  ar40ar36, sar40ar36, P = 0, 0, 0
ararpy/smp/sample.py CHANGED
@@ -119,8 +119,8 @@ TOTAL_PARAMS_HEADERS = [
119
119
  '\u2074\u2070Ar/\u00B3\u2076Ar air', '%1\u03C3',
120
120
  '\u00B3\u2078Ar/\u00B3\u2076Ar air', '%1\u03C3', # 95-98
121
121
  'Isochron Fitting', 'Convergence', 'Iteration', 'Discrimination', # 99-102
122
- 'Not Zero', 'Corr Blank', 'Corr Discr', 'Corr \u00B3\u2077Ar Decay',
123
- 'Corr \u00B3\u2079Ar Decay', # 103-107
122
+ 'Not Zero', 'Corr Blank', 'Corr Discr', 'Corr \u00B3\u2077Ar Decay', # 103-106
123
+ 'Corr \u00B3\u2079Ar Decay', # 107
124
124
  'Ca Degassing', 'K Degassing', 'Cl Degassing', 'Trap Degassing', # 108-111
125
125
  'Using Min Equation',
126
126
  # 'Recalibration', 'Using Std Age', 'Use Std Ratio', # 112-115 to be completed
@@ -137,6 +137,11 @@ TOTAL_PARAMS_HEADERS = [
137
137
  'Heating Time (s)', # 125
138
138
  'Heating Actual Temp (C)', # 126
139
139
  'Heating AT 1\u03C3', # 127
140
+ '36Ar Gain', '1\u03C3', # 128-129
141
+ '37Ar Gain', '1\u03C3', # 130-131
142
+ '38Ar Gain', '1\u03C3', # 132-133
143
+ '39Ar Gain', '1\u03C3', # 134-135
144
+ '40Ar Gain', '1\u03C3', # 136-137
140
145
  ]
141
146
 
142
147
  SAMPLE_INTERCEPT_SHORT_HEADERS = [
@@ -245,6 +250,11 @@ TOTAL_PARAMS_SHORT_HEADERS = [
245
250
  'HeatingTime', # 125
246
251
  'HeatingActualTemp', # 126
247
252
  'HeatingActualTempError', # 127
253
+ '36Gain', '1s', # 128-129
254
+ '37Gain', '1s', # 130-131
255
+ '38Gain', '1s', # 132-133
256
+ '39Gain', '1s', # 134-135
257
+ '40Gain', '1s', # 136-137
248
258
  ]
249
259
 
250
260
  DEFAULT_PLOT_STYLES = {
@@ -731,7 +741,7 @@ DEFAULT_PLOT_STYLES = {
731
741
  },
732
742
  }
733
743
 
734
- VERSION = '20240730'
744
+ VERSION = '20240930'
735
745
 
736
746
  NAMED_DICT = {
737
747
  "unknown": {"header": SAMPLE_INTERCEPT_HEADERS.copy()},
@@ -839,7 +849,7 @@ class Sample:
839
849
  return self.__version
840
850
 
841
851
  def help(self) -> str: ...
842
-
852
+
843
853
  def name(self) -> str: ...
844
854
 
845
855
  def doi(self) -> str: ...
@@ -854,7 +864,7 @@ class Sample:
854
864
 
855
865
  def sequence(self) -> ArArBasic: ...
856
866
 
857
- def recalculate(self, *args): ...
867
+ def recalculate(self, *args, **kwargs): ...
858
868
 
859
869
  def plot_age_plateau(self): ...
860
870
 
ararpy/smp/table.py CHANGED
@@ -9,6 +9,7 @@
9
9
  #
10
10
  #
11
11
  """
12
+ import copy
12
13
  from .. import calc
13
14
  from . import (sample as samples, basic)
14
15
 
@@ -47,6 +48,13 @@ def update_table_data(smp: Sample, only_table: str = None):
47
48
  data = calc.arr.merge(
48
49
  smp.SequenceName, smp.SequenceValue, *smp.DegasValues)
49
50
  elif key == '5':
51
+ smp.PublishValues[0] = copy.deepcopy(smp.DegasValues[ 0])
52
+ smp.PublishValues[1] = copy.deepcopy(smp.DegasValues[ 8])
53
+ smp.PublishValues[2] = copy.deepcopy(smp.DegasValues[10])
54
+ smp.PublishValues[3] = copy.deepcopy(smp.DegasValues[20])
55
+ smp.PublishValues[4] = copy.deepcopy(smp.DegasValues[24])
56
+ smp.PublishValues[5:7] = copy.deepcopy(smp.ApparentAgeValues[2:4])
57
+ smp.PublishValues[7:9] = copy.deepcopy(smp.ApparentAgeValues[6:8])
50
58
  data = calc.arr.merge(
51
59
  smp.SequenceName, smp.SequenceValue, *smp.PublishValues)
52
60
  elif key == '6':