ararpy 0.2.2__py3-none-any.whl → 0.2.3__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/__init__.py CHANGED
@@ -16,7 +16,7 @@ from . import calc, smp, files, thermo, test
16
16
  """ Information """
17
17
 
18
18
  name = 'ararpy'
19
- version = '0.2.2'
19
+ version = '0.2.3'
20
20
  __version__ = version
21
21
  full_version = version
22
22
  last_update = '2026-01-01'
ararpy/calc/corr.py CHANGED
@@ -272,6 +272,7 @@ def Monte_Carlo_F(ar40m: Tuple[float, float], ar39m: Tuple[float, float], ar38m:
272
272
  G40: Tuple[float, float], G39: Tuple[float, float], G38: Tuple[float, float],
273
273
  G37: Tuple[float, float], G36: Tuple[float, float],
274
274
  stand_time_year: float, JNFactor: Tuple[float, float],
275
+ KCaFactor: Tuple[float, float], KClFactor: Tuple[float, float],
275
276
  **options):
276
277
  """
277
278
 
@@ -359,6 +360,9 @@ def Monte_Carlo_F(ar40m: Tuple[float, float], ar39m: Tuple[float, float], ar38m:
359
360
  R38v39k = random_normal_relative(*R38v39k, size=Monte_Carlo_Size)
360
361
  R36v38clp = random_normal_relative(*R36v38clp, size=Monte_Carlo_Size)
361
362
 
363
+ KCa = random_normal_relative(*KCaFactor, size=Monte_Carlo_Size)
364
+ KCl = random_normal_relative(*KClFactor, size=Monte_Carlo_Size)
365
+
362
366
  JNFactor = random_normal_absolute(*JNFactor, size=Monte_Carlo_Size)
363
367
 
364
368
  def do_simulation():
@@ -380,31 +384,23 @@ def Monte_Carlo_F(ar40m: Tuple[float, float], ar39m: Tuple[float, float], ar38m:
380
384
  _ar39 = (ar39m[i] / G39[i] - ar39b[i] / (G39[i] if blank_gain_corr else 1)) * P39Mdf * P39Decay
381
385
  _ar40 = (ar40m[i] / G40[i] - ar40b[i] / (G40[i] if blank_gain_corr else 1)) * P40Mdf
382
386
 
387
+ _ar37ca = _ar37
388
+
383
389
  if force_to_zero:
384
- _ar36 = max(_ar36, 0)
385
- _ar37 = max(_ar37, 0)
386
- _ar38 = max(_ar38, 0)
387
- _ar39 = max(_ar39, 0)
388
- _ar40 = max(_ar40, 0)
390
+ _ar37ca = max(_ar37, 0)
389
391
 
390
- _ar37ca = _ar37
391
392
  _ar39ca = _ar37ca * R39v37ca[i]
392
393
  _ar38ca = _ar37ca * R38v37ca[i]
393
394
  _ar36ca = _ar37ca * R36v37ca[i]
394
395
 
396
+ _ar39k = _ar39 - _ar39ca
397
+
395
398
  if force_to_zero:
396
- _ar39ca = min(_ar39ca, _ar39)
397
- _ar38ca = min(_ar38ca, _ar38)
398
- _ar36ca = min(_ar36ca, _ar36)
399
+ _ar39k = max(_ar39k, 0)
399
400
 
400
- _ar39k = _ar39 - _ar39ca
401
401
  _ar38k = _ar39k * R38v39k[i]
402
402
  _ar40k = _ar39k * R40v39k[i]
403
403
 
404
- if force_to_zero:
405
- _ar38k = min(_ar38k, _ar38 - _ar38ca)
406
- _ar40k = min(_ar40k, _ar40)
407
-
408
404
  _ar38res = _ar38 - _ar38k - _ar38ca
409
405
  _ar36res = _ar36 - _ar36ca
410
406
 
@@ -433,6 +429,8 @@ def Monte_Carlo_F(ar40m: Tuple[float, float], ar39m: Tuple[float, float], ar38m:
433
429
 
434
430
  factor = JNFactor[i]
435
431
 
432
+ _CaK = _ar37ca / _ar39k / KCa[i]
433
+
436
434
  i += 1
437
435
 
438
436
  yield _ar36a, 0, _ar36ca, _ar36cl, _ar37ca, _ar38cl, _ar38a, 0, _ar38k, _ar38ca, _ar39k, _ar39ca, _ar40r, _ar40a, 0, _ar40k, \
@@ -442,7 +440,7 @@ def Monte_Carlo_F(ar40m: Tuple[float, float], ar39m: Tuple[float, float], ar38m:
442
440
  (_ar39k * factor) / _ar40r, _ar38cl / _ar40r, \
443
441
  _ar38cl / (_ar39k * factor), _ar40r / (_ar39k * factor), \
444
442
  _ar36res / _ar40ar, _ar38res / _ar40ar, (_ar39k * factor) / _ar40ar, \
445
- _ar36, _ar37, _ar38, _ar39, _ar40
443
+ _ar36, _ar37, _ar38, _ar39, _ar40, _CaK
446
444
 
447
445
  data = np.array(list(do_simulation()))
448
446
  means = data.mean(axis=0)
@@ -467,8 +465,9 @@ def Monte_Carlo_F(ar40m: Tuple[float, float], ar39m: Tuple[float, float], ar38m:
467
465
  corrected_data = np.column_stack((means[29:34], stds[29:34])).ravel()
468
466
 
469
467
  F = np.append(means[25], stds[25])
468
+ CaK = np.append(means[34], stds[34])
470
469
 
471
- return *F, *degas_data, *nor_iso, *inv_iso, *cl1_iso, *cl2_iso, *cl3_iso, *threed_iso, *corrected_data
470
+ return *F, *degas_data, *nor_iso, *inv_iso, *cl1_iso, *cl2_iso, *cl3_iso, *threed_iso, *corrected_data, *CaK
472
471
 
473
472
  # print("F = {0} ± {1}".format(np.mean(F), np.std(F)))
474
473
  #
ararpy/files/calc_file.py CHANGED
@@ -81,7 +81,7 @@ def open_252(data: pd.DataFrame, logs01: pd.DataFrame, logs02: pd.DataFrame):
81
81
  162, 163, 164, 165, 166, 167, 168, 169, # 40 r, a, c, k 26-33
82
82
  ]
83
83
  publish_values_index = [
84
- 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
84
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
85
85
  ]
86
86
  apparent_age_values_index = [
87
87
  198, 199, 200, 201, -999, -999, 202, 203, # f, sf, ages, s, s, s, 40Arr%, 39Ar%
@@ -244,7 +244,9 @@ def open_240(data: pd.DataFrame, logs01: pd.DataFrame, logs02: pd.DataFrame):
244
244
  148, -999, 149, -999, 150, -999, 151, -999,
245
245
  ]
246
246
  publish_values_index = [
247
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
247
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
248
+ -1, -1, -1, -1,
249
+ -1, -1, -1, -1,
248
250
  ]
249
251
  apparent_age_values_index = [
250
252
  # f, sf, ages, s, s, s, 39Ar%
ararpy/smp/basic.py CHANGED
@@ -119,7 +119,7 @@ def calc_apparent_ages(smp: Sample):
119
119
  raise TypeError(f"Sample type is not supported: {smp.Info.sample.type}")
120
120
 
121
121
  smp.ApparentAgeValues[2:6] = v[0:4]
122
- smp.PublishValues[5:7] = copy.deepcopy(v[0:2])
122
+ smp.PublishValues[12:14] = copy.deepcopy(v[0:2])
123
123
 
124
124
 
125
125
  def calc_j(ar40ar39=None, params: dict = None, smp: Sample = None, index: list = None):
@@ -591,7 +591,7 @@ def get_diff_smp(backup: (dict, Sample), smp: (dict, Sample)):
591
591
  if _res != {}:
592
592
  res.update({name: _res})
593
593
  continue
594
- if str(backup[name]) == str(attr) or backup[name] == attr:
594
+ if str(backup[name]) == str(attr):
595
595
  continue
596
596
  res.update({name: attr})
597
597
  return res
ararpy/smp/corr.py CHANGED
@@ -55,7 +55,6 @@ def corr_blank(sample: Sample):
55
55
  for i in range(0, 10, 2):
56
56
  blank_corrected[i] = [blank_corrected[i][index] if sample.TotalParam[102][index] else j for index, j in enumerate(sample.SampleIntercept[i])]
57
57
  blank_corrected[i + 1] = [blank_corrected[i + 1][index] if sample.TotalParam[102][index] else j for index, j in enumerate(sample.SampleIntercept[i + 1])]
58
- blank_corrected[i] = [0 if j < 0 and sample.TotalParam[101][index] else j for index, j in enumerate(blank_corrected[i])]
59
58
  sample.BlankCorrected = blank_corrected
60
59
 
61
60
 
@@ -147,9 +146,6 @@ def corr_decay(sample: Sample):
147
146
  *sample.MassDiscrCorrected[2:4], t1, t2, t3, *sample.TotalParam[44:46], isRelative=True)
148
147
  decay_corrected[6:8] = calc.corr.decay(
149
148
  *sample.MassDiscrCorrected[6:8], t1, t2, t3, *sample.TotalParam[42:44], isRelative=True)
150
- # Negative number set to zero in decay correction
151
- decay_corrected[2] = [0 if i < 0 else i for i in decay_corrected[2]]
152
- decay_corrected[6] = [0 if i < 0 else i for i in decay_corrected[6]]
153
149
  except Exception as e:
154
150
  print(traceback.format_exc())
155
151
  raise ValueError(f'Decay correction error: {str(e)}')
@@ -162,6 +158,10 @@ def corr_decay(sample: Sample):
162
158
  sample.CorrectedValues[6] = [val if corrDecay39[idx] else 0 for idx, val in enumerate(decay_corrected[6])]
163
159
  sample.CorrectedValues[7] = [val if corrDecay39[idx] else 0 for idx, val in enumerate(decay_corrected[7])]
164
160
 
161
+ data = np.array(sample.CorrectedValues)
162
+ data[1:10:2] = data[1:10:2] = np.abs(np.divide(data[1:10:2], data[0:10:2])) * 100
163
+ sample.PublishValues[0:10] = copy.deepcopy(data.tolist())
164
+
165
165
 
166
166
  # =======================
167
167
  # Degas Calcium derived 37Ar 36Ar 38Ar 39Ar
@@ -189,8 +189,10 @@ def calc_degas_ca(sample: Sample):
189
189
  if not validate_params(**params_to_check):
190
190
  return
191
191
 
192
+ set_negative_zero = sample.TotalParam[101]
192
193
  corrDegasCa = sample.TotalParam[106]
193
- ar37ca = sample.CorrectedValues[2:4]
194
+ ar37ca = copy.deepcopy(sample.CorrectedValues[2:4])
195
+ ar37ca[0] = [0 if val < 0 and set_negative_zero[i] else val for i, val in enumerate(ar37ca[0])]
194
196
  ar39ca = calc.arr.mul_factor(ar37ca, sample.TotalParam[8:10], isRelative=True)
195
197
  ar38ca = calc.arr.mul_factor(ar37ca, sample.TotalParam[10:12], isRelative=True)
196
198
  ar36ca = calc.arr.mul_factor(ar37ca, sample.TotalParam[12:14], isRelative=True)
@@ -201,7 +203,6 @@ def calc_degas_ca(sample: Sample):
201
203
  sample.DegasValues[19] = [val if corrDegasCa[idx] else 0 for idx, val in enumerate(ar38ca[1])]
202
204
  sample.DegasValues[22] = [val if corrDegasCa[idx] else 0 for idx, val in enumerate(ar39ca[0])] # 39Ca
203
205
  sample.DegasValues[23] = [val if corrDegasCa[idx] else 0 for idx, val in enumerate(ar39ca[1])]
204
- sample.PublishValues[1] = copy.deepcopy(sample.DegasValues[8])
205
206
 
206
207
 
207
208
  # =======================
@@ -242,7 +243,6 @@ def calc_degas_k(sample: Sample):
242
243
  sample.DegasValues[17] = [val if corrDecasK[idx] else 0 for idx, val in enumerate(ar38k[1])]
243
244
  sample.DegasValues[30] = [val if corrDecasK[idx] else 0 for idx, val in enumerate(ar40k[0])]
244
245
  sample.DegasValues[31] = [val if corrDecasK[idx] else 0 for idx, val in enumerate(ar40k[1])]
245
- sample.PublishValues[3] = copy.deepcopy(sample.DegasValues[20])
246
246
 
247
247
 
248
248
  # =======================
@@ -351,7 +351,6 @@ def calc_degas_cl(sample: Sample):
351
351
 
352
352
  sample.DegasValues[6:8] = copy.deepcopy(ar36cl)
353
353
  sample.DegasValues[10:12] = copy.deepcopy(ar38cl)
354
- sample.PublishValues[2] = copy.deepcopy(sample.DegasValues[10])
355
354
 
356
355
 
357
356
  # =======================
@@ -408,7 +407,6 @@ def calc_degas_atm(sample: Sample):
408
407
  sample.DegasValues[13] = [val if corrDecasAtm[idx] else 0 for idx, val in enumerate(ar38a[1])]
409
408
  sample.DegasValues[26] = [val if corrDecasAtm[idx] else 0 for idx, val in enumerate(ar40a[0])] # Ar40a
410
409
  sample.DegasValues[27] = [val if corrDecasAtm[idx] else 0 for idx, val in enumerate(ar40a[1])]
411
- sample.PublishValues[0] = copy.deepcopy(sample.DegasValues[ 0])
412
410
 
413
411
 
414
412
  # =======================
@@ -439,7 +437,6 @@ def calc_degas_r(sample: Sample):
439
437
  ar40r = calc.arr.sub(ar40ar, sample.DegasValues[26:28])
440
438
  ar40r[0] = [0 if item < 0 and sample.TotalParam[101][index] else item for index, item in enumerate(ar40r[0])]
441
439
  sample.DegasValues[24:26] = copy.deepcopy(ar40r)
442
- sample.PublishValues[4] = copy.deepcopy(sample.DegasValues[24])
443
440
 
444
441
 
445
442
  def calc_degas_c(sample: Sample):
@@ -588,7 +585,8 @@ def calc_ratio(sample: Sample):
588
585
  calc.arr.rec_factor(sample.TotalParam[20:22], isRelative=True))
589
586
 
590
587
  sample.ApparentAgeValues[6] = ar40r_percent
591
- sample.PublishValues[7:11] = copy.deepcopy([*sample.ApparentAgeValues[6:8], *CaK])
588
+ sample.PublishValues[10:12] = copy.deepcopy(sample.ApparentAgeValues[0:2])
589
+ sample.PublishValues[14:18] = copy.deepcopy([*sample.ApparentAgeValues[6:8], *CaK])
592
590
 
593
591
  sample.IsochronValues[0:5], sample.IsochronValues[6:11] = calc_nor_inv_isochrons(sample)
594
592
  sample.IsochronValues[12:17], sample.IsochronValues[18:23], sample.IsochronValues[24:29] = \
@@ -629,13 +627,11 @@ def calc_ratio_monte_carlo(sample: Sample):
629
627
  # corrected
630
628
  sample.CorrectedValues = res[2 + 32 + 39:2 + 32 + 39 + 10]
631
629
  # publish
632
- sample.PublishValues[0] = copy.deepcopy(sample.DegasValues[ 0])
633
- sample.PublishValues[1] = copy.deepcopy(sample.DegasValues[ 8])
634
- sample.PublishValues[2] = copy.deepcopy(sample.DegasValues[10])
635
- sample.PublishValues[3] = copy.deepcopy(sample.DegasValues[20])
636
- sample.PublishValues[4] = copy.deepcopy(sample.DegasValues[24])
637
- sample.PublishValues[5:7] = copy.deepcopy(sample.ApparentAgeValues[2:4])
638
- sample.PublishValues[7:9] = copy.deepcopy(sample.ApparentAgeValues[6:8])
630
+ data = np.array(sample.CorrectedValues)
631
+ data[1:10:2] = data[1:10:2] = np.abs(np.divide(data[1:10:2], data[0:10:2])) * 100
632
+ sample.PublishValues[0:10] = copy.deepcopy(data.tolist())
633
+ sample.PublishValues[10:14] = copy.deepcopy(sample.ApparentAgeValues[0:4])
634
+ sample.PublishValues[14:16] = copy.deepcopy(sample.ApparentAgeValues[6:8])
639
635
 
640
636
 
641
637
  def monte_carlo_f(sample: Sample):
@@ -731,6 +727,10 @@ def monte_carlo_f(sample: Sample):
731
727
  R38v36a = np.transpose(sample.TotalParam[4:6])
732
728
  R36v38clp = np.transpose(sample.TotalParam[56:58])
733
729
 
730
+ R36v38cl = np.transpose(sample.TotalParam[18:20]) # ?
731
+ KCaFactor = np.transpose(sample.TotalParam[20:22])
732
+ KClFactor = np.transpose(sample.TotalParam[22:24])
733
+
734
734
  stand_time_year = np.transpose(sample.TotalParam[32])
735
735
  JNFactor = np.transpose(sample.TotalParam[136:138])
736
736
 
@@ -764,6 +764,8 @@ def monte_carlo_f(sample: Sample):
764
764
  L37ar=L37ar[i], L39ar=L39ar[i], L36cl=L36cl[i],
765
765
  MDF=MDF[i], stand_time_year=stand_time_year[i],
766
766
  JNFactor=JNFactor[i],
767
+ KCaFactor=KCaFactor[i],
768
+ KClFactor=KClFactor[i],
767
769
  blank_gain_corr=sample.TotalParam[111][i],
768
770
  MDF_method=sample.TotalParam[100][i],
769
771
  force_to_zero=sample.TotalParam[101][i],
ararpy/smp/export.py CHANGED
@@ -1219,7 +1219,7 @@ class WritingWorkbook:
1219
1219
  [(4, 11, 1), list(map(lambda x: 2*x, self.sample.ApparentAgeValues[3])), {'num_format': '± ' + self.default_fmt_prop['num_format']}],
1220
1220
  [(4, 12, 1), self.sample.ApparentAgeValues[6], {}],
1221
1221
  [(4, 13, 1), self.sample.ApparentAgeValues[7], {}],
1222
- [(4, 14, 1), self.sample.PublishValues[9], {}],
1222
+ [(4, 14, 1), self.sample.PublishValues[16], {}],
1223
1223
  [(4 + num_step, 0, 0), [''] * 15, {'bold': 1, 'top': 1}],
1224
1224
 
1225
1225
  [(5 + num_step, 0), "Table 2. 40Ar/39Ar age summary", {'bold': 1, 'align': 'left'}],
ararpy/smp/initial.py CHANGED
@@ -128,6 +128,8 @@ def initial(smp: Sample):
128
128
  smp.BlankIntercept = arr.create_arr((len(samples.BLANK_INTERCEPT_HEADERS) - 3, 0))
129
129
  smp.SampleIntercept = arr.create_arr((len(samples.SAMPLE_INTERCEPT_HEADERS) - 3, 0))
130
130
  smp.PublishValues = arr.create_arr((len(samples.PUBLISH_TABLE_HEADERS) - 3, 0))
131
+ smp.BlankCorrected = arr.create_arr((10, 0))
132
+ smp.MassDiscrCorrected = arr.create_arr((10, 0))
131
133
  smp.DecayCorrected = arr.create_arr((10, 0))
132
134
  smp.CorrectedValues = arr.create_arr((len(samples.CORRECTED_HEADERS) - 3, 0))
133
135
  smp.DegasValues = arr.create_arr((len(samples.DEGAS_HEADERS) - 3, 0))
ararpy/smp/sample.py CHANGED
@@ -52,24 +52,36 @@ DEGAS_HEADERS = [
52
52
  ]
53
53
  PUBLISH_TABLE_HEADERS = [
54
54
  'Sequence', '', 'Mark', # 0-2
55
- '\u00B3\u2076Ar[a]', '\u00B3\u2077Ar[Ca]', '\u00B3\u2078Ar[Cl]', # 2-4
56
- '\u00B3\u2079Ar[K]', '\u2074\u2070Ar[r]', # 5-6
57
- 'Apparent Age', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2079Ar[K]%', # 7-10
58
- 'Ca/K', '1\u03C3', # 11-12
55
+ '\u00B3\u2076Ar', '%1\u03C3',
56
+ '\u00B3\u2077Ar', '%1\u03C3',
57
+ '\u00B3\u2078Ar', '%1\u03C3',
58
+ '\u00B3\u2079Ar', '%1\u03C3',
59
+ '\u2074\u2070Ar', '%1\u03C3', # 3-12
60
+ '\u2074\u2070Ar/\u00B3\u2076Ar', '1\u03C3', # 13-14
61
+ 'Apparent Age', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2079Ar[K]%', # 15-18
62
+ 'Ca/K', '1\u03C3', # 19-20
59
63
  ]
60
64
  PUBLISH_TABLE_HEADERS_AIR = [
61
65
  'Sequence', '', 'Mark', # 0-2
62
- '\u00B3\u2076Ar[a]', '\u00B3\u2077Ar[Ca]', '\u00B3\u2078Ar[Cl]', # 2-4
63
- '\u00B3\u2079Ar[K]', '\u2074\u2070Ar[r]', # 5-6
64
- 'MDF', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 7-10
65
- 'Ca/K', '1\u03C3', # 11-12
66
+ '\u00B3\u2076Ar', '%1\u03C3',
67
+ '\u00B3\u2077Ar', '%1\u03C3',
68
+ '\u00B3\u2078Ar', '%1\u03C3',
69
+ '\u00B3\u2079Ar', '%1\u03C3',
70
+ '\u2074\u2070Ar', '%1\u03C3', # 3-12
71
+ '\u2074\u2070Ar/\u00B3\u2076Ar', '1\u03C3', # 13-14
72
+ 'MDF', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 15-18
73
+ 'Ca/K', '1\u03C3', # 19-20
66
74
  ]
67
75
  PUBLISH_TABLE_HEADERS_STD = [
68
76
  'Sequence', '', 'Mark', # 0-2
69
- '\u00B3\u2076Ar[a]', '\u00B3\u2077Ar[Ca]', '\u00B3\u2078Ar[Cl]', # 2-4
70
- '\u00B3\u2079Ar[K]', '\u2074\u2070Ar[r]', # 5-6
71
- 'J', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 7-10
72
- 'Ca/K', '1\u03C3', # 11-12
77
+ '\u00B3\u2076Ar', '%1\u03C3',
78
+ '\u00B3\u2077Ar', '%1\u03C3',
79
+ '\u00B3\u2078Ar', '%1\u03C3',
80
+ '\u00B3\u2079Ar', '%1\u03C3',
81
+ '\u2074\u2070Ar', '%1\u03C3', # 3-12
82
+ '\u2074\u2070Ar/\u00B3\u2076Ar', '1\u03C3', # 13-14
83
+ 'J', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 15-18
84
+ 'Ca/K', '1\u03C3', # 19-20
73
85
  ]
74
86
  SPECTRUM_TABLE_HEADERS = [
75
87
  'Sequence', '', 'Mark', # 0-2
@@ -200,9 +212,13 @@ DEGAS_SHORT_HEADERS = [
200
212
  ]
201
213
  PUBLISH_TABLE_SHORT_HEADERS = [
202
214
  'Seq', 'Label', 'Mark', # 0-2
203
- 'Ar36[a]', 'Ar37[Ca]', 'Ar38[Cl]',
204
- 'Ar39[K]', 'Ar40[r]', 'Apparent Age', '1s', 'Ar40r%',
205
- 'Ar39K%', 'Ca/K', '1s'
215
+ 'Ar36', '%1s',
216
+ 'Ar37', '%1s',
217
+ 'Ar38', '%1s',
218
+ 'Ar39', '%1s',
219
+ 'Ar40', '%1s',
220
+ 'Apparent Age', '1s', 'Ar40r%', 'Ar39K%',
221
+ 'Ca/K', '1s'
206
222
  ]
207
223
  SPECTRUM_TABLE_SHORT_HEADERS = [
208
224
  'Seq', 'Label', 'Mark', # 0-2
ararpy/smp/table.py CHANGED
@@ -12,6 +12,7 @@
12
12
  import ast
13
13
  import re
14
14
  import copy
15
+ import numpy as np
15
16
  from .. import calc
16
17
  from . import (sample as samples, basic)
17
18
 
@@ -46,13 +47,11 @@ def update_table_data(smp: Sample, only_table: str = None):
46
47
  elif key == '4':
47
48
  data = [smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.DegasValues]
48
49
  elif key == '5':
49
- smp.PublishValues[0] = copy.deepcopy(smp.DegasValues[ 0])
50
- smp.PublishValues[1] = copy.deepcopy(smp.DegasValues[ 8])
51
- smp.PublishValues[2] = copy.deepcopy(smp.DegasValues[10])
52
- smp.PublishValues[3] = copy.deepcopy(smp.DegasValues[20])
53
- smp.PublishValues[4] = copy.deepcopy(smp.DegasValues[24])
54
- smp.PublishValues[5:7] = copy.deepcopy(smp.ApparentAgeValues[2:4])
55
- smp.PublishValues[7:9] = copy.deepcopy(smp.ApparentAgeValues[6:8])
50
+ data = np.array(smp.CorrectedValues)
51
+ data[1:10:2] = np.abs(np.divide(data[1:10:2], data[0:10:2])) * 100
52
+ smp.PublishValues[0:10] = copy.deepcopy(data.tolist())
53
+ smp.PublishValues[10:14] = copy.deepcopy(smp.ApparentAgeValues[0:4])
54
+ smp.PublishValues[14:16] = copy.deepcopy(smp.ApparentAgeValues[6:8])
56
55
  data = [smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.PublishValues]
57
56
  elif key == '6':
58
57
  data = [smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.ApparentAgeValues]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ararpy
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A project for Ar-Ar geochronology
5
5
  Home-page: https://github.com/wuyangchn/ararpy.git
6
6
  Author: Yang Wu
@@ -5,13 +5,13 @@ ararpy/Example - Show MDD results.py,sha256=YFkiQual60lyCClsfvivr4REY6waSYuomf0u
5
5
  ararpy/Example - Show all Kfs age spectra.py,sha256=1edPtBpFfS0lC7vLnLu34mDHt_xjbc8ptk6rZ--pf-I,12304
6
6
  ararpy/Example - Show random walk results.py,sha256=8WWvbAI7ySiMR-XwtFe5kTQihW3mcqzL3S7EUZdoxYo,15477
7
7
  ararpy/Example - Tc calculation.py,sha256=sD9pu3IaZ8mBV95rV2wOEhlQUexFNqBUoBqnNMdUBis,19617
8
- ararpy/__init__.py,sha256=wz69XzhfcI0QMPU2QJ8gZoWEsG2vHeSE7b5E7GytwI0,6767
8
+ ararpy/__init__.py,sha256=dCyvAK_sTG0KYdq42pz1cfnl8pXamf04nr46e2fDKK0,6767
9
9
  ararpy/test.py,sha256=4F46-JJ1Ge12HGae0qO44Qc6kiEMHBgn2MsY_5LlHDo,3973
10
10
  ararpy/calc/__init__.py,sha256=kUjRuLE8TLuKOv3i976RnGJoEMj23QBZDu37LWs81U4,322
11
11
  ararpy/calc/age.py,sha256=WOZs70zXiBWDIEhXJLIaNiYTOFJNk0NDbH5e5zCbCks,5435
12
12
  ararpy/calc/arr.py,sha256=x6z16N2H6QFYAPY11lnPRFZsZfwWu2tSEo87q7M9Ym4,14869
13
13
  ararpy/calc/basic.py,sha256=AMQrhkNHhHtiguqTe4GPOYLuV8TEJBXpRJXJAoOwD9w,4634
14
- ararpy/calc/corr.py,sha256=qh77w1uJ98x6b_N-0_u1seWc7YLtCRClpxG6fuYHx-M,21667
14
+ ararpy/calc/corr.py,sha256=e9HGsD1GCS_Kv7X_dFYachBxAJgeKg2GP--fvZHedns,21609
15
15
  ararpy/calc/err.py,sha256=63LtprqjemlIb1QGDst4Ggcv5KMSDHdlAIL-nyQs1eA,2691
16
16
  ararpy/calc/histogram.py,sha256=0GVbDdsjd91KQ1sa2B7NtZ4KGo0XpRIJapgIrzAwQUo,5777
17
17
  ararpy/calc/isochron.py,sha256=ej9G2e68k6yszonWHsLcEubh3TA7eh1upTJP_X0ttAA,5726
@@ -42,32 +42,32 @@ ararpy/examples/sample-default.smp,sha256=YNkoQGgPrsL_fXS7ZHxfRtLQWekCDqT9czS6vB
42
42
  ararpy/files/__init__.py,sha256=l5B5ZQ01WdtvjjN0aMkyAFNgpwANdM_1I0tQbqnRuEY,69
43
43
  ararpy/files/arr_file.py,sha256=pD5MxkAydL7cNq2wmKFUaOU4jHhc3MzTYrwbxZ3f46w,881
44
44
  ararpy/files/basic.py,sha256=k2GXgZjhqSmKvpXQLjsXDksS_ZLvqD7AWW54fXnYvTI,1228
45
- ararpy/files/calc_file.py,sha256=CmZsgUj2t2FnLcCE38pbOqej7M-CbhQs6KMFXE3PbQA,29233
45
+ ararpy/files/calc_file.py,sha256=-CZXmlHVf65hKMLhwp6eSewbxzxywXcnpycoEeLDhZA,29304
46
46
  ararpy/files/new_file.py,sha256=efblARIBROVLWS2w3-98BxLX5VZ8grRpiTkJFtf_rAk,214
47
47
  ararpy/files/raw_file.py,sha256=X2_RjlNOUbdkA9MM2ZMNlZmGL7jc1-eV-Wy-bIu2bb0,20592
48
48
  ararpy/files/xls.py,sha256=DVcZ_yRnc19p-m4leGGjt-YPDpSa2udYKmGyrM0qub0,640
49
49
  ararpy/smp/EXPORT_TO_PDF_DATA_PROPERTIES.py,sha256=baDM437tu6hsPv0uYfod0TREXlPd6kvMBFT1S9ZZlkk,3024
50
50
  ararpy/smp/__init__.py,sha256=k6_fa27UJsQK7K7oC5GYlwMo6l0Xd8af3QtOrZz2XJk,478
51
- ararpy/smp/basic.py,sha256=uJJjQajTzg4X7tg4loTgg8ilvWJqBhZIYmIXY_F-VUQ,28601
51
+ ararpy/smp/basic.py,sha256=VLjNIlWh7mwVH9GBkOMOe7R7FX3fcTPXYSxF-SlMlt4,28579
52
52
  ararpy/smp/calculation.py,sha256=4Vg0HNbAGdTVdYIt17WeoKPmrTjmq9EqaP44P8AxT9U,2874
53
53
  ararpy/smp/consts.py,sha256=XIdjdz8cYxspG2jMnoItdlUsxr3hKbNFJjMZJh1bpzw,393
54
- ararpy/smp/corr.py,sha256=FBovb2T-pkrjq1OGVh0znYijQYw3BdRLTqoeHzUDHF4,38049
54
+ ararpy/smp/corr.py,sha256=foNC_7bRc0UBZtDOntu_73W7DvtvTchhufnEHqC2jAA,37896
55
55
  ararpy/smp/diffusion_funcs.py,sha256=X6LC1XY-vub5BpAuZMlyA5k3DQcU8Qqf5uukwGjJOxw,186690
56
- ararpy/smp/export.py,sha256=nJhyPtrbOYR30JncePNKR87IpCzVgy4wyo6FZ0kJMEY,120438
56
+ ararpy/smp/export.py,sha256=XnLKjWk4LFqtqXdy2qCUkOLy0vkjMq-X-tE9A545BVE,120439
57
57
  ararpy/smp/info.py,sha256=tpEIjrE4nR-GAYTricBk9gq0LuHh6F1Bt7HPo1rS2HM,497
58
- ararpy/smp/initial.py,sha256=hSDU3nptrECErDDgGcrLB0g7UmcnRshY_rv1YG0jdmw,19270
58
+ ararpy/smp/initial.py,sha256=5YHvhMBnpXtcTH-cIV7ENhy0tzP03oKIjNMA4fg_Dc0,19374
59
59
  ararpy/smp/json.py,sha256=zfJCC_2LCDckqC8Fpu10jEA6Knl3UtKO31I5g4fvsBE,2273
60
60
  ararpy/smp/plots.py,sha256=hU3VyAyEkR_3enWvMHfuL_Ajjg-cK9f7SUHBKwHkmVQ,32577
61
61
  ararpy/smp/raw.py,sha256=77J1dEYL4ZSeftp4tyog_Cy1Y5bwHNaLqJK4i4KLOSY,6500
62
- ararpy/smp/sample.py,sha256=tCDCAS_KgJy4qN1nCGWTikZfsBu5EV1giccLI3gRY5g,60066
62
+ ararpy/smp/sample.py,sha256=AqH3HJ0oQsUmbdPz7BFhzdt9UdpLf4FnlHMTNvqvgsU,60436
63
63
  ararpy/smp/style.py,sha256=kP1YnyAoVbKXfEARsrCiz0lTYipW3xEKqR4vIfuVNe4,8206
64
- ararpy/smp/table.py,sha256=9D1oGlYtoVgRte5lxOWYZbEManyudO5un-t7V6LQ-qg,7351
64
+ ararpy/smp/table.py,sha256=doL4t2KnlZd9dTFjRz4r1s5sj76CoGSJ8UiHfJd_FV8,7218
65
65
  ararpy/thermo/__init__.py,sha256=6VBuqTRFl403PVqOuMkVrut0nKaQsAosBmfW91X1dMg,263
66
66
  ararpy/thermo/arrhenius.py,sha256=Ass1ichHfqIAtpv8eLlgrUc1UOb3Urh1qzr1E3gLB4U,233
67
67
  ararpy/thermo/atomic_level_random_walk.py,sha256=ncw9DtxRfS6zlQbLVLNX7WNoO9sX_nSomwAsTH0_O3k,25910
68
68
  ararpy/thermo/basic.py,sha256=JJRZbYmvXlpRAV2FeFPwLhrig4ZhNQmJnWqgOjo-1YQ,11508
69
- ararpy-0.2.2.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
70
- ararpy-0.2.2.dist-info/METADATA,sha256=wvnw6khN1TWEJEGRbAunuJ3A95geGtqgvmAwCN7wGAc,24726
71
- ararpy-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
- ararpy-0.2.2.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
73
- ararpy-0.2.2.dist-info/RECORD,,
69
+ ararpy-0.2.3.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
70
+ ararpy-0.2.3.dist-info/METADATA,sha256=Zxw4VyknZZI6_KomWl7OlURNNpeLAyrI-vxPwGcRaqc,24726
71
+ ararpy-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
+ ararpy-0.2.3.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
73
+ ararpy-0.2.3.dist-info/RECORD,,
File without changes