ararpy 0.1.20__tar.gz → 0.1.21__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.
- {ararpy-0.1.20 → ararpy-0.1.21}/PKG-INFO +1 -1
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/__init__.py +1 -1
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/age.py +34 -36
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/basic.py +2 -1
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/corr.py +2 -2
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/sample.py +2 -2
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy.egg-info/PKG-INFO +1 -1
- {ararpy-0.1.20 → ararpy-0.1.21}/setup.py +1 -1
- {ararpy-0.1.20 → ararpy-0.1.21}/LICENSE +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/README.md +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/__init__.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/arr.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/basic.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/corr.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/err.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/histogram.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/isochron.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/jvalue.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/plot.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/raw_funcs.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/regression.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/calc/spectra.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/022_VU124-M11a.ahd +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/20WHA0103.age +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/22WHA0078.xls +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/22WHA0433.age +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/22WHA0433.arr +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/22WHA0433.full.xls +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/24WHN0001-51-592.XLS +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/AHD.input-filter +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/ArAr.calc +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/ArArCALC.age +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/NGX-600 - Copy.TXT +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/NGX-600.TXT +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/NGX-XLS.input-filter +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/Qtegra-exported-xls.input-filter +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/S01-239.csv +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/WH01.irra +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/WHA.pdf +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/raw_example.xls +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/examples/sample-default.smp +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/__init__.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/arr_file.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/basic.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/calc_file.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/new_file.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/raw_file.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/files/xls.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/EXPORT_TO_PDF_DATA_PROPERTIES.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/__init__.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/calculation.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/consts.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/diffusion_funcs.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/export.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/info.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/initial.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/json.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/plots.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/raw.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/style.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/smp/table.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/test.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/thermo/__init__.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/thermo/arrhenius.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/thermo/atomic_level_random_walk.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy/thermo/basic.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy.egg-info/SOURCES.txt +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy.egg-info/dependency_links.txt +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/ararpy.egg-info/top_level.txt +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/setup.cfg +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/tests/test.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/tests/test2.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/tests/test_error_correlation.py +0 -0
- {ararpy-0.1.20 → ararpy-0.1.21}/tests/test_regression_methods.py +0 -0
|
@@ -41,11 +41,13 @@ def calc_age_min(F, sF, **kwargs) -> tuple:
|
|
|
41
41
|
J = arr.array_as_float(kwargs.pop('J'))
|
|
42
42
|
sJ = arr.array_as_float(kwargs.pop('sJ') * J / 100)
|
|
43
43
|
A = arr.array_as_float(kwargs.pop('A'))
|
|
44
|
-
sA = arr.array_as_float(kwargs.pop('sA') * A / 100)
|
|
44
|
+
sA = arr.array_as_float(kwargs.pop('sA') * A / 100) # total A, A = Aec + (Ab+) + (Ab-). Ab- for Ca
|
|
45
45
|
Ae = arr.array_as_float(kwargs.pop('Ae'))
|
|
46
|
-
sAe = arr.array_as_float(kwargs.pop('sAe') * Ae / 100)
|
|
46
|
+
sAe = arr.array_as_float(kwargs.pop('sAe') * Ae / 100) # Aec
|
|
47
47
|
Ab = arr.array_as_float(kwargs.pop('Ab'))
|
|
48
|
-
sAb = arr.array_as_float(kwargs.pop('sAb') * Ab / 100)
|
|
48
|
+
sAb = arr.array_as_float(kwargs.pop('sAb') * Ab / 100) # Ab-
|
|
49
|
+
Abp = arr.array_as_float(kwargs.pop('Abp'))
|
|
50
|
+
sAbp = arr.array_as_float(kwargs.pop('sAbp') * Ab / 100) # Ab+
|
|
49
51
|
W = arr.array_as_float(kwargs.pop('W'))
|
|
50
52
|
sW = arr.array_as_float(kwargs.pop('sW') * W / 100)
|
|
51
53
|
Y = arr.array_as_float(kwargs.pop('Y'))
|
|
@@ -62,21 +64,21 @@ def calc_age_min(F, sF, **kwargs) -> tuple:
|
|
|
62
64
|
sLb = arr.array_as_float(kwargs.pop('sLb') * Lb / 100)
|
|
63
65
|
t = arr.array_as_float(kwargs.pop('t'))
|
|
64
66
|
st = arr.array_as_float(kwargs.pop('st'))
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
Ap = arr.array_as_float(kwargs.pop('Ap'))
|
|
68
|
+
sAp = arr.array_as_float(kwargs.pop('sAp') * Ap / 100)
|
|
69
|
+
Kp = arr.array_as_float(kwargs.pop('Kp'))
|
|
70
|
+
sKp = arr.array_as_float(kwargs.pop('sKp') * Kp / 100)
|
|
69
71
|
|
|
70
|
-
#
|
|
72
|
+
# calculating using Min et al.(2000) equation
|
|
71
73
|
# lmd = A * W * Y / (f * No)
|
|
72
74
|
V = f * No / ((Ab + Ae) * W * Y)
|
|
73
|
-
sf = 0
|
|
74
75
|
sV = pow((V / f * sf) ** 2 + (V / No * sNo) ** 2 + (V / (Ab + Ae)) ** 2 * (sAb ** 2 + sAe ** 2) +
|
|
75
76
|
(V / W * sW) ** 2 + (V / Y * sY) ** 2, 0.5)
|
|
77
|
+
|
|
76
78
|
# standard age in year, change to Ma
|
|
77
79
|
t = t * 1000000
|
|
78
80
|
st = st * 1000000
|
|
79
|
-
# back-calculating Ar40/Ar39
|
|
81
|
+
# back-calculating Ar40/Ar39 of the standard
|
|
80
82
|
stdR = (np.exp(t * L) - 1) / J
|
|
81
83
|
# errors of standard age and decay constants were not applied
|
|
82
84
|
sStdR = pow((stdR / J) ** 2 * sJ ** 2, 0.5)
|
|
@@ -85,31 +87,27 @@ def calc_age_min(F, sF, **kwargs) -> tuple:
|
|
|
85
87
|
sR_1 = np.sqrt((sF / stdR) ** 2 + (F * sStdR / stdR ** 2) ** 2) # errors of measured 40Ar/39Ar and J value
|
|
86
88
|
sR_2 = np.sqrt((sF / stdR) ** 2) # error of measured 40Ar/39Ar only
|
|
87
89
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
useStandardAge = True
|
|
91
|
+
if useStandardAge:
|
|
92
|
+
# ln part in Min 2000 equation
|
|
93
|
+
BB = 1
|
|
94
|
+
KK = np.exp(t / V) - 1 # 40Arr / 40K Use standard age
|
|
95
|
+
else: # use Ar40* and K concentrations of primary standard
|
|
96
|
+
# not fanished, this function is wrong
|
|
97
|
+
BB = (Ab + Ae) / Ae
|
|
98
|
+
KK = Ap / Kp / f
|
|
99
|
+
raise TypeError(f"Not use standard age. Not supported.")
|
|
100
|
+
|
|
90
101
|
XX = BB * KK * R + 1
|
|
91
102
|
k0 = V * np.log(XX)
|
|
92
|
-
|
|
93
|
-
e2 = (np.log(XX) * V / No) ** 2 * sNo ** 2 # sNo
|
|
94
|
-
e3 = (-1 * np.log(XX) * V / A + BB * KK * R / (A * XX)) ** 2 * sAb ** 2 # sAb
|
|
95
|
-
e4 = (-1 * np.log(XX) * V / A - Ab * KK * R / (Ae ** 2 * XX)) ** 2 * sAe ** 2 # sAe
|
|
96
|
-
e5 = (-1 * np.log(XX) * V / W - V * BB * KK * R / (W * XX)) ** 2 * sW ** 2 # sW
|
|
97
|
-
e6 = (np.log(XX) * V / Y) ** 2 * sY ** 2 # sY
|
|
98
|
-
e7 = (V * BB * KK / XX) ** 2 * sR_1 ** 2 # sR
|
|
99
|
-
# e8 = (V * BB * KK * R / (Ap * XX)) ** 2 * sAp ** 2 # sAp
|
|
100
|
-
# e9 = (V * BB * KK * R / (Kp * XX)) ** 2 * sKp ** 2 # sKp
|
|
101
|
-
e8, e9 = 0, 0
|
|
102
|
-
# useDecayConst = False
|
|
103
|
-
# if useDecayConst: # k0 = log(L / Le * KK * R + 1) / L
|
|
104
|
-
# e1 = (V * BB * KK * R / (f * XX)) ** 2 * sf ** 2
|
|
105
|
-
# e2 = 0
|
|
106
|
-
# e3 = (-1 * np.log(XX) * V / L + BB * KK * R / (L * XX)) ** 2 * sLb ** 2
|
|
107
|
-
# e4 = (-1 * np.log(XX) * V / L - Lb * KK * R / (Le ** 2 * XX)) ** 2 * sLe ** 2
|
|
108
|
-
# e5 = (V * BB * KK * R / (W * XX)) ** 2 * sW ** 2
|
|
109
|
-
# e6 = 0
|
|
110
|
-
useStandardAge = True
|
|
103
|
+
|
|
111
104
|
if useStandardAge:
|
|
112
|
-
|
|
105
|
+
# k0 = V * ln(exp(t/V) - 1 * R + 1)
|
|
106
|
+
e1 = (np.log(XX) - R * (KK + 1) * t / (V * XX)) ** 2 * sV ** 2 # sV
|
|
107
|
+
e2 = (BB * (KK + 1) * R / XX) ** 2 * st ** 2 # st
|
|
108
|
+
e3 = (V * BB * KK / XX) ** 2 * sR_1 ** 2 # sR
|
|
109
|
+
else:
|
|
110
|
+
e1, e2, e3 = 0, 0, 0
|
|
113
111
|
|
|
114
112
|
# change to Ma
|
|
115
113
|
# analytical error, error of 40Ar/39Ar only
|
|
@@ -117,7 +115,7 @@ def calc_age_min(F, sF, **kwargs) -> tuple:
|
|
|
117
115
|
# internal error, errors of 40Ar/39Ar and J value
|
|
118
116
|
s2 = np.sqrt((V * KK * BB / XX) ** 2 * sR_1 ** 2)
|
|
119
117
|
# total external error
|
|
120
|
-
s3 = np.sqrt(e1 + e2 + e3
|
|
118
|
+
s3 = np.sqrt(e1 + e2 + e3)
|
|
121
119
|
age = k0
|
|
122
120
|
return age, s1, s2, s3
|
|
123
121
|
|
|
@@ -146,7 +144,7 @@ def calc_age_general(F, sF, J, sJ, L, sL, **kwargs):
|
|
|
146
144
|
v1 = sF ** 2 * (J / (L * (1 + J * F))) ** 2
|
|
147
145
|
v2 = sJ ** 2 * (F / (L * (1 + J * F))) ** 2
|
|
148
146
|
v3 = sL ** 2 * (np.log(1 + J * F) / (L ** 2)) ** 2
|
|
149
|
-
s1 = v1 ** .5 # analytical error
|
|
150
|
-
s2 = (v1 + v2) ** .5 # internal error
|
|
151
|
-
s3 = (v1 + v2 + v3) ** .5 # full external error
|
|
147
|
+
s1 = v1 ** .5 # analytical error, F only
|
|
148
|
+
s2 = (v1 + v2) ** .5 # internal error, F and J
|
|
149
|
+
s3 = (v1 + v2 + v3) ** .5 # full external error. F, J and L
|
|
152
150
|
return age, s1, s2, s3
|
|
@@ -153,7 +153,8 @@ def calc_age(ar40ar39=None, params: dict = None, smp: Sample = None, index: list
|
|
|
153
153
|
"""
|
|
154
154
|
params_index_dict = {
|
|
155
155
|
34: 'L', 35: 'sL', 36: 'Le', 37: 'sLe', 38: 'Lb', 39: 'sLb', 48: 'A', 49: 'sA',
|
|
156
|
-
50: 'Ae', 51: 'sAe', 52: 'Ab', 53: 'sAb',
|
|
156
|
+
50: 'Ae', 51: 'sAe', 52: 'Ab', 53: 'sAb', 54: 'Abp', 55: 'sAbp', 59: 't', 60: 'st',
|
|
157
|
+
61: 'Ap', 62: 'sAp', 63: 'Kp', 64: 'sKp', 67: 'J', 68: 'sJ',
|
|
157
158
|
81: 'W', 82: 'sW', 83: 'No', 84: 'sNo', 85: 'Y', 86: 'sY', 87: 'f', 88: 'sf', 110: 'Min'
|
|
158
159
|
}
|
|
159
160
|
|
|
@@ -545,7 +545,7 @@ def monte_carlo_f(sample: Sample):
|
|
|
545
545
|
R36v38clp = np.transpose(sample.TotalParam[56:58])
|
|
546
546
|
|
|
547
547
|
stand_time_year = np.transpose(sample.TotalParam[32])
|
|
548
|
-
JNFactor = sample.NormalizeFactor
|
|
548
|
+
JNFactor = np.transpose(sample.NormalizeFactor)
|
|
549
549
|
|
|
550
550
|
irradiation_cycles = [list(filter(None, re.split(r'[DS]', each_step))) for each_step in sample.TotalParam[27]]
|
|
551
551
|
t1 = [re.findall(r"\d+", i) for i in sample.TotalParam[31]] # t1: experimental times
|
|
@@ -579,7 +579,7 @@ def monte_carlo_f(sample: Sample):
|
|
|
579
579
|
L37ar=L37ar[i], L39ar=L39ar[i], L36cl=L36cl[i],
|
|
580
580
|
MDFunc=None,
|
|
581
581
|
MDF=MDF[i], stand_time_year=stand_time_year[i],
|
|
582
|
-
JNFactor=JNFactor,
|
|
582
|
+
JNFactor=JNFactor[i],
|
|
583
583
|
blank_gain_corr=sample.TotalParam[111][i]
|
|
584
584
|
)
|
|
585
585
|
|
|
@@ -248,8 +248,8 @@ TOTAL_PARAMS_SHORT_HEADERS = [
|
|
|
248
248
|
'DAb-K40', '%1s', # 54-55
|
|
249
249
|
'DAb+K40', '%1s', # 56-57
|
|
250
250
|
'Cl36/Cl38P', '%1s', # 58-59
|
|
251
|
-
'StdName', 'StdAge', '1s', 'Ar40%', '1s', 'K%', '1s',
|
|
252
|
-
'F', '1s', #
|
|
251
|
+
'StdName', 'StdAge', '1s', 'Ar40%', '1s', 'K%', '1s', # 60-66
|
|
252
|
+
'F', '1s', # 67-68
|
|
253
253
|
'J', '%1s', 'MDF', '%1s', # 69-72
|
|
254
254
|
'MassAr36', '%1s', 'MassAr37', '%1s',
|
|
255
255
|
'MassAr38', '%1s', 'MassAr39', '%1s',
|
|
@@ -16,7 +16,7 @@ long_description = (here / 'README.md').read_text(encoding='utf-8')
|
|
|
16
16
|
|
|
17
17
|
setuptools.setup(
|
|
18
18
|
name='ararpy', #
|
|
19
|
-
version='0.1.
|
|
19
|
+
version='0.1.21', # version
|
|
20
20
|
author='Yang Wu',
|
|
21
21
|
author_email='wuycug@hotmail.com',
|
|
22
22
|
description='A project for Ar-Ar geochronology', # short description
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|