ararpy 0.1.36__py3-none-any.whl → 0.1.37__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 +2 -3
- ararpy/calc/basic.py +12 -0
- ararpy/calc/regression.py +128 -33
- ararpy/files/raw_file.py +79 -70
- ararpy/smp/info.py +2 -2
- ararpy/smp/initial.py +14 -11
- ararpy/smp/json.py +2 -2
- ararpy/smp/raw.py +4 -4
- ararpy/smp/sample.py +4 -15
- ararpy/smp/style.py +4 -1
- {ararpy-0.1.36.dist-info → ararpy-0.1.37.dist-info}/METADATA +1 -1
- {ararpy-0.1.36.dist-info → ararpy-0.1.37.dist-info}/RECORD +15 -15
- {ararpy-0.1.36.dist-info → ararpy-0.1.37.dist-info}/WHEEL +0 -0
- {ararpy-0.1.36.dist-info → ararpy-0.1.37.dist-info}/licenses/LICENSE +0 -0
- {ararpy-0.1.36.dist-info → ararpy-0.1.37.dist-info}/top_level.txt +0 -0
ararpy/__init__.py
CHANGED
|
@@ -16,10 +16,10 @@ from . import calc, smp, files, thermo, test
|
|
|
16
16
|
""" Information """
|
|
17
17
|
|
|
18
18
|
name = 'ararpy'
|
|
19
|
-
version = '0.1.
|
|
19
|
+
version = '0.1.37'
|
|
20
20
|
__version__ = version
|
|
21
21
|
full_version = version
|
|
22
|
-
last_update = '2025-12-
|
|
22
|
+
last_update = '2025-12-12'
|
|
23
23
|
|
|
24
24
|
""" ArArPy Functions """
|
|
25
25
|
|
|
@@ -141,6 +141,5 @@ RawData.get_sequence = smp.raw.get_sequence
|
|
|
141
141
|
RawData.to_sample = smp.initial.from_raw_data
|
|
142
142
|
RawData.get_unknown = lambda _raw: smp.raw.get_sequence(_raw, True, 'is_unknown', unique=False)
|
|
143
143
|
RawData.get_blank = lambda _raw: smp.raw.get_sequence(_raw, True, 'is_blank', unique=False)
|
|
144
|
-
RawData.get_air = lambda _raw: smp.raw.get_sequence(_raw, True, 'is_air', unique=False)
|
|
145
144
|
Sequence.get_data_df = lambda _seq: pd.DataFrame(_seq.data)
|
|
146
145
|
Sequence.get_flag_df = lambda _seq: pd.DataFrame(_seq.flag)
|
ararpy/calc/basic.py
CHANGED
|
@@ -57,6 +57,18 @@ def get_datetime(t_year: int, t_month: int, t_day: int, t_hour: int, t_min: int,
|
|
|
57
57
|
return ts - base
|
|
58
58
|
|
|
59
59
|
|
|
60
|
+
def get_timestring(timestamp: int = 0, base=None):
|
|
61
|
+
"""
|
|
62
|
+
:param timestamp: timestamp (utz)
|
|
63
|
+
:param base: base time [y, m, d, h, m]
|
|
64
|
+
:return:
|
|
65
|
+
"""
|
|
66
|
+
if base is None:
|
|
67
|
+
base = [1970, 1, 1, 0, 0]
|
|
68
|
+
ts = timestamp + datetime(*base, tzinfo=timezone.utc).timestamp()
|
|
69
|
+
return datetime.fromtimestamp(ts, tz=timezone.utc).isoformat(timespec='seconds')
|
|
70
|
+
|
|
71
|
+
|
|
60
72
|
def merge_dicts(a: dict, b: dict):
|
|
61
73
|
"""
|
|
62
74
|
a and b, two dictionary. Return updated a
|
ararpy/calc/regression.py
CHANGED
|
@@ -513,7 +513,7 @@ def linest(a0: list, a1: list, *args):
|
|
|
513
513
|
args = [[1] * len(args[0]), *args]
|
|
514
514
|
return [sum([beta[i] * args[i][j] for i in range(len(beta))]) for j in range(len(args[0]))]
|
|
515
515
|
|
|
516
|
-
return beta[0], se_beta[0], rse_beta[0] * 100, r2, m_ssresid, beta,
|
|
516
|
+
return beta[0], se_beta[0], abs(rse_beta[0]) * 100, r2, m_ssresid, beta, cov_beta, get_adjusted_y, m_ssresid
|
|
517
517
|
|
|
518
518
|
|
|
519
519
|
def average(a0: list, a1=None):
|
|
@@ -538,12 +538,12 @@ def average(a0: list, a1=None):
|
|
|
538
538
|
m_ssresid = ssresid / df
|
|
539
539
|
r2 = ssreg / sstotal if sstotal != 0 else 1 # r2 = ssreg / sstotal
|
|
540
540
|
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
k6 = [[sum([(i - k0) ** 2 for i in a0]) / df]]
|
|
542
|
+
k1 = pow(k6[0][0], 0.5) # standard deviation
|
|
543
|
+
k2 = k1 / abs(k0) * 100 if k0 != 0 else 0 # relative standard error
|
|
543
544
|
k3 = r2 # determination coefficient
|
|
544
545
|
k4 = m_ssresid # 'MSWD'
|
|
545
546
|
k5 = [k0]
|
|
546
|
-
k6 = [k1]
|
|
547
547
|
k8 = m_ssresid
|
|
548
548
|
|
|
549
549
|
def get_adjusted_y(x: list):
|
|
@@ -740,7 +740,7 @@ def quadratic(a0: list, a1: list):
|
|
|
740
740
|
"""
|
|
741
741
|
# y = b + m1 * x + m2 * x ^ 2
|
|
742
742
|
k = list(linest(a0, a1, [i ** 2 for i in a1]))
|
|
743
|
-
|
|
743
|
+
[b, m1, m2] = k[5]
|
|
744
744
|
|
|
745
745
|
def get_adjusted_y(x: list):
|
|
746
746
|
return [b + m1 * _x + m2 * _x ** 2 for _x in x]
|
|
@@ -759,7 +759,7 @@ def polynomial(a0: list, a1: list, degree: int = 5):
|
|
|
759
759
|
"""
|
|
760
760
|
# y = b + m1 * x + m2 * x ^ 2 + ... + m[n] * x ^ n
|
|
761
761
|
k = list(linest(a0, *[[j ** (i + 1) for j in a1] for i in range(degree)]))
|
|
762
|
-
|
|
762
|
+
beta = k[5]
|
|
763
763
|
|
|
764
764
|
def get_adjusted_y(x: list):
|
|
765
765
|
return [sum([beta[i] * _x ** i for i in range(degree + 1)]) for _x in x]
|
|
@@ -769,6 +769,7 @@ def polynomial(a0: list, a1: list, degree: int = 5):
|
|
|
769
769
|
return k
|
|
770
770
|
|
|
771
771
|
|
|
772
|
+
### Deprecated
|
|
772
773
|
def logest(a0: list, a1: list):
|
|
773
774
|
"""
|
|
774
775
|
:param a0: known_y's, y = b * m ^ x
|
|
@@ -778,15 +779,19 @@ def logest(a0: list, a1: list):
|
|
|
778
779
|
# y = b * m ^ x, Microsoft Excel LOGEST function, ln(y) = ln(b) + ln(m) * x
|
|
779
780
|
a0 = [np.log(i) for i in a0] # ln(y)
|
|
780
781
|
linest_res = linest(a0, a1)
|
|
781
|
-
lnb, selnb, rseb, r2, mswd,
|
|
782
|
+
lnb, selnb, rseb, r2, mswd, beta, cov_beta = linest_res[0:7]
|
|
783
|
+
lnb, lnm = beta
|
|
784
|
+
selnb, selnm = np.diagonal(cov_beta) ** .5
|
|
785
|
+
|
|
782
786
|
b = np.exp(lnb)
|
|
783
787
|
m = np.exp(lnm)
|
|
784
788
|
sem = np.exp(lnm) * selnm
|
|
785
789
|
seb = np.exp(lnb) * selnb # Excel.Logest function do not consider the error propagation
|
|
786
|
-
rseb = seb / b * 100
|
|
790
|
+
rseb = seb / abs(b) * 100
|
|
787
791
|
return b, seb, rseb, r2, mswd, m, sem
|
|
788
792
|
|
|
789
793
|
|
|
794
|
+
### Deprecated
|
|
790
795
|
def power(a0: list, a1: list):
|
|
791
796
|
"""
|
|
792
797
|
:param a0: known_y's, y = a * x ^ b + c
|
|
@@ -844,7 +849,9 @@ def power(a0: list, a1: list):
|
|
|
844
849
|
raise IndexError
|
|
845
850
|
|
|
846
851
|
f = linest(a0, [_x ** b for _x in a1])
|
|
847
|
-
|
|
852
|
+
beta, cov_beta = f[5:7]
|
|
853
|
+
c, a = beta
|
|
854
|
+
sec, sea = np.diagonal(cov_beta) ** .5
|
|
848
855
|
|
|
849
856
|
calculated_y = [_pow_func(i, a, b, c) for i in a1]
|
|
850
857
|
resid = [(calculated_y[i] - a0[i]) ** 2 for i in range(len(a0))]
|
|
@@ -865,13 +872,34 @@ def power(a0: list, a1: list):
|
|
|
865
872
|
errfx = pow(sum([i ** 2 for i in a1]) / (dp * sum([i ** 2 for i in a1]) - sum(a1) ** 2), 0.5)
|
|
866
873
|
# seb = errfz * sey = errfz * ssresid / df -> se_intercept = sey * errfx = seb / errfz * errfx
|
|
867
874
|
se_intercept = sec / errfz * errfx
|
|
868
|
-
rse_intercept = se_intercept / intercept * 100
|
|
875
|
+
rse_intercept = se_intercept / abs(intercept) * 100
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
exp_beta = [a, b, c]
|
|
879
|
+
exp_cov_beta = [
|
|
880
|
+
[cov_beta[1][1], 0, cov_beta[1][0]],
|
|
881
|
+
[0, 0, 0],
|
|
882
|
+
[cov_beta[0][1], 0, cov_beta[0][0]],
|
|
883
|
+
]
|
|
869
884
|
|
|
870
885
|
return intercept, se_intercept, rse_intercept, r2, 'mswd', [a, b, c], 'se', \
|
|
871
886
|
lambda x: [_pow_func(i, a, b, c) for i in x], m_ssresid
|
|
872
887
|
|
|
873
888
|
|
|
874
889
|
def exponential(a0: list, a1: list):
|
|
890
|
+
try:
|
|
891
|
+
k = _exponential(a0, a1, newton_minimize_1d)
|
|
892
|
+
if k[2] > 100:
|
|
893
|
+
raise ValueError
|
|
894
|
+
if abs(k[0] - min(a0)) > 5 * (max(a0) - min(a0)):
|
|
895
|
+
raise ValueError
|
|
896
|
+
except Exception as e:
|
|
897
|
+
print(f"newton_minimize_1d failed, using grad minimize")
|
|
898
|
+
k = _exponential(a0, a1, grad_minimize)
|
|
899
|
+
return k
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
def _exponential(a0, a1, method):
|
|
875
903
|
|
|
876
904
|
X = np.array(a1)
|
|
877
905
|
Y = np.array(a0)
|
|
@@ -894,21 +922,18 @@ def exponential(a0: list, a1: list):
|
|
|
894
922
|
ssresid = sum(resid)
|
|
895
923
|
return ssresid
|
|
896
924
|
|
|
925
|
+
# 1阶
|
|
926
|
+
ini_f1 = linest(Y, X)
|
|
927
|
+
y_range = max(Y) - min(Y)
|
|
928
|
+
ini_b = ini_f1[5][1] / max(y_range, 1e-12)
|
|
929
|
+
# 2阶
|
|
930
|
+
ini_f2 = quadratic(Y, X)
|
|
931
|
+
ini_b *= np.sign(ini_f1[5][1]) * np.sign(ini_f2[5][2])
|
|
897
932
|
|
|
898
|
-
|
|
899
|
-
ini_b = ini_f[5][1]
|
|
900
|
-
|
|
901
|
-
# 替换原来的 minimize_scalar 部分
|
|
902
|
-
try:
|
|
903
|
-
b, count = newton_minimize_1d(_get_s, x0=ini_b, h=1e-5, tol=1e-8, max_iter=30)
|
|
904
|
-
except Exception as e:
|
|
905
|
-
# 使用 scipy 一维优化
|
|
906
|
-
res = minimize_scalar(_get_s, bounds=(-2, 2), method='bounded', options={'xatol': 1e-8})
|
|
907
|
-
b, count = res.x, res.nfev
|
|
908
|
-
|
|
909
|
-
# print(f"{b = }, {count = }")
|
|
933
|
+
b, count = method(_get_s, ini_b)
|
|
910
934
|
|
|
911
935
|
x = np.concatenate(([np.ones(len(a1))], [np.exp(b * np.array(a1))]), axis=0).transpose()
|
|
936
|
+
|
|
912
937
|
m, n = x.shape # number of data, number of unknown x
|
|
913
938
|
try:
|
|
914
939
|
inv_xtx = np.linalg.inv(np.matmul(x.transpose(), x))
|
|
@@ -932,11 +957,20 @@ def exponential(a0: list, a1: list):
|
|
|
932
957
|
intercept = a + c
|
|
933
958
|
se_intercept = pow(sa ** 2 + sc ** 2 + 2 * cov_beta[0][1] , 0.5)
|
|
934
959
|
|
|
935
|
-
|
|
960
|
+
exp_beta = [a, b, c]
|
|
961
|
+
exp_cov_beta = [
|
|
962
|
+
[cov_beta[1][1], 0, cov_beta[1][0]],
|
|
963
|
+
[0, 0, 0],
|
|
964
|
+
[cov_beta[0][1], 0, cov_beta[0][0]],
|
|
965
|
+
]
|
|
966
|
+
|
|
967
|
+
# print(f"{b = }, {a = }, {c = }, {count = }, {ssresid = }, {r2 = }")
|
|
968
|
+
|
|
969
|
+
return intercept, se_intercept, se_intercept / abs(intercept) * 100, r2, m_ssresid, exp_beta, exp_cov_beta, \
|
|
936
970
|
lambda x: [_exp_func(xi, a, b, c) for xi in x], m_ssresid
|
|
937
971
|
|
|
938
972
|
|
|
939
|
-
def newton_minimize_1d(func, x0, h=1e-5, tol=1e-8, max_iter=
|
|
973
|
+
def newton_minimize_1d(func, x0, h=1e-5, tol=1e-8, max_iter=30):
|
|
940
974
|
x = x0
|
|
941
975
|
for i in range(max_iter):
|
|
942
976
|
fx = func(x)
|
|
@@ -948,14 +982,12 @@ def newton_minimize_1d(func, x0, h=1e-5, tol=1e-8, max_iter=20):
|
|
|
948
982
|
f_minus = func(x - h)
|
|
949
983
|
if not (np.isfinite(f_plus) and np.isfinite(f_minus)):
|
|
950
984
|
raise ValueError("Newton Minimize: Non-finite values in derivative computation")
|
|
951
|
-
|
|
952
985
|
df = (f_plus - f_minus) / (2 * h)
|
|
953
986
|
d2f = (f_plus - 2 * fx + f_minus) / (h * h)
|
|
954
987
|
|
|
955
988
|
# 牛顿步长
|
|
956
989
|
if abs(d2f) < 1e-12: # 避免除零或平坦区域
|
|
957
|
-
|
|
958
|
-
break
|
|
990
|
+
raise ValueError("Newton Minimize: Second derivative too small, stopping.")
|
|
959
991
|
|
|
960
992
|
step = df / d2f
|
|
961
993
|
x_new = x - step
|
|
@@ -966,15 +998,51 @@ def newton_minimize_1d(func, x0, h=1e-5, tol=1e-8, max_iter=20):
|
|
|
966
998
|
|
|
967
999
|
x = x_new
|
|
968
1000
|
|
|
1001
|
+
if i + 1 == max_iter:
|
|
1002
|
+
raise ValueError("Newton Minimize: Over iteration max_iter={}".format(max_iter))
|
|
1003
|
+
|
|
969
1004
|
return x, i + 1
|
|
970
1005
|
|
|
1006
|
+
|
|
1007
|
+
def grad_minimize(func, x, lr=1e-5, tol=1e-8, max_iter=1000):
|
|
1008
|
+
|
|
1009
|
+
for i in range(max_iter):
|
|
1010
|
+
f_plus = func(x + lr)
|
|
1011
|
+
f_minus = func(x - lr)
|
|
1012
|
+
if not (np.isfinite(f_plus) and np.isfinite(f_minus)):
|
|
1013
|
+
raise ValueError("Newton Minimize: Non-finite values in derivative computation")
|
|
1014
|
+
g = (f_plus - f_minus) / (2 * lr)
|
|
1015
|
+
x_new = x - lr * g
|
|
1016
|
+
if abs(func(x_new) - func(x)) < tol:
|
|
1017
|
+
break
|
|
1018
|
+
x = x_new
|
|
1019
|
+
return x, i+1
|
|
1020
|
+
|
|
1021
|
+
|
|
971
1022
|
""" line functions """
|
|
972
1023
|
|
|
973
1024
|
|
|
974
|
-
def
|
|
1025
|
+
def linest_var(beta: list, cov: list, x: float):
|
|
975
1026
|
""" y = b0 * x^0 + b1 * x^1 + ... + bn * x^n
|
|
976
1027
|
Parameters
|
|
977
1028
|
----------
|
|
1029
|
+
|
|
1030
|
+
Returns
|
|
1031
|
+
-------
|
|
1032
|
+
|
|
1033
|
+
"""
|
|
1034
|
+
beta = np.array(beta, dtype=np.float64)
|
|
1035
|
+
cov_matrix = np.array(cov, dtype=np.float64)
|
|
1036
|
+
g = np.array([x ** k for k in range(len(beta))]).reshape(-1, 1)
|
|
1037
|
+
y = np.dot(g.T, beta.reshape(-1, 1))[0, 0]
|
|
1038
|
+
var = np.matmul(np.matmul(g.T, cov_matrix), g)[0, 0]
|
|
1039
|
+
return y, var
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
def quadratic_var(beta: list, cov: list, x: float):
|
|
1043
|
+
""" y = b0 * x^0 + b1 * x^1 + b2 * x^2
|
|
1044
|
+
Parameters
|
|
1045
|
+
----------
|
|
978
1046
|
beta : coefficients
|
|
979
1047
|
x :
|
|
980
1048
|
|
|
@@ -982,21 +1050,48 @@ def linear_eq(x: list, beta: list):
|
|
|
982
1050
|
-------
|
|
983
1051
|
|
|
984
1052
|
"""
|
|
985
|
-
|
|
1053
|
+
beta = np.array(beta, dtype=np.float64)
|
|
1054
|
+
cov_matrix = np.array(cov, dtype=np.float64)
|
|
1055
|
+
g = np.array([x ** k for k in range(len(beta))]).reshape(-1, 1)
|
|
1056
|
+
y = np.dot(g.T, beta.reshape(-1, 1))[0, 0]
|
|
1057
|
+
var = np.matmul(np.matmul(g.T, cov_matrix), g)[0, 0]
|
|
1058
|
+
return y, var
|
|
986
1059
|
|
|
987
1060
|
|
|
988
|
-
def
|
|
989
|
-
""" y =
|
|
1061
|
+
def average_var(beta: list, cov: list, x: float):
|
|
1062
|
+
""" y = b0 * x^0 + b1 * x^1 + ... + bn * x^n
|
|
990
1063
|
Parameters
|
|
991
1064
|
----------
|
|
992
|
-
beta : coefficients
|
|
1065
|
+
beta : coefficients
|
|
993
1066
|
x :
|
|
994
1067
|
|
|
995
1068
|
Returns
|
|
996
1069
|
-------
|
|
997
1070
|
|
|
998
1071
|
"""
|
|
999
|
-
|
|
1072
|
+
y, = beta
|
|
1073
|
+
var = np.array(cov, dtype=np.float64)[0, 0]
|
|
1074
|
+
return y, var
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
def exponential_var(beta: list, cov: list, x: float):
|
|
1078
|
+
""" y = a * exp(bx) + c
|
|
1079
|
+
Parameters
|
|
1080
|
+
----------
|
|
1081
|
+
beta : coefficients, [a, b, c]
|
|
1082
|
+
cov : covariance [[], [], []]
|
|
1083
|
+
|
|
1084
|
+
Returns
|
|
1085
|
+
-------
|
|
1086
|
+
|
|
1087
|
+
"""
|
|
1088
|
+
cov_matrix = np.array(cov)
|
|
1089
|
+
a, b, c = beta
|
|
1090
|
+
k = np.exp(b*x)
|
|
1091
|
+
g = np.array([k, a*x*k, 1]).reshape(-1, 1)
|
|
1092
|
+
y = a * k + c
|
|
1093
|
+
var = np.matmul(np.matmul(g.T, cov_matrix), g)[0, 0]
|
|
1094
|
+
return y, var
|
|
1000
1095
|
|
|
1001
1096
|
|
|
1002
1097
|
def power_eq(x: list, beta: list):
|
ararpy/files/raw_file.py
CHANGED
|
@@ -212,7 +212,7 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
212
212
|
try:
|
|
213
213
|
return datetime.strptime(string, f)
|
|
214
214
|
except ValueError as v:
|
|
215
|
-
print(traceback.format_exc())
|
|
215
|
+
# print(traceback.format_exc())
|
|
216
216
|
if f.strip() == "":
|
|
217
217
|
return datetime_parser.parse(string)
|
|
218
218
|
elif len(v.args) > 0 and v.args[0].startswith('unconverted data remains: '):
|
|
@@ -229,8 +229,13 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
229
229
|
except (ValueError, TypeError):
|
|
230
230
|
return s
|
|
231
231
|
|
|
232
|
+
def step_type_parse(s: str):
|
|
233
|
+
if any([s.lower().__contains__(each) for each in ['blk', 'blank']]):
|
|
234
|
+
return "Blank"
|
|
235
|
+
return "Unknown"
|
|
236
|
+
|
|
232
237
|
step_list = []
|
|
233
|
-
|
|
238
|
+
step_idx = 0 # step_index rows
|
|
234
239
|
|
|
235
240
|
header = input_filter[5]
|
|
236
241
|
isotope_index = input_filter[8:28]
|
|
@@ -242,7 +247,7 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
242
247
|
while True: # measurment steps sloop
|
|
243
248
|
|
|
244
249
|
# ============ all text information ============
|
|
245
|
-
options = get_sample_info(file_contents, optional_info_index, default="", base=[1, 1 -
|
|
250
|
+
options = get_sample_info(file_contents, optional_info_index, default="", base=[1, 1 - step_idx, 1])
|
|
246
251
|
|
|
247
252
|
# ============ Step name ============
|
|
248
253
|
try:
|
|
@@ -269,7 +274,7 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
269
274
|
# ============ Step information ============
|
|
270
275
|
try:
|
|
271
276
|
if check_box_index[2]:
|
|
272
|
-
string = get_item(file_contents, strings_index[1:4], default="", base=[1, 1 -
|
|
277
|
+
string = get_item(file_contents, strings_index[1:4], default="", base=[1, 1 - step_idx, 1])
|
|
273
278
|
res = string_parser(strings_index[4], string)
|
|
274
279
|
if res is not None:
|
|
275
280
|
options.update(dict(zip(DEFAULT_SAMPLE_INFO.keys(), [res.named.get(value, options.get(key)) for key, value in DEFAULT_SAMPLE_INFO.items()])))
|
|
@@ -304,6 +309,15 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
304
309
|
print(traceback.format_exc())
|
|
305
310
|
raise ValueError(f"Failed to parse zero datetime: {e}")
|
|
306
311
|
# zero_datetime = datetime(1970, 1, 1, 0, 0, 0).isoformat(timespec='seconds')
|
|
312
|
+
|
|
313
|
+
# ============== Step Type =============
|
|
314
|
+
step_type = step_type_parse(options.get("StepType")) # blank or unknown
|
|
315
|
+
options.update({'StepType': step_type})
|
|
316
|
+
|
|
317
|
+
# ============== Step Type =============
|
|
318
|
+
exp_type = options.get("ExpType") # crushing, laser, heating, air
|
|
319
|
+
options.update({'ExpType': exp_type})
|
|
320
|
+
|
|
307
321
|
current_step = [[step_name, zero_datetime, options]]
|
|
308
322
|
|
|
309
323
|
# ============ isotope data ============
|
|
@@ -317,9 +331,11 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
317
331
|
break_num += 1
|
|
318
332
|
continue
|
|
319
333
|
break_num = 0
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
334
|
+
try:
|
|
335
|
+
if int(data_index[2]) == 0: # == 0, vertical
|
|
336
|
+
start_row = data_index[24] * cycle_num + data_index[25] * cycle_num + header + step_idx
|
|
337
|
+
if check_box_index[0] and start_row - step_idx - header >= data_index[28]:
|
|
338
|
+
break
|
|
323
339
|
current_step.append([
|
|
324
340
|
str(cycle_num + 1),
|
|
325
341
|
# in sequence: Ar36, Ar37, Ar38, Ar39, Ar40
|
|
@@ -334,45 +350,38 @@ def get_raw_data(file_contents: List[List[Union[int, float, str, bool, list]]],
|
|
|
334
350
|
float(data_content[start_row + isotope_index[ 2] - base][isotope_index[ 3] - base]),
|
|
335
351
|
float(data_content[start_row + isotope_index[ 0] - base][isotope_index[ 1] - base]) * f,
|
|
336
352
|
])
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
current_step.append([
|
|
341
|
-
str(cycle_num + 1), None, None, None, None, None, None, None, None, None, None,
|
|
342
|
-
])
|
|
343
|
-
elif int(data_index[2]) == 1: # == 1, horizontal
|
|
344
|
-
start_row = data_index[1] + idx
|
|
345
|
-
col_inc = data_index[24] * cycle_num + data_index[25] * cycle_num - base
|
|
346
|
-
try:
|
|
353
|
+
elif int(data_index[2]) == 1: # == 1, horizontal
|
|
354
|
+
start_row = data_index[1] + step_idx
|
|
355
|
+
col_inc = data_index[24] * cycle_num + data_index[25] * cycle_num
|
|
347
356
|
current_step.append([
|
|
348
357
|
str(cycle_num + 1),
|
|
349
358
|
# Ar36, Ar37, Ar38, Ar39, Ar40
|
|
350
|
-
float(data_content[start_row][isotope_index[19] + col_inc]),
|
|
351
|
-
float(data_content[start_row][isotope_index[17] + col_inc]) * f,
|
|
352
|
-
float(data_content[start_row][isotope_index[15] + col_inc]),
|
|
353
|
-
float(data_content[start_row][isotope_index[13] + col_inc]) * f,
|
|
354
|
-
float(data_content[start_row][isotope_index[11] + col_inc]),
|
|
355
|
-
float(data_content[start_row][isotope_index[ 9] + col_inc]) * f,
|
|
356
|
-
float(data_content[start_row][isotope_index[ 7] + col_inc]),
|
|
357
|
-
float(data_content[start_row][isotope_index[ 5] + col_inc]) * f,
|
|
358
|
-
float(data_content[start_row][isotope_index[ 3] + col_inc]),
|
|
359
|
-
float(data_content[start_row][isotope_index[ 1] + col_inc]) * f,
|
|
359
|
+
float(data_content[start_row][isotope_index[19] + col_inc - base]),
|
|
360
|
+
float(data_content[start_row][isotope_index[17] + col_inc - base]) * f,
|
|
361
|
+
float(data_content[start_row][isotope_index[15] + col_inc - base]),
|
|
362
|
+
float(data_content[start_row][isotope_index[13] + col_inc - base]) * f,
|
|
363
|
+
float(data_content[start_row][isotope_index[11] + col_inc - base]),
|
|
364
|
+
float(data_content[start_row][isotope_index[ 9] + col_inc - base]) * f,
|
|
365
|
+
float(data_content[start_row][isotope_index[ 7] + col_inc - base]),
|
|
366
|
+
float(data_content[start_row][isotope_index[ 5] + col_inc - base]) * f,
|
|
367
|
+
float(data_content[start_row][isotope_index[ 3] + col_inc - base]),
|
|
368
|
+
float(data_content[start_row][isotope_index[ 1] + col_inc - base]) * f,
|
|
360
369
|
])
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
370
|
+
else:
|
|
371
|
+
raise ValueError(f"{data_index[2]} not in [0, 1]")
|
|
372
|
+
except Exception as e:
|
|
373
|
+
print(f"Cannot parse isotope data")
|
|
374
|
+
# print(traceback.format_exc())
|
|
375
|
+
current_step.append([
|
|
376
|
+
str(cycle_num + 1), None, None, None, None, None, None, None, None, None, None,
|
|
377
|
+
])
|
|
369
378
|
|
|
370
379
|
cycle_num += 1
|
|
371
380
|
if cycle_num >= data_index[3]:
|
|
372
381
|
break
|
|
373
382
|
|
|
374
383
|
step_list.append(current_step)
|
|
375
|
-
|
|
384
|
+
step_idx = data_index[28] * len(step_list)
|
|
376
385
|
if not check_box_index[0] or len(step_list) >= 500: # check_box_index[0]: multiple sequences
|
|
377
386
|
# print(f"Multiple Sequence = {check_box_index[0]}, Step number = {len(step_list)}")
|
|
378
387
|
break
|
|
@@ -398,39 +407,39 @@ def get_sample_info(file_contents: list, index_list: list, default="", base: Uni
|
|
|
398
407
|
"""
|
|
399
408
|
sample_info = DEFAULT_SAMPLE_INFO.copy()
|
|
400
409
|
sample_info.update({
|
|
401
|
-
"ExpName": get_item(file_contents, index_list[0:3], default=default, base=base),
|
|
402
|
-
"StepName": get_item(file_contents, index_list[3:6], default=default, base=base),
|
|
403
|
-
"StepType": get_item(file_contents, index_list[6:9], default=default, base=base),
|
|
404
|
-
"StepLabel": get_item(file_contents, index_list[9:12], default=default, base=base),
|
|
405
|
-
"ZeroYear": get_item(file_contents, index_list[12:15], default=default, base=base),
|
|
406
|
-
"ZeroHour": get_item(file_contents, index_list[15:18], default=default, base=base),
|
|
407
|
-
"ZeroMon": get_item(file_contents, index_list[18:21], default=default, base=base),
|
|
408
|
-
"ZeroMin": get_item(file_contents, index_list[21:24], default=default, base=base),
|
|
409
|
-
"ZeroDay": get_item(file_contents, index_list[24:27], default=default, base=base),
|
|
410
|
-
"ZeroSec": get_item(file_contents, index_list[27:30], default=default, base=base),
|
|
411
|
-
"SmpName": get_item(file_contents, index_list[30:33], default=default, base=base),
|
|
412
|
-
"SmpLoc": get_item(file_contents, index_list[33:36], default=default, base=base),
|
|
413
|
-
"SmpMatr": get_item(file_contents, index_list[36:39], default=default, base=base),
|
|
414
|
-
"ExpType": get_item(file_contents, index_list[39:42], default=default, base=base),
|
|
415
|
-
"SmpWeight": get_item(file_contents, index_list[42:45], default=default, base=base),
|
|
416
|
-
"Stepunit": get_item(file_contents, index_list[45:48], default=default, base=base),
|
|
417
|
-
"HeatingTime": get_item(file_contents, index_list[48:51], default=default, base=base),
|
|
418
|
-
"InstrName": get_item(file_contents, index_list[51:54], default=default, base=base),
|
|
419
|
-
"Researcher": get_item(file_contents, index_list[54:57], default=default, base=base),
|
|
420
|
-
"Analyst": get_item(file_contents, index_list[57:60], default=default, base=base),
|
|
421
|
-
"Lab": get_item(file_contents, index_list[60:63], default=default, base=base),
|
|
422
|
-
"Jv": get_item(file_contents, index_list[63:66], default=default, base=base),
|
|
423
|
-
"Jsig": get_item(file_contents, index_list[66:69], default=default, base=base),
|
|
424
|
-
"MDF": get_item(file_contents, index_list[69:72], default=default, base=base),
|
|
425
|
-
"MDFSig": get_item(file_contents, index_list[72:75], default=default, base=base),
|
|
426
|
-
"CalcName": get_item(file_contents, index_list[75:78], default=default, base=base),
|
|
427
|
-
"IrraName": get_item(file_contents, index_list[78:81], default=default, base=base),
|
|
428
|
-
"IrraLabel": get_item(file_contents, index_list[81:84], default=default, base=base),
|
|
429
|
-
"IrraPosH": get_item(file_contents, index_list[84:87], default=default, base=base),
|
|
430
|
-
"IrraPosX": get_item(file_contents, index_list[87:90], default=default, base=base),
|
|
431
|
-
"IrraPosY": get_item(file_contents, index_list[90:93], default=default, base=base),
|
|
432
|
-
"StdName": get_item(file_contents, index_list[93:96], default=default, base=base),
|
|
433
|
-
"StdAge": get_item(file_contents, index_list[96:99], default=default, base=base),
|
|
434
|
-
"StdAgeSig": get_item(file_contents, index_list[99:102], default=default, base=base),
|
|
410
|
+
"ExpName": get_item(file_contents, index_list[0:3], default=default, base=base).strip(),
|
|
411
|
+
"StepName": get_item(file_contents, index_list[3:6], default=default, base=base).strip(),
|
|
412
|
+
"StepType": get_item(file_contents, index_list[6:9], default=default, base=base).strip(),
|
|
413
|
+
"StepLabel": get_item(file_contents, index_list[9:12], default=default, base=base).strip(),
|
|
414
|
+
"ZeroYear": get_item(file_contents, index_list[12:15], default=default, base=base).strip(),
|
|
415
|
+
"ZeroHour": get_item(file_contents, index_list[15:18], default=default, base=base).strip(),
|
|
416
|
+
"ZeroMon": get_item(file_contents, index_list[18:21], default=default, base=base).strip(),
|
|
417
|
+
"ZeroMin": get_item(file_contents, index_list[21:24], default=default, base=base).strip(),
|
|
418
|
+
"ZeroDay": get_item(file_contents, index_list[24:27], default=default, base=base).strip(),
|
|
419
|
+
"ZeroSec": get_item(file_contents, index_list[27:30], default=default, base=base).strip(),
|
|
420
|
+
"SmpName": get_item(file_contents, index_list[30:33], default=default, base=base).strip(),
|
|
421
|
+
"SmpLoc": get_item(file_contents, index_list[33:36], default=default, base=base).strip(),
|
|
422
|
+
"SmpMatr": get_item(file_contents, index_list[36:39], default=default, base=base).strip(),
|
|
423
|
+
"ExpType": get_item(file_contents, index_list[39:42], default=default, base=base).strip(),
|
|
424
|
+
"SmpWeight": get_item(file_contents, index_list[42:45], default=default, base=base).strip(),
|
|
425
|
+
"Stepunit": get_item(file_contents, index_list[45:48], default=default, base=base).strip(),
|
|
426
|
+
"HeatingTime": get_item(file_contents, index_list[48:51], default=default, base=base).strip(),
|
|
427
|
+
"InstrName": get_item(file_contents, index_list[51:54], default=default, base=base).strip(),
|
|
428
|
+
"Researcher": get_item(file_contents, index_list[54:57], default=default, base=base).strip(),
|
|
429
|
+
"Analyst": get_item(file_contents, index_list[57:60], default=default, base=base).strip(),
|
|
430
|
+
"Lab": get_item(file_contents, index_list[60:63], default=default, base=base).strip(),
|
|
431
|
+
"Jv": get_item(file_contents, index_list[63:66], default=default, base=base).strip(),
|
|
432
|
+
"Jsig": get_item(file_contents, index_list[66:69], default=default, base=base).strip(),
|
|
433
|
+
"MDF": get_item(file_contents, index_list[69:72], default=default, base=base).strip(),
|
|
434
|
+
"MDFSig": get_item(file_contents, index_list[72:75], default=default, base=base).strip(),
|
|
435
|
+
"CalcName": get_item(file_contents, index_list[75:78], default=default, base=base).strip(),
|
|
436
|
+
"IrraName": get_item(file_contents, index_list[78:81], default=default, base=base).strip(),
|
|
437
|
+
"IrraLabel": get_item(file_contents, index_list[81:84], default=default, base=base).strip(),
|
|
438
|
+
"IrraPosH": get_item(file_contents, index_list[84:87], default=default, base=base).strip(),
|
|
439
|
+
"IrraPosX": get_item(file_contents, index_list[87:90], default=default, base=base).strip(),
|
|
440
|
+
"IrraPosY": get_item(file_contents, index_list[90:93], default=default, base=base).strip(),
|
|
441
|
+
"StdName": get_item(file_contents, index_list[93:96], default=default, base=base).strip(),
|
|
442
|
+
"StdAge": get_item(file_contents, index_list[96:99], default=default, base=base).strip(),
|
|
443
|
+
"StdAgeSig": get_item(file_contents, index_list[99:102], default=default, base=base).strip(),
|
|
435
444
|
})
|
|
436
445
|
return sample_info
|
ararpy/smp/info.py
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
def name(smp, n: str = None):
|
|
17
17
|
if n is None:
|
|
18
|
-
return smp.Info.
|
|
18
|
+
return smp.Info.experiment.name
|
|
19
19
|
elif isinstance(n, str):
|
|
20
|
-
smp.Info.
|
|
20
|
+
smp.Info.experiment.name = n
|
|
21
21
|
return n
|
|
22
22
|
else:
|
|
23
23
|
raise ValueError(f"{n} is not a string")
|
ararpy/smp/initial.py
CHANGED
|
@@ -140,15 +140,18 @@ def initial(smp: Sample):
|
|
|
140
140
|
# Info
|
|
141
141
|
setattr(smp, 'Info', ArArBasic(
|
|
142
142
|
id='0', name='info', attr_name='Info', arr_version=samples.VERSION,
|
|
143
|
+
experiment=ArArBasic(
|
|
144
|
+
name='', type='', instrument='', mass_spec='', collectors='', step_num=0,
|
|
145
|
+
),
|
|
143
146
|
sample=ArArBasic(
|
|
144
147
|
name='SAMPLE NAME', material='MATERIAL', location='LOCATION', type='Unknown', method='',
|
|
145
|
-
sequence_unit='', weight=''
|
|
148
|
+
sequence_unit='', weight='',
|
|
146
149
|
),
|
|
147
150
|
researcher=ArArBasic(
|
|
148
|
-
name='RESEARCHER', addr='ADDRESS', email='EMAIL'
|
|
151
|
+
name='RESEARCHER', addr='ADDRESS', email='EMAIL',
|
|
149
152
|
),
|
|
150
153
|
laboratory=ArArBasic(
|
|
151
|
-
name='LABORATORY', addr='ADDRESS', email='EMAIL', info='INFORMATION', analyst='ANALYST'
|
|
154
|
+
name='LABORATORY', addr='ADDRESS', email='EMAIL', info='INFORMATION', analyst='ANALYST',
|
|
152
155
|
),
|
|
153
156
|
results=ArArBasic(
|
|
154
157
|
name='RESULTS', plateau_F=[], plateau_age=[], total_F=[], total_age=[],
|
|
@@ -184,9 +187,9 @@ def initial(smp: Sample):
|
|
|
184
187
|
name='REFERENCE', journal='JOURNAL', doi='DOI'
|
|
185
188
|
),
|
|
186
189
|
preference=copy.deepcopy(PREFERENCE_RES),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
)
|
|
190
|
+
irradiation= ArArBasic(
|
|
191
|
+
label='', pos_h='', pos_x='', pos_y='',
|
|
192
|
+
)
|
|
190
193
|
))
|
|
191
194
|
|
|
192
195
|
decimal_places = PREFERENCE_RES['decimalPlaces']
|
|
@@ -472,14 +475,14 @@ def from_raw_data(raw: RawData, mapping: Optional[List[dict]] = None) -> Sample:
|
|
|
472
475
|
for row in mapping:
|
|
473
476
|
row_unknown_intercept = []
|
|
474
477
|
row_blank_intercept = []
|
|
475
|
-
|
|
476
478
|
unknown: Sequence = raw.get_sequence(row['unknown'], flag='name')
|
|
477
|
-
|
|
479
|
+
try:
|
|
480
|
+
blank: Sequence = raw.get_sequence(row['blank'], flag='name')
|
|
481
|
+
if blank is None or blank == []: raise KeyError
|
|
482
|
+
except KeyError:
|
|
478
483
|
blank: Sequence = arr.filter(
|
|
479
|
-
raw.interpolated_blank, func=lambda seq: seq.datetime == unknown.datetime,
|
|
484
|
+
raw.interpolated_blank, func=lambda seq: seq.datetime == unknown.datetime and seq.name == row['blank'],
|
|
480
485
|
get=None, unique=True)
|
|
481
|
-
else:
|
|
482
|
-
blank: Sequence = raw.get_sequence(row['blank'], flag='name')
|
|
483
486
|
for i in range(5):
|
|
484
487
|
row_unknown_intercept = arr.multi_append(row_unknown_intercept, *unknown.results[i][int(unknown.fitting_method[i])][:2])
|
|
485
488
|
row_blank_intercept = arr.multi_append(row_blank_intercept, *blank.results[i][int(blank.fitting_method[i])][:2])
|
ararpy/smp/json.py
CHANGED
|
@@ -50,8 +50,8 @@ class MyEncoder(json.JSONEncoder):
|
|
|
50
50
|
Plot.Set, Plot.BasicAttr, RawData, Sequence, ArArBasic)):
|
|
51
51
|
if isinstance(obj, Sequence):
|
|
52
52
|
return dict(obj.__dict__, **{
|
|
53
|
-
'is_blank': obj.is_blank(), 'is_unknown': obj.is_unknown()
|
|
54
|
-
|
|
53
|
+
'is_blank': obj.is_blank(), 'is_unknown': obj.is_unknown()
|
|
54
|
+
})
|
|
55
55
|
return obj.__dict__
|
|
56
56
|
# Error
|
|
57
57
|
if isinstance(obj, BaseException):
|
ararpy/smp/raw.py
CHANGED
|
@@ -52,8 +52,9 @@ def to_raw(file_path: Union[str, List[str]], input_filter_path: Union[str, List[
|
|
|
52
52
|
data = res.get('data', None)
|
|
53
53
|
sequences = res.get('sequences', None)
|
|
54
54
|
sequence_num = len(data) if data is not None else len(sequences)
|
|
55
|
+
experiment_name = data[0][0][2]['ExpName'] if data is not None else file_name
|
|
55
56
|
fitting_method = [2, 0, 2, 2, 2] # 0 - linear, 1 - quadratic, 2 - exponential, 3 - power, 4 - average
|
|
56
|
-
raw = RawData(name=
|
|
57
|
+
raw = RawData(name=experiment_name, data=data, isotopic_num=10, sequence_num=sequence_num, source=[file_path],
|
|
57
58
|
sequence=sequences, unit=str(input_filter[30]), fitting_method=[*fitting_method])
|
|
58
59
|
else:
|
|
59
60
|
raise ValueError("File path and input filter should be both string or list with a same length.")
|
|
@@ -152,11 +153,10 @@ def do_regression(raw: RawData, sequence_index: Optional[List] = None, isotopic_
|
|
|
152
153
|
# unselected: list = [unselected[[isotopic_index*2 + 1, 2 * (isotopic_index + 1)]].dropna().values.tolist()
|
|
153
154
|
# for isotopic_index in list(range(5))]
|
|
154
155
|
|
|
155
|
-
for index,
|
|
156
|
+
for index, isotopic_data in enumerate(selected):
|
|
156
157
|
if hasattr(isotopic_index, '__getitem__') and index not in isotopic_index:
|
|
157
158
|
continue
|
|
158
|
-
|
|
159
|
-
res = raw_funcs.get_raw_data_regression_results(isotope)
|
|
159
|
+
res = raw_funcs.get_raw_data_regression_results(isotopic_data)
|
|
160
160
|
try:
|
|
161
161
|
sequence.results[index] = res[1]
|
|
162
162
|
sequence.coefficients[index] = res[2]
|
ararpy/smp/sample.py
CHANGED
|
@@ -1177,9 +1177,7 @@ class Sequence:
|
|
|
1177
1177
|
def as_type(self, type_str):
|
|
1178
1178
|
if str(type_str).lower() in ["blk", "b", "blank"]:
|
|
1179
1179
|
self.type_str = "blank"
|
|
1180
|
-
|
|
1181
|
-
self.type_str = "air"
|
|
1182
|
-
if self.type_str not in ["blank", "air"]:
|
|
1180
|
+
else:
|
|
1183
1181
|
self.type_str = "unknown"
|
|
1184
1182
|
|
|
1185
1183
|
__as_type = as_type
|
|
@@ -1188,10 +1186,7 @@ class Sequence:
|
|
|
1188
1186
|
return self.type_str == "blank"
|
|
1189
1187
|
|
|
1190
1188
|
def is_unknown(self):
|
|
1191
|
-
return self.type_str != "blank"
|
|
1192
|
-
|
|
1193
|
-
def is_air(self):
|
|
1194
|
-
return self.type_str == "air"
|
|
1189
|
+
return self.type_str != "blank"
|
|
1195
1190
|
|
|
1196
1191
|
def as_blank(self):
|
|
1197
1192
|
return self.as_type("blank")
|
|
@@ -1199,9 +1194,6 @@ class Sequence:
|
|
|
1199
1194
|
def as_unknown(self):
|
|
1200
1195
|
return self.as_type("unknown")
|
|
1201
1196
|
|
|
1202
|
-
def as_air(self):
|
|
1203
|
-
return self.as_type("air")
|
|
1204
|
-
|
|
1205
1197
|
def get_data_df(self):
|
|
1206
1198
|
...
|
|
1207
1199
|
|
|
@@ -1230,7 +1222,7 @@ class RawData:
|
|
|
1230
1222
|
self.unit = unit
|
|
1231
1223
|
self.isotopic_num = isotopic_num
|
|
1232
1224
|
self.sequence_num = sequence_num
|
|
1233
|
-
self.interpolated_blank =
|
|
1225
|
+
self.interpolated_blank = []
|
|
1234
1226
|
if sequence is not None:
|
|
1235
1227
|
self.sequence = sequence
|
|
1236
1228
|
elif data is not None:
|
|
@@ -1241,7 +1233,7 @@ class RawData:
|
|
|
1241
1233
|
data=item[1:],
|
|
1242
1234
|
datetime=item[0][1],
|
|
1243
1235
|
fitting_method=[*kwargs.get("fitting_method", [0] * 5)],
|
|
1244
|
-
options=item[0][2]
|
|
1236
|
+
options=item[0][2],
|
|
1245
1237
|
) for index, item in enumerate(data)]
|
|
1246
1238
|
else:
|
|
1247
1239
|
self.sequence: List[Sequence] = []
|
|
@@ -1275,8 +1267,5 @@ class RawData:
|
|
|
1275
1267
|
def get_blank(self) -> Union[Sequence, List]:
|
|
1276
1268
|
...
|
|
1277
1269
|
|
|
1278
|
-
def get_air(self) -> Union[Sequence, List]:
|
|
1279
|
-
...
|
|
1280
|
-
|
|
1281
1270
|
def to_sample(self, mapping: Optional[List[dict]]) -> Sample:
|
|
1282
1271
|
...
|
ararpy/smp/style.py
CHANGED
|
@@ -64,7 +64,10 @@ def set_plot_style(smp: Sample):
|
|
|
64
64
|
# Auto position and contents of texts
|
|
65
65
|
reset_text(smp)
|
|
66
66
|
# Set title, which are deleted in initializing
|
|
67
|
-
|
|
67
|
+
exp_name = smp.Info.experiment.name
|
|
68
|
+
smp_name = smp.Info.sample.name
|
|
69
|
+
name = f"{exp_name} {smp_name}" if str(exp_name).lower().strip() != str(smp_name).lower().strip() else exp_name
|
|
70
|
+
suffix = f"{name} {smp.Info.sample.material}"
|
|
68
71
|
for figure_id, figure in basic.get_components(smp).items():
|
|
69
72
|
if isinstance(figure, Plot):
|
|
70
73
|
if not hasattr(figure, 'title'):
|
|
@@ -5,12 +5,12 @@ 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=
|
|
8
|
+
ararpy/__init__.py,sha256=lguPXqCx66J1evLooyi_UF-O_dMUDWl4sH8z5VlpGns,6768
|
|
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=jD1Fd0Cj3xc7NqgnG4cp3VWQWxUlV0qCtPBZZokDG8o,15246
|
|
13
|
-
ararpy/calc/basic.py,sha256=
|
|
13
|
+
ararpy/calc/basic.py,sha256=2Iqk5WBMH8hiOqW2cvyPNEAbGU7hoeGTQ08Y6mlyfv8,4550
|
|
14
14
|
ararpy/calc/corr.py,sha256=QDitvLf6y5IBpHtVEJfOUVjWSlIP9qJ4Jhluk9eDEDE,18801
|
|
15
15
|
ararpy/calc/err.py,sha256=63LtprqjemlIb1QGDst4Ggcv5KMSDHdlAIL-nyQs1eA,2691
|
|
16
16
|
ararpy/calc/histogram.py,sha256=0GVbDdsjd91KQ1sa2B7NtZ4KGo0XpRIJapgIrzAwQUo,5777
|
|
@@ -18,7 +18,7 @@ ararpy/calc/isochron.py,sha256=ej9G2e68k6yszonWHsLcEubh3TA7eh1upTJP_X0ttAA,5726
|
|
|
18
18
|
ararpy/calc/jvalue.py,sha256=OL5zPYU8Pac-wOxUWPCgu3onh2n01xDnhpi2mlUsjJM,1146
|
|
19
19
|
ararpy/calc/plot.py,sha256=Hdtb-q18xYC8ZJeDKGRauCSbj4_7e6Z8HQs9aYgfvao,2139
|
|
20
20
|
ararpy/calc/raw_funcs.py,sha256=Rza1nIBQCOlJK_X0XvzmJqNG_byuaZxotNbdM84M-gI,2736
|
|
21
|
-
ararpy/calc/regression.py,sha256=
|
|
21
|
+
ararpy/calc/regression.py,sha256=m2_xJAsQ7mBIbnrmxtSPIQapJH61jkxvXskxN-8f86k,42803
|
|
22
22
|
ararpy/calc/spectra.py,sha256=_Q23eP9necHlaCoHf3_UfW1N3JmVZj5rcWFro8GS-CA,1995
|
|
23
23
|
ararpy/examples/022_VU124-M11a.ahd,sha256=3m0Gd-ZObou3KsnRNFMf77QwzT1Uz3nu3vA33Sqeyng,5414
|
|
24
24
|
ararpy/examples/20WHA0103.age,sha256=cT-a4d7Wt77aotx6v0G47vulY_TZIcZUcaVHB3pqTPM,380416
|
|
@@ -44,7 +44,7 @@ ararpy/files/arr_file.py,sha256=pD5MxkAydL7cNq2wmKFUaOU4jHhc3MzTYrwbxZ3f46w,881
|
|
|
44
44
|
ararpy/files/basic.py,sha256=k2GXgZjhqSmKvpXQLjsXDksS_ZLvqD7AWW54fXnYvTI,1228
|
|
45
45
|
ararpy/files/calc_file.py,sha256=bapIVd3QQBprdMdfxNbY8TJH1UkfphIUtim3ONypc3I,28779
|
|
46
46
|
ararpy/files/new_file.py,sha256=efblARIBROVLWS2w3-98BxLX5VZ8grRpiTkJFtf_rAk,214
|
|
47
|
-
ararpy/files/raw_file.py,sha256=
|
|
47
|
+
ararpy/files/raw_file.py,sha256=iaM53pUHD3-sIgrRA_jXNOn5KIdKxKLEur_0DxNVPLo,20445
|
|
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
|
|
@@ -54,20 +54,20 @@ ararpy/smp/consts.py,sha256=XIdjdz8cYxspG2jMnoItdlUsxr3hKbNFJjMZJh1bpzw,393
|
|
|
54
54
|
ararpy/smp/corr.py,sha256=U5K1Vld55IHea_fZ7EEY_8dkvjp0f6OhpdSxf7b9WGY,26551
|
|
55
55
|
ararpy/smp/diffusion_funcs.py,sha256=NC5T0GYXCidgVqSy3BGmIroLWzQhyzYb5x4gg_L0dJ4,186694
|
|
56
56
|
ararpy/smp/export.py,sha256=yAUlTvFBo2U703hZ79NlAcTYC7QZGXHUn_IRP7sQuRA,120638
|
|
57
|
-
ararpy/smp/info.py,sha256=
|
|
58
|
-
ararpy/smp/initial.py,sha256=
|
|
59
|
-
ararpy/smp/json.py,sha256=
|
|
57
|
+
ararpy/smp/info.py,sha256=tpEIjrE4nR-GAYTricBk9gq0LuHh6F1Bt7HPo1rS2HM,497
|
|
58
|
+
ararpy/smp/initial.py,sha256=4-ojO-_Dmuyt-W1Ueji3FYPSSAZrOZ2ZxyGxmar3Kn8,18203
|
|
59
|
+
ararpy/smp/json.py,sha256=zfJCC_2LCDckqC8Fpu10jEA6Knl3UtKO31I5g4fvsBE,2273
|
|
60
60
|
ararpy/smp/plots.py,sha256=fFuJxoFcnvGSysjdEdrbW_ITpukt0iGs2K25gshIKNU,33594
|
|
61
|
-
ararpy/smp/raw.py,sha256=
|
|
62
|
-
ararpy/smp/sample.py,sha256=
|
|
63
|
-
ararpy/smp/style.py,sha256=
|
|
61
|
+
ararpy/smp/raw.py,sha256=77J1dEYL4ZSeftp4tyog_Cy1Y5bwHNaLqJK4i4KLOSY,6500
|
|
62
|
+
ararpy/smp/sample.py,sha256=P3lh2kOThTGrtNNgPF02y6_9ORM6mAlMSwEsPxLQAwM,58566
|
|
63
|
+
ararpy/smp/style.py,sha256=y0iQpN4jy3PGy31DG5-_P1fNFGgyUNdsJX9qlYGVMEM,7979
|
|
64
64
|
ararpy/smp/table.py,sha256=Vq3GK9aslEuBhmvlQoUHjcs71Q6raSFYqd5veB1L9mk,6887
|
|
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.1.
|
|
70
|
-
ararpy-0.1.
|
|
71
|
-
ararpy-0.1.
|
|
72
|
-
ararpy-0.1.
|
|
73
|
-
ararpy-0.1.
|
|
69
|
+
ararpy-0.1.37.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
|
|
70
|
+
ararpy-0.1.37.dist-info/METADATA,sha256=CWUoNZxPs8oUAPXtcOFXxylMCwE21PMamMv_oEm-juM,24516
|
|
71
|
+
ararpy-0.1.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
72
|
+
ararpy-0.1.37.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
|
|
73
|
+
ararpy-0.1.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|