ararpy 0.1.15__py3-none-any.whl → 0.1.18__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 +1 -1
- ararpy/calc/age.py +7 -6
- ararpy/calc/basic.py +29 -0
- ararpy/calc/corr.py +30 -17
- ararpy/calc/regression.py +4 -3
- ararpy/files/calc_file.py +7 -6
- ararpy/smp/basic.py +50 -12
- ararpy/smp/corr.py +8 -6
- ararpy/smp/diffusion_funcs.py +73 -99
- ararpy/smp/export.py +216 -86
- ararpy/smp/initial.py +32 -27
- ararpy/smp/plots.py +7 -6
- ararpy/smp/sample.py +10 -6
- ararpy/smp/style.py +13 -5
- ararpy/smp/table.py +19 -21
- ararpy/{argon_diffusion_simulator → thermo}/__init__.py +1 -1
- ararpy/thermo/arrhenius.py +15 -0
- ararpy/{argon_diffusion_simulator/main.py → thermo/atomic_level_random_walk.py} +1 -1
- ararpy/thermo/basic.py +306 -0
- {ararpy-0.1.15.dist-info → ararpy-0.1.18.dist-info}/METADATA +5 -3
- {ararpy-0.1.15.dist-info → ararpy-0.1.18.dist-info}/RECORD +24 -22
- {ararpy-0.1.15.dist-info → ararpy-0.1.18.dist-info}/WHEEL +1 -1
- {ararpy-0.1.15.dist-info → ararpy-0.1.18.dist-info/licenses}/LICENSE +0 -0
- {ararpy-0.1.15.dist-info → ararpy-0.1.18.dist-info}/top_level.txt +0 -0
ararpy/smp/style.py
CHANGED
|
@@ -58,6 +58,13 @@ def set_plot_style(smp: Sample):
|
|
|
58
58
|
setattr(figure, 'title', Plot.Text())
|
|
59
59
|
setattr(getattr(figure, 'title'), 'text', f"{suffix} {getattr(figure, 'name', '')}")
|
|
60
60
|
|
|
61
|
+
age_unit = "Undefined"
|
|
62
|
+
try:
|
|
63
|
+
age_unit = str(smp.Info.preference['ageUnit']).capitalize()
|
|
64
|
+
except:
|
|
65
|
+
print(traceback.format_exc())
|
|
66
|
+
smp.AgeSpectraPlot.yaxis.title.text = f"Apparent Age ({age_unit})"
|
|
67
|
+
|
|
61
68
|
|
|
62
69
|
def reset_plot_scale(smp: Sample, only_figure: str = None):
|
|
63
70
|
"""
|
|
@@ -184,9 +191,10 @@ def set_table_style(sample: Sample):
|
|
|
184
191
|
for key, comp in basic.get_components(sample).items():
|
|
185
192
|
if isinstance(comp, Table):
|
|
186
193
|
comp.header = TABLEHEADER(index=int(comp.id))
|
|
187
|
-
comp.
|
|
188
|
-
comp.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
comp.set_coltypes()
|
|
195
|
+
# comp.colcount = len(comp.header)
|
|
196
|
+
# comp.coltypes = [{'type': 'numeric'}] * (comp.colcount)
|
|
197
|
+
# text_indexes = getattr(comp, 'text_indexes', [0]) if hasattr(comp, 'text_indexes') else [0]
|
|
198
|
+
# for i in text_indexes:
|
|
199
|
+
# comp.coltypes[i] = {'type': 'text'}
|
|
192
200
|
|
ararpy/smp/table.py
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
#
|
|
10
10
|
#
|
|
11
11
|
"""
|
|
12
|
+
import ast
|
|
13
|
+
import re
|
|
12
14
|
import copy
|
|
13
15
|
from .. import calc
|
|
14
16
|
from . import (sample as samples, basic)
|
|
@@ -96,6 +98,12 @@ def update_handsontable(smp: Sample, data: list, id: str):
|
|
|
96
98
|
'true': True, 'false': False, 'True': True, 'False': False, '1': True, '0': False, 'none': False,
|
|
97
99
|
}
|
|
98
100
|
return [bools_dict.get(str(col).lower(), False) for col in cols]
|
|
101
|
+
|
|
102
|
+
def _digitize_data(a):
|
|
103
|
+
# pattern = r'^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$'
|
|
104
|
+
# return [[ast.literal_eval(str(cell)) if re.fullmatch(pattern, str(cell)) else np.nan if str(cell) == "" else cell for cell in row] for row in a]
|
|
105
|
+
return a
|
|
106
|
+
|
|
99
107
|
try:
|
|
100
108
|
smp.SequenceName = data[0]
|
|
101
109
|
except IndexError:
|
|
@@ -104,47 +112,37 @@ def update_handsontable(smp: Sample, data: list, id: str):
|
|
|
104
112
|
update_all_table = False
|
|
105
113
|
try:
|
|
106
114
|
if data[1] != smp.SequenceValue:
|
|
115
|
+
update_all_table = True
|
|
107
116
|
smp.SequenceValue = data[1]
|
|
108
117
|
except IndexError:
|
|
109
118
|
pass
|
|
110
|
-
else:
|
|
111
|
-
update_all_table = True
|
|
112
119
|
|
|
113
120
|
if id == '1': # 样品值
|
|
114
121
|
data = _normalize_data(data, len(samples.SAMPLE_INTERCEPT_HEADERS), 2)
|
|
115
|
-
smp.SampleIntercept = data
|
|
122
|
+
smp.SampleIntercept = _digitize_data(data)
|
|
116
123
|
elif id == '2': # 本底值
|
|
117
124
|
data = _normalize_data(data, len(samples.BLANK_INTERCEPT_HEADERS), 2)
|
|
118
|
-
smp.BlankIntercept = data
|
|
125
|
+
smp.BlankIntercept = _digitize_data(data)
|
|
119
126
|
elif id == '3': # 校正值
|
|
120
127
|
data = _normalize_data(data, len(samples.CORRECTED_HEADERS), 2)
|
|
121
|
-
smp.CorrectedValues = data
|
|
128
|
+
smp.CorrectedValues = _digitize_data(data)
|
|
122
129
|
elif id == '4': # Degas table
|
|
123
130
|
data = _normalize_data(data, len(samples.DEGAS_HEADERS), 2)
|
|
124
|
-
smp.DegasValues = data
|
|
131
|
+
smp.DegasValues = _digitize_data(data)
|
|
125
132
|
elif id == '5': # 发行表
|
|
126
133
|
data = _normalize_data(data, len(samples.PUBLISH_TABLE_HEADERS), 2)
|
|
127
|
-
smp.PublishValues = data
|
|
134
|
+
smp.PublishValues = _digitize_data(data)
|
|
128
135
|
elif id == '6': # 年龄谱
|
|
129
136
|
data = _normalize_data(data, len(samples.SPECTRUM_TABLE_HEADERS), 2)
|
|
130
|
-
smp.ApparentAgeValues = data
|
|
137
|
+
smp.ApparentAgeValues = _digitize_data(data)
|
|
131
138
|
elif id == '7': # 等时线
|
|
132
|
-
smp.IsochronMark = data[2]
|
|
139
|
+
smp.IsochronMark = _digitize_data(data)[2]
|
|
133
140
|
data = _normalize_data(data, len(samples.ISOCHRON_TABLE_HEADERS), 3)
|
|
134
|
-
smp.IsochronValues = data
|
|
135
|
-
smp.
|
|
136
|
-
i for i in range(len(smp.IsochronMark)) if str(smp.IsochronMark[i]) == "1"]
|
|
137
|
-
smp.SelectedSequence2 = [
|
|
138
|
-
i for i in range(len(smp.IsochronMark)) if str(smp.IsochronMark[i]) == "2"]
|
|
139
|
-
smp.UnselectedSequence = [
|
|
140
|
-
i for i in range(len(smp.IsochronMark)) if
|
|
141
|
-
i not in smp.SelectedSequence1 + smp.SelectedSequence2]
|
|
142
|
-
#
|
|
143
|
-
smp.Info.results.selection[0]['data'] = smp.SelectedSequence1
|
|
144
|
-
smp.Info.results.selection[1]['data'] = smp.SelectedSequence2
|
|
145
|
-
smp.Info.results.selection[2]['data'] = smp.UnselectedSequence
|
|
141
|
+
smp.IsochronValues = _digitize_data(data)
|
|
142
|
+
smp.sequence()
|
|
146
143
|
elif id == '8': # 总参数
|
|
147
144
|
data = _normalize_data(data, len(samples.TOTAL_PARAMS_HEADERS), 2)
|
|
145
|
+
data = _digitize_data(data)
|
|
148
146
|
data[101: 112] = [_strToBool(i) for i in data[101: 112]]
|
|
149
147
|
smp.TotalParam = data
|
|
150
148
|
else:
|
ararpy/thermo/basic.py
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
# ==========================================
|
|
5
|
+
# Copyright 2025 Yang
|
|
6
|
+
# ararpy - basic
|
|
7
|
+
# ==========================================
|
|
8
|
+
#
|
|
9
|
+
#
|
|
10
|
+
#
|
|
11
|
+
"""
|
|
12
|
+
import numpy as np
|
|
13
|
+
from math import log
|
|
14
|
+
|
|
15
|
+
SEC2YEAR = 3600 * 24 * 365.2425
|
|
16
|
+
CAL2JOULE = 4.184
|
|
17
|
+
CM2UM = 10000
|
|
18
|
+
GAS_CONSTANT = 8.31446261815324 # in J / (mol K)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def gammq(a, x):
|
|
22
|
+
if x < 0 or a <= 0:
|
|
23
|
+
raise ValueError("ERROR(GAMMQ): x < 0 or a <= 0")
|
|
24
|
+
|
|
25
|
+
if x < a + 1:
|
|
26
|
+
gamser, gln = gser(a, x)
|
|
27
|
+
return 1.0 - gamser
|
|
28
|
+
else:
|
|
29
|
+
gammcf, gln = gcf(a, x)
|
|
30
|
+
return gammcf
|
|
31
|
+
|
|
32
|
+
def gser(a, x, itmax=100, eps=3e-7):
|
|
33
|
+
gln = gammln(a)
|
|
34
|
+
if x <= 0:
|
|
35
|
+
if x < 0:
|
|
36
|
+
raise ValueError("ERROR(GSER): x < 0")
|
|
37
|
+
return 0.0, gln
|
|
38
|
+
|
|
39
|
+
ap = a
|
|
40
|
+
sum_ = 1.0 / a
|
|
41
|
+
delta = sum_
|
|
42
|
+
for n in range(1, itmax + 1):
|
|
43
|
+
ap += 1
|
|
44
|
+
delta *= x / ap
|
|
45
|
+
sum_ += delta
|
|
46
|
+
if abs(delta) < abs(sum_) * eps:
|
|
47
|
+
break
|
|
48
|
+
else:
|
|
49
|
+
raise RuntimeError("ERROR(GSER): a too large, itmax too small")
|
|
50
|
+
|
|
51
|
+
gamser = sum_ * np.exp(-x + a * np.log(x) - gln)
|
|
52
|
+
return gamser, gln
|
|
53
|
+
|
|
54
|
+
def gcf(a, x, itmax=100, eps=3e-7):
|
|
55
|
+
gln = gammln(a)
|
|
56
|
+
gold = 0.0
|
|
57
|
+
a0 = 1.0
|
|
58
|
+
a1 = x
|
|
59
|
+
b0 = 0.0
|
|
60
|
+
b1 = 1.0
|
|
61
|
+
fac = 1.0
|
|
62
|
+
for n in range(1, itmax + 1):
|
|
63
|
+
an = float(n)
|
|
64
|
+
ana = an - a
|
|
65
|
+
a0 = (a1 + a0 * ana) * fac
|
|
66
|
+
b0 = (b1 + b0 * ana) * fac
|
|
67
|
+
anf = an * fac
|
|
68
|
+
a1 = x * a0 + anf * a1
|
|
69
|
+
b1 = x * b0 + anf * b1
|
|
70
|
+
if a1 != 0:
|
|
71
|
+
fac = 1.0 / a1
|
|
72
|
+
g = b1 * fac
|
|
73
|
+
if abs((g - gold) / g) < eps:
|
|
74
|
+
return g * np.exp(-x + a * np.log(x) - gln), gln
|
|
75
|
+
gold = g
|
|
76
|
+
else:
|
|
77
|
+
raise RuntimeError("ERROR(GCF): a too large, itmax too small")
|
|
78
|
+
|
|
79
|
+
def gammln(xx):
|
|
80
|
+
cof = np.array([76.18009173, -86.50532033, 24.01409822,
|
|
81
|
+
-1.231739516, 0.00120858003, -0.00000536382])
|
|
82
|
+
stp = 2.50662827465
|
|
83
|
+
half = 0.5
|
|
84
|
+
one = 1.0
|
|
85
|
+
fpf = 5.5
|
|
86
|
+
|
|
87
|
+
x = xx - one
|
|
88
|
+
tmp = x + fpf
|
|
89
|
+
tmp = (x + half) * np.log(tmp) - tmp
|
|
90
|
+
ser = one
|
|
91
|
+
for j in range(6):
|
|
92
|
+
x += one
|
|
93
|
+
ser += cof[j] / x
|
|
94
|
+
|
|
95
|
+
return tmp + np.log(stp * ser)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def fit(x, y, sigx, sigy, pho=None):
|
|
99
|
+
"""
|
|
100
|
+
equivalent to York2 regression
|
|
101
|
+
y = a + bx
|
|
102
|
+
|
|
103
|
+
Parameters
|
|
104
|
+
----------
|
|
105
|
+
x
|
|
106
|
+
y
|
|
107
|
+
sigx
|
|
108
|
+
sigy
|
|
109
|
+
pho
|
|
110
|
+
|
|
111
|
+
Returns
|
|
112
|
+
-------
|
|
113
|
+
a: intercept
|
|
114
|
+
b: slope
|
|
115
|
+
siga: intercept uncertainty
|
|
116
|
+
sigb: slope uncertainty
|
|
117
|
+
chi2: chi-square value
|
|
118
|
+
q: the incomplete gamma function value, should be large for the best fitting.
|
|
119
|
+
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
print(f"{x = }")
|
|
123
|
+
print(f"{y = }")
|
|
124
|
+
print(f"{sigx = }")
|
|
125
|
+
print(f"{sigy = }")
|
|
126
|
+
print(f"{pho = }")
|
|
127
|
+
|
|
128
|
+
ndata = len(x)
|
|
129
|
+
if pho is None:
|
|
130
|
+
pho = np.zeros(ndata)
|
|
131
|
+
nd = 20
|
|
132
|
+
imax = 20
|
|
133
|
+
xerr = 0.001
|
|
134
|
+
wt = []
|
|
135
|
+
a = 0
|
|
136
|
+
b = -1.
|
|
137
|
+
siga = 0
|
|
138
|
+
sigb = 0
|
|
139
|
+
chi2 = 0
|
|
140
|
+
q = 0
|
|
141
|
+
iter = 0
|
|
142
|
+
|
|
143
|
+
while iter <= imax:
|
|
144
|
+
sx = 0.
|
|
145
|
+
sy = 0.
|
|
146
|
+
st2 = 0.
|
|
147
|
+
st3 = 0.
|
|
148
|
+
ss = 0.
|
|
149
|
+
b0 = b
|
|
150
|
+
|
|
151
|
+
for i in range(ndata):
|
|
152
|
+
wt.append(0)
|
|
153
|
+
wt[i] = 1. / (sigy[i] ** 2 + b ** 2 * sigx[i] ** 2 - 2 * pho[i] * sigx[i] * sigy[i])
|
|
154
|
+
ss = ss + wt[i]
|
|
155
|
+
sx = sx + x[i] * wt[i]
|
|
156
|
+
sy = sy + y[i] * wt[i]
|
|
157
|
+
|
|
158
|
+
# print(f"{x[i] = }, {y[i] = }, {wt[i] = }")
|
|
159
|
+
|
|
160
|
+
sxoss = sx / ss
|
|
161
|
+
syoss = sy / ss
|
|
162
|
+
|
|
163
|
+
for i in range(ndata):
|
|
164
|
+
t1 = (x[i] - sxoss) * sigy[i] ** 2
|
|
165
|
+
t2 = (y[i] - syoss) * sigx[i] ** 2 * b
|
|
166
|
+
t3 = sigx[i] * sigy[i] * pho[i]
|
|
167
|
+
st2 = st2 + wt[i] ** 2 * (y[i] - syoss) * (t1 + t2 - t3 * (y[i] - syoss))
|
|
168
|
+
st3 = st3 + wt[i] ** 2 * (x[i] - sxoss) * (t1 + t2 - b * t3 * (x[i] - sxoss))
|
|
169
|
+
|
|
170
|
+
b = st2 / st3
|
|
171
|
+
iter = iter + 1
|
|
172
|
+
|
|
173
|
+
# print(f"{sxoss = }, {syoss = }, {b = }, {abs(b0 - b) = }")
|
|
174
|
+
|
|
175
|
+
if abs(b0 - b) > xerr:
|
|
176
|
+
continue
|
|
177
|
+
|
|
178
|
+
a = (syoss - sxoss * b)
|
|
179
|
+
# print(f"{a = }, {b = }")
|
|
180
|
+
sgt1 = 0.
|
|
181
|
+
sgt2 = 0.
|
|
182
|
+
|
|
183
|
+
for i in range(ndata):
|
|
184
|
+
sgt1 = sgt1 + wt[i] * (x[i] - sxoss) ** 2
|
|
185
|
+
sgt2 = sgt2 + wt[i] * x[i] ** 2
|
|
186
|
+
|
|
187
|
+
sigb = (1. / sgt1) ** 0.5
|
|
188
|
+
siga = sigb * (sgt2 / ss) ** 0.5
|
|
189
|
+
chi2 = 0.
|
|
190
|
+
|
|
191
|
+
for i in range(ndata):
|
|
192
|
+
chi2 = chi2 + wt[i] * (y[i] - a - b * x[i]) ** 2
|
|
193
|
+
|
|
194
|
+
q = gammq(0.5 * (ndata - 2), 0.5 * chi2)
|
|
195
|
+
|
|
196
|
+
if abs(b0 - b) <= xerr:
|
|
197
|
+
break
|
|
198
|
+
|
|
199
|
+
return a, b, siga, sigb, chi2, q
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def get_tc(da2, sda2, E, sE, cooling_rate=10, temp_in_celsius=True, temp=None, A: float = 27.0, R=None, pho=0):
|
|
203
|
+
"""
|
|
204
|
+
E / (R Tc) = ln(A t D0/a2)
|
|
205
|
+
E: diffusion activation energy
|
|
206
|
+
R: gas constant, 8.314 J/(K*mol)
|
|
207
|
+
Tc: closure temperature
|
|
208
|
+
A: geometric constant, A is 55, 27, or 8.7 for volume diffusion from a sphere, cylinder or plane sheet respectively
|
|
209
|
+
tau: time constant, can be determined by
|
|
210
|
+
(1) a pre-defined cooling rate following t = -R Tc2 / E * dT / dt, where dT / dt is the average cooling rate of the local geological body
|
|
211
|
+
(2) the age of dated sample following t = R * age * E * (Tp - Tc), where Tp is the temperature at present that could be 300 K.
|
|
212
|
+
D0: the diffusion coefficient at the given temperature, which will be the frequency factor (the pre-exponential factor) whe the temperature is infinite high
|
|
213
|
+
a: the effective diffusion radius, the characteristic dimension of the system, or the domain size, or roughly the grain size
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
In either way of them, a equation with Tc in both right and left hand will be yielded. Then using iterative calculation, the Tc can be determined.
|
|
217
|
+
|
|
218
|
+
Parameters
|
|
219
|
+
-------
|
|
220
|
+
da2: D/a2 in 1/a, pear year
|
|
221
|
+
sda2:
|
|
222
|
+
E: diffusion activation energy
|
|
223
|
+
sE:
|
|
224
|
+
pho: covariance of da2 and E
|
|
225
|
+
temp: temperature of the given diffusion coefficient, in K
|
|
226
|
+
A: geometric constant
|
|
227
|
+
R: gas constant
|
|
228
|
+
cooling_rate: in degree/m.y., degrees per million year
|
|
229
|
+
temp_in_celsius: temperature in celsius, True, else in K, False
|
|
230
|
+
|
|
231
|
+
Returns
|
|
232
|
+
-------
|
|
233
|
+
|
|
234
|
+
"""
|
|
235
|
+
R = 8.314 if R is None else R # in J/K mol
|
|
236
|
+
Tc = 600
|
|
237
|
+
sTc = 0
|
|
238
|
+
Tm = 99999999 if temp is None else temp
|
|
239
|
+
Tm = Tm + 273.15 if temp_in_celsius else Tm
|
|
240
|
+
cooling_rate = cooling_rate / 1000000
|
|
241
|
+
|
|
242
|
+
iter_num = 0
|
|
243
|
+
iter_diff = 100
|
|
244
|
+
while abs(iter_diff) > 0.01 and iter_num < 100:
|
|
245
|
+
tau = R * Tc ** 2 / (E * cooling_rate)
|
|
246
|
+
# new_Tc = (E/R) / log(A * tau * da2)
|
|
247
|
+
new_Tc = (R / E) * log(A * tau * da2) + 1 / Tm #
|
|
248
|
+
d1 = cooling_rate / (A * da2 * Tc ** 2)
|
|
249
|
+
s1 = d1 ** 2 * sda2 ** 2 # da2
|
|
250
|
+
d2 = R / E ** 2 * (log(A * tau * da2) + 1)
|
|
251
|
+
s2 = d2 ** 2 * sE ** 2 # E
|
|
252
|
+
d3 = 2 * R / (E * Tc)
|
|
253
|
+
s3 = d3 ** 2 * sTc ** 2 # Tc
|
|
254
|
+
new_Tc = 1 / new_Tc
|
|
255
|
+
iter_diff = abs(new_Tc - Tc)
|
|
256
|
+
Tc = new_Tc
|
|
257
|
+
sTc = Tc ** 2 * np.sqrt(s1 + s2 + s3 + 2 * d1 * d2 * pho)
|
|
258
|
+
iter_num += 1
|
|
259
|
+
# print(f"Get Tc: {iter_num = }, {Tc = }, {tau = }, {Tm = }")
|
|
260
|
+
return Tc - 273.15 if temp_in_celsius else Tc, sTc
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
if __name__ == "__main__":
|
|
264
|
+
"""
|
|
265
|
+
tests
|
|
266
|
+
"""
|
|
267
|
+
# 柴田贤, 钾长石
|
|
268
|
+
print("# 柴田贤, 钾长石")
|
|
269
|
+
print(get_tc(da2=5.6 * 3600 * 24 * 365.24, sda2=0, E=28.8 * 1000, R=1.987, sE=0, cooling_rate=5, A=8.7))
|
|
270
|
+
print(get_tc(da2=5.6 * 3600 * 24 * 365.24, sda2=0, E=28.8 * CAL2JOULE * 1000, sE=0, cooling_rate=5, A=8.7))
|
|
271
|
+
print(get_tc(da2=5.6 * 3600 * 24 * 365.24, sda2=0, E=28.8 * CAL2JOULE * 1000, sE=0, cooling_rate=30, A=8.7))
|
|
272
|
+
# 杨静, 斜钾铁矾 K101-1
|
|
273
|
+
print("# 杨静, 斜钾铁矾 K101-1")
|
|
274
|
+
print(get_tc(da2=10 ** 15.07 * 3600 * 24 * 365.24, sda2=0, E=76.17 * 1000 * CAL2JOULE, sE=0, cooling_rate=5, A=55)) # 这里跟文章中吻合
|
|
275
|
+
print(get_tc(da2=10 ** 15.07 * 3600 * 24 * 365.24, sda2=0, E=76.17 * 1000 * CAL2JOULE, sE=0, cooling_rate=10, A=55)) # 10冷却速率不吻合
|
|
276
|
+
# 杨静, 斜钾铁矾 K101-2
|
|
277
|
+
print("# 杨静, 斜钾铁矾 K101-2")
|
|
278
|
+
print(get_tc(da2=10 ** 12.35 * 3600 * 24 * 365.24, sda2=0, E=66.43 * 1000 * CAL2JOULE, sE=0, cooling_rate=5, A=55)) # 这里跟文章中吻合
|
|
279
|
+
print(get_tc(da2=10 ** 12.35 * 3600 * 24 * 365.24, sda2=0, E=66.43 * 1000 * CAL2JOULE, sE=0, cooling_rate=10, A=55)) # 10冷却速率不吻合
|
|
280
|
+
# 芦武长
|
|
281
|
+
print("# 芦武长")
|
|
282
|
+
print(get_tc(da2=3e-4 * 3600 * 24 * 365.24, sda2=0, E=35 * 1000 * CAL2JOULE, sE=0, cooling_rate=0.1, A=27, temp=600)) # 缺乏样品特征尺寸参数,da2不对,结果不对
|
|
283
|
+
print(get_tc(da2=3e-4 * 3600 * 24 * 365.24, sda2=0, E=35 * 1000 * CAL2JOULE, sE=0, cooling_rate=1, A=27, temp=600)) # 缺乏样品特征尺寸参数,da2不对,结果不对
|
|
284
|
+
# Harrison 1981, 角闪石, A = 55
|
|
285
|
+
print("# Harrison 1981, 角闪石, A = 55")
|
|
286
|
+
print(get_tc(da2=0.024 * SEC2YEAR / 0.0080 ** 2, sda2=0, E=64.1 * 1000 * CAL2JOULE, sE=0, cooling_rate=500, A=55))
|
|
287
|
+
print(get_tc(da2=0.024 * SEC2YEAR / 0.0080 ** 2, sda2=0, E=64.1 * 1000 * CAL2JOULE, sE=0, cooling_rate=5, A=55))
|
|
288
|
+
# Harrison 1985, 黑云母, A = 27
|
|
289
|
+
print("# Harrison 1985, 黑云母, A = 27")
|
|
290
|
+
print(get_tc(da2=0.077 * SEC2YEAR / 0.0150 ** 2, sda2=0, E=47.0 * 1000 * CAL2JOULE, sE=0, cooling_rate=100, A=27))
|
|
291
|
+
print(get_tc(da2=0.077 * SEC2YEAR / 0.0150 ** 2, sda2=0, E=47.0 * 1000 * CAL2JOULE, sE=0, cooling_rate=1, A=27))
|
|
292
|
+
print("# Blereau 2019, 大隅石,Osumilite, A = 8.7")
|
|
293
|
+
print(get_tc(da2=8.34e8 * SEC2YEAR / (0.0175 ** 2), sda2=0, E=461 * 1000, sE=0, cooling_rate=10, A=8.7))
|
|
294
|
+
print(get_tc(da2=6.70e8 * SEC2YEAR / (0.0175 ** 2), sda2=0, E=453 * 1000, sE=0, cooling_rate=10, A=8.7)) # 这两个与原文对不上,且原文描述表格与文字不符
|
|
295
|
+
print(get_tc(da2=4.49e5 * SEC2YEAR / (0.0175 ** 2), sda2=0, E=369 * 1000, sE=0, cooling_rate=10, A=8.7)) # 这两个与原文对不上,且原文描述表格与文字不符
|
|
296
|
+
print("# Thern 2020, 电气石, A = 55") # 大部分都对或者接近,不完全一致的原因大概是他们采用蒙特卡洛方法计算且正负误差不一样
|
|
297
|
+
print(get_tc(da2=4.86e22 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=678 * 1000, sE=0, cooling_rate=10, A=55))
|
|
298
|
+
print(get_tc(da2=8.99e23 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=756 * 1000, sE=0, cooling_rate=10, A=55))
|
|
299
|
+
print(get_tc(da2=3.95e19 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=604 * 1000, sE=0, cooling_rate=10, A=55))
|
|
300
|
+
print(get_tc(da2=6.95e27 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=815 * 1000, sE=0, cooling_rate=10, A=55))
|
|
301
|
+
print(get_tc(da2=2.70e14 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=519 * 1000, sE=0, cooling_rate=10, A=55))
|
|
302
|
+
print(get_tc(da2=1.65e15 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=505 * 1000, sE=0, cooling_rate=10, A=55))
|
|
303
|
+
print(get_tc(da2=9.09e21 * SEC2YEAR / (0.0100 ** 2), sda2=0, E=656 * 1000, sE=0, cooling_rate=10, A=55))
|
|
304
|
+
print("# Shi 2020, 黑云母, A = 55") # 大部分都对或者接近,不完全一致的原因大概是他们采用蒙特卡洛方法计算且正负误差不一样
|
|
305
|
+
print(get_tc(da2=10 ** 18 * SEC2YEAR, sda2=0, E=87 * 1000 * CAL2JOULE, sE=0, cooling_rate=10, A=6)) # 文中的参数可能是cooling_rate=100, A=8.7,但是10和6的组合与文中报导的结果一致
|
|
306
|
+
print(get_tc(da2=10 ** 16.6 * SEC2YEAR, sda2=0, E=81.5 * 1000 * CAL2JOULE, sE=0, cooling_rate=10, A=6))
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: ararpy
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.18
|
|
4
4
|
Summary: A project for Ar-Ar geochronology
|
|
5
5
|
Home-page: https://github.com/wuyangchn/ararpy.git
|
|
6
6
|
Author: Yang Wu
|
|
7
7
|
Author-email: wuycug@hotmail.com
|
|
8
|
+
License: MIT
|
|
8
9
|
Classifier: Development Status :: 3 - Alpha
|
|
9
10
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Requires-Python: >=3.5
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
@@ -18,6 +18,8 @@ Dynamic: classifier
|
|
|
18
18
|
Dynamic: description
|
|
19
19
|
Dynamic: description-content-type
|
|
20
20
|
Dynamic: home-page
|
|
21
|
+
Dynamic: license
|
|
22
|
+
Dynamic: license-file
|
|
21
23
|
Dynamic: requires-python
|
|
22
24
|
Dynamic: summary
|
|
23
25
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
ararpy/__init__.py,sha256=
|
|
1
|
+
ararpy/__init__.py,sha256=abmIxFaRq9m7mUI66xHbMGD2wRdzV9v8FAgvlViIlTc,6733
|
|
2
2
|
ararpy/test.py,sha256=4F46-JJ1Ge12HGae0qO44Qc6kiEMHBgn2MsY_5LlHDo,3973
|
|
3
|
-
ararpy/argon_diffusion_simulator/__init__.py,sha256=8VEdUP7sh17lNg6FcRVVK0JynthEsSk_qcTQtwisqU8,229
|
|
4
|
-
ararpy/argon_diffusion_simulator/main.py,sha256=-EN7ndhzVslNctJSaQTn_JwumA6Cnt37yiPxuLtahXQ,25490
|
|
5
3
|
ararpy/calc/__init__.py,sha256=kUjRuLE8TLuKOv3i976RnGJoEMj23QBZDu37LWs81U4,322
|
|
6
|
-
ararpy/calc/age.py,sha256=
|
|
4
|
+
ararpy/calc/age.py,sha256=POBF_UxfXM_GCfXR_sTE__-fOvYZleNXXSuR_SIrFrI,5782
|
|
7
5
|
ararpy/calc/arr.py,sha256=w31bn6MXF8I8qPXYo5kI-TfMKCYspx1rZ5g_UpwwSd8,14939
|
|
8
|
-
ararpy/calc/basic.py,sha256=
|
|
9
|
-
ararpy/calc/corr.py,sha256=
|
|
6
|
+
ararpy/calc/basic.py,sha256=uJCCUFaPd9zvfkggrdbFYSGLl2pt7UJ7ENgXanzHy68,4036
|
|
7
|
+
ararpy/calc/corr.py,sha256=HnCbf_84gKD6vMX7PflZym-I1MezRKfNHYfEtkDCCaI,18598
|
|
10
8
|
ararpy/calc/err.py,sha256=63LtprqjemlIb1QGDst4Ggcv5KMSDHdlAIL-nyQs1eA,2691
|
|
11
9
|
ararpy/calc/histogram.py,sha256=0GVbDdsjd91KQ1sa2B7NtZ4KGo0XpRIJapgIrzAwQUo,5777
|
|
12
10
|
ararpy/calc/isochron.py,sha256=ej9G2e68k6yszonWHsLcEubh3TA7eh1upTJP_X0ttAA,5726
|
|
13
11
|
ararpy/calc/jvalue.py,sha256=zHUhJ1iYe5mPrY95mGYxoUPAp7hwu4coUgiHKiruKfM,1138
|
|
14
12
|
ararpy/calc/plot.py,sha256=iWxPYIaT0OmJBiho7X9wFY7m-QrvYexu6nWHp24T_VY,1962
|
|
15
13
|
ararpy/calc/raw_funcs.py,sha256=UC01lvA6GyZ5FJv43jgoUULAFoLnZJMxeSa0BeVFCAM,2637
|
|
16
|
-
ararpy/calc/regression.py,sha256=
|
|
14
|
+
ararpy/calc/regression.py,sha256=w5kni6LGqvISvlvbBZnJ3N2c5eQjgkz3bBbj0PXPyGs,40251
|
|
17
15
|
ararpy/calc/spectra.py,sha256=_Q23eP9necHlaCoHf3_UfW1N3JmVZj5rcWFro8GS-CA,1995
|
|
18
16
|
ararpy/examples/022_VU124-M11a.ahd,sha256=3m0Gd-ZObou3KsnRNFMf77QwzT1Uz3nu3vA33Sqeyng,5414
|
|
19
17
|
ararpy/examples/20WHA0103.age,sha256=cT-a4d7Wt77aotx6v0G47vulY_TZIcZUcaVHB3pqTPM,380416
|
|
@@ -37,28 +35,32 @@ ararpy/examples/sample-default.smp,sha256=YNkoQGgPrsL_fXS7ZHxfRtLQWekCDqT9czS6vB
|
|
|
37
35
|
ararpy/files/__init__.py,sha256=l5B5ZQ01WdtvjjN0aMkyAFNgpwANdM_1I0tQbqnRuEY,69
|
|
38
36
|
ararpy/files/arr_file.py,sha256=KqksGlEA6nmMQofTgi7v45flscQZVtefxaNCKrV3Am4,837
|
|
39
37
|
ararpy/files/basic.py,sha256=nc7Hgo_qLSkdmtKzZmd5SQ8Jy0dhW46ly4gh-oisUDs,2095
|
|
40
|
-
ararpy/files/calc_file.py,sha256=
|
|
38
|
+
ararpy/files/calc_file.py,sha256=Mww0R1RH3BpTCo6EetW9jikd19G6-Ljhgak5PXccRfA,28341
|
|
41
39
|
ararpy/files/new_file.py,sha256=efblARIBROVLWS2w3-98BxLX5VZ8grRpiTkJFtf_rAk,214
|
|
42
40
|
ararpy/files/raw_file.py,sha256=aVHlebiGpxHGj_z9mrTR-Y2JEivxa4k1MJZ1TFXyMnA,22319
|
|
43
41
|
ararpy/files/xls.py,sha256=8ibT4ZRY2grK34ikKm1pDmlWFlVTgDL7vSMO6mphzrY,702
|
|
44
42
|
ararpy/smp/EXPORT_TO_PDF_DATA_PROPERTIES.py,sha256=baDM437tu6hsPv0uYfod0TREXlPd6kvMBFT1S9ZZlkk,3024
|
|
45
43
|
ararpy/smp/__init__.py,sha256=k6_fa27UJsQK7K7oC5GYlwMo6l0Xd8af3QtOrZz2XJk,478
|
|
46
|
-
ararpy/smp/basic.py,sha256=
|
|
44
|
+
ararpy/smp/basic.py,sha256=1zsBznVojY-SFAjq_1tkHxvpI9-mD_uotcrd9aDd6n4,22923
|
|
47
45
|
ararpy/smp/calculation.py,sha256=LCFJWjLVLEKEQ5b7RFUIxsMahEzgLdodW4kCYXV5Z34,2919
|
|
48
46
|
ararpy/smp/consts.py,sha256=XIdjdz8cYxspG2jMnoItdlUsxr3hKbNFJjMZJh1bpzw,393
|
|
49
|
-
ararpy/smp/corr.py,sha256=
|
|
50
|
-
ararpy/smp/diffusion_funcs.py,sha256=
|
|
51
|
-
ararpy/smp/export.py,sha256=
|
|
47
|
+
ararpy/smp/corr.py,sha256=1MDH41TsBVyuyI45mqaqP2IvEm_jAUMZgR0MG7uNiu4,25598
|
|
48
|
+
ararpy/smp/diffusion_funcs.py,sha256=4-PMMIZWzjk2HOYYWNgSp4GmApygp1MmOxJ2g3xrqWc,175049
|
|
49
|
+
ararpy/smp/export.py,sha256=_kanGNHjCvjzwUS1xNAPTaTk7VdIn88wOZ9mmq2eLPQ,117324
|
|
52
50
|
ararpy/smp/info.py,sha256=iKUELm-BuUduDlJKC1d8tKKNHbwwbNmhUg2pi6bcBvA,489
|
|
53
|
-
ararpy/smp/initial.py,sha256=
|
|
51
|
+
ararpy/smp/initial.py,sha256=eWvrzTh80AigxDI_BQn6dLkaf-oJeam24LFXcz8zB0o,16011
|
|
54
52
|
ararpy/smp/json.py,sha256=BTZCjVN0aj9epc700nwkYEYMKN2lHBYo-pLmtnz5oHY,2300
|
|
55
|
-
ararpy/smp/plots.py,sha256=
|
|
53
|
+
ararpy/smp/plots.py,sha256=rb_Hsk2M3Dftbsj4bT6JIdSZNjzxyllnMgXhlVChNjU,31802
|
|
56
54
|
ararpy/smp/raw.py,sha256=51n-rrbW2FqeZHQyevuG7iObPLGvIBzTe414QDVM1FE,6523
|
|
57
|
-
ararpy/smp/sample.py,sha256=
|
|
58
|
-
ararpy/smp/style.py,sha256=
|
|
59
|
-
ararpy/smp/table.py,sha256=
|
|
60
|
-
ararpy
|
|
61
|
-
ararpy
|
|
62
|
-
ararpy
|
|
63
|
-
ararpy
|
|
64
|
-
ararpy-0.1.
|
|
55
|
+
ararpy/smp/sample.py,sha256=qrsILB0O2v_8HAq_XsWTyF_rEAGs8GYOVVGz0Cb-Qc0,55641
|
|
56
|
+
ararpy/smp/style.py,sha256=Z4exOAdtvw5xwDf6nyIjPxuvww2U5JK6H_Ql02DBSyM,7030
|
|
57
|
+
ararpy/smp/table.py,sha256=9bNAOqAIOc0nSC3LNeqjJKUYSJSM28Ji3o9VimwMU8A,6645
|
|
58
|
+
ararpy/thermo/__init__.py,sha256=6VBuqTRFl403PVqOuMkVrut0nKaQsAosBmfW91X1dMg,263
|
|
59
|
+
ararpy/thermo/arrhenius.py,sha256=Ass1ichHfqIAtpv8eLlgrUc1UOb3Urh1qzr1E3gLB4U,233
|
|
60
|
+
ararpy/thermo/atomic_level_random_walk.py,sha256=Q97zfe2h2RaxADkoBAqd0uEiP16BFOajrTmXHMkL2EQ,25502
|
|
61
|
+
ararpy/thermo/basic.py,sha256=nBGHI9uK7VdJwThwBIOcKAzdnYqPyQseFoY6s4zKizk,11504
|
|
62
|
+
ararpy-0.1.18.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
|
|
63
|
+
ararpy-0.1.18.dist-info/METADATA,sha256=NJXSnrB9-l5wMxHlvWdB9yA11EYO_G2co1YjZStm4Tk,24516
|
|
64
|
+
ararpy-0.1.18.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
65
|
+
ararpy-0.1.18.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
|
|
66
|
+
ararpy-0.1.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|