ararpy 0.1.31__py3-none-any.whl → 0.1.34__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/Example - Check arr.py +52 -0
- ararpy/Example - Granite Cooling History.py +411 -0
- ararpy/Example - Plot temperature calibration.py +291 -0
- ararpy/Example - Show MDD results.py +561 -0
- ararpy/Example - Show all Kfs age spectra.py +344 -0
- ararpy/Example - Show random walk results.py +363 -0
- ararpy/Example - Tc calculation.py +437 -0
- ararpy/__init__.py +2 -2
- ararpy/calc/plot.py +1 -2
- ararpy/calc/raw_funcs.py +2 -2
- ararpy/calc/regression.py +3 -3
- ararpy/files/arr_file.py +2 -1
- ararpy/files/basic.py +1 -1
- ararpy/files/calc_file.py +6 -6
- ararpy/files/raw_file.py +16 -13
- ararpy/smp/diffusion_funcs.py +344 -35
- ararpy/smp/export.py +140 -61
- ararpy/smp/initial.py +17 -14
- ararpy/smp/plots.py +4 -4
- ararpy/smp/sample.py +39 -25
- ararpy/smp/style.py +2 -0
- ararpy/smp/table.py +26 -24
- ararpy/thermo/atomic_level_random_walk.py +6 -3
- ararpy/thermo/basic.py +2 -2
- {ararpy-0.1.31.dist-info → ararpy-0.1.34.dist-info}/METADATA +1 -1
- {ararpy-0.1.31.dist-info → ararpy-0.1.34.dist-info}/RECORD +29 -22
- {ararpy-0.1.31.dist-info → ararpy-0.1.34.dist-info}/WHEEL +0 -0
- {ararpy-0.1.31.dist-info → ararpy-0.1.34.dist-info}/licenses/LICENSE +0 -0
- {ararpy-0.1.31.dist-info → ararpy-0.1.34.dist-info}/top_level.txt +0 -0
ararpy/smp/sample.py
CHANGED
|
@@ -22,25 +22,25 @@ from types import MethodType
|
|
|
22
22
|
import pandas as pd
|
|
23
23
|
|
|
24
24
|
SAMPLE_INTERCEPT_HEADERS = [
|
|
25
|
-
'Sequence', '', # 0-
|
|
25
|
+
'Sequence', '', 'Mark', # 0-2
|
|
26
26
|
'\u00B3\u2076Ar', '1\u03C3', '\u00B3\u2077Ar', '1\u03C3', # 2-5
|
|
27
27
|
'\u00B3\u2078Ar', '1\u03C3', '\u00B3\u2079Ar', '1\u03C3', # 6-9
|
|
28
28
|
'\u2074\u2070Ar', '1\u03C3', # 10-11
|
|
29
29
|
]
|
|
30
30
|
BLANK_INTERCEPT_HEADERS = [
|
|
31
|
-
'Sequence', '', # 0-
|
|
31
|
+
'Sequence', '', 'Mark', # 0-2
|
|
32
32
|
'\u00B3\u2076Ar', '1\u03C3', '\u00B3\u2077Ar', '1\u03C3', # 2-5
|
|
33
33
|
'\u00B3\u2078Ar', '1\u03C3', '\u00B3\u2079Ar', '1\u03C3', # 6-9
|
|
34
34
|
'\u2074\u2070Ar', '1\u03C3', # 10-11
|
|
35
35
|
]
|
|
36
36
|
CORRECTED_HEADERS = [
|
|
37
|
-
'Sequence', '', # 0-
|
|
37
|
+
'Sequence', '', 'Mark', # 0-2
|
|
38
38
|
'\u00B3\u2076Ar', '1\u03C3', '\u00B3\u2077Ar', '1\u03C3', # 2-5
|
|
39
39
|
'\u00B3\u2078Ar', '1\u03C3', '\u00B3\u2079Ar', '1\u03C3', # 6-9
|
|
40
40
|
'\u2074\u2070Ar', '1\u03C3', # 10-11
|
|
41
41
|
]
|
|
42
42
|
DEGAS_HEADERS = [
|
|
43
|
-
'Sequence', '', # 0-
|
|
43
|
+
'Sequence', '', 'Mark', # 0-2
|
|
44
44
|
'\u00B3\u2076Ar[a]', '1\u03C3', '\u00B3\u2076Ar[c]', '1\u03C3', # 2-5
|
|
45
45
|
'\u00B3\u2076Ar[Ca]', '1\u03C3', '\u00B3\u2076Ar[Cl]', '1\u03C3', # 6-9
|
|
46
46
|
'\u00B3\u2077Ar[Ca]', '1\u03C3', '\u00B3\u2078Ar[Cl]', '1\u03C3', # 10-13
|
|
@@ -51,40 +51,40 @@ DEGAS_HEADERS = [
|
|
|
51
51
|
'\u2074\u2070Ar[c]', '1\u03C3', '\u2074\u2070Ar[K]', '1\u03C3' # 30-33
|
|
52
52
|
]
|
|
53
53
|
PUBLISH_TABLE_HEADERS = [
|
|
54
|
-
'Sequence', '', # 0-
|
|
54
|
+
'Sequence', '', 'Mark', # 0-2
|
|
55
55
|
'\u00B3\u2076Ar[a]', '\u00B3\u2077Ar[Ca]', '\u00B3\u2078Ar[Cl]', # 2-4
|
|
56
56
|
'\u00B3\u2079Ar[K]', '\u2074\u2070Ar[r]', # 5-6
|
|
57
57
|
'Apparent Age', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2079Ar[K]%', # 7-10
|
|
58
58
|
'Ca/K', '1\u03C3', # 11-12
|
|
59
59
|
]
|
|
60
60
|
PUBLISH_TABLE_HEADERS_AIR = [
|
|
61
|
-
'Sequence', '', # 0-
|
|
61
|
+
'Sequence', '', 'Mark', # 0-2
|
|
62
62
|
'\u00B3\u2076Ar[a]', '\u00B3\u2077Ar[Ca]', '\u00B3\u2078Ar[Cl]', # 2-4
|
|
63
63
|
'\u00B3\u2079Ar[K]', '\u2074\u2070Ar[r]', # 5-6
|
|
64
64
|
'MDF', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 7-10
|
|
65
65
|
'Ca/K', '1\u03C3', # 11-12
|
|
66
66
|
]
|
|
67
67
|
PUBLISH_TABLE_HEADERS_STD = [
|
|
68
|
-
'Sequence', '', # 0-
|
|
68
|
+
'Sequence', '', 'Mark', # 0-2
|
|
69
69
|
'\u00B3\u2076Ar[a]', '\u00B3\u2077Ar[Ca]', '\u00B3\u2078Ar[Cl]', # 2-4
|
|
70
70
|
'\u00B3\u2079Ar[K]', '\u2074\u2070Ar[r]', # 5-6
|
|
71
71
|
'J', '1\u03C3', '\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 7-10
|
|
72
72
|
'Ca/K', '1\u03C3', # 11-12
|
|
73
73
|
]
|
|
74
74
|
SPECTRUM_TABLE_HEADERS = [
|
|
75
|
-
'Sequence', '', # 0-
|
|
75
|
+
'Sequence', '', 'Mark', # 0-2
|
|
76
76
|
'\u2074\u2070Ar/\u00B3\u2079Ar', '1\u03C3', # 2-3
|
|
77
77
|
'Apparent Age', '1\u03C3', '1\u03C3', '1\u03C3', # 4-7
|
|
78
78
|
'\u2074\u2070Ar[r]%', '\u00B3\u2079Ar[K]%', # 8-9
|
|
79
79
|
]
|
|
80
80
|
SPECTRUM_TABLE_HEADERS_AIR = [
|
|
81
|
-
'Sequence', '', # 0-
|
|
81
|
+
'Sequence', '', 'Mark', # 0-2
|
|
82
82
|
'\u2074\u2070Ar/\u00B3\u2076Ar', '1\u03C3', # 2-3
|
|
83
83
|
'MDF', '1\u03C3', '1\u03C3', '1\u03C3', # 4-7
|
|
84
84
|
'\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 8-9
|
|
85
85
|
]
|
|
86
86
|
SPECTRUM_TABLE_HEADERS_STD = [
|
|
87
|
-
'Sequence', '', # 0-
|
|
87
|
+
'Sequence', '', 'Mark', # 0-2
|
|
88
88
|
'\u2074\u2070Ar/\u00B3\u2076Ar', '1\u03C3', # 2-3
|
|
89
89
|
'J', '1\u03C3', '1\u03C3', '1\u03C3', # 4-7
|
|
90
90
|
'\u2074\u2070Ar[r]%', '\u00B3\u2076Ar%', # 8-9
|
|
@@ -107,7 +107,7 @@ ISOCHRON_TABLE_HEADERS = [
|
|
|
107
107
|
'r1', 'r2', 'r3', # 39-41
|
|
108
108
|
]
|
|
109
109
|
TOTAL_PARAMS_HEADERS = [
|
|
110
|
-
'Sequence', '', # 0-
|
|
110
|
+
'Sequence', '', 'Mark', # 0-2
|
|
111
111
|
'(\u2074\u2070Ar/\u00B3\u2076Ar)t', '%1\u03C3',
|
|
112
112
|
'(\u2074\u2070Ar/\u00B3\u2076Ar)c', '%1\u03C3', # 2-5
|
|
113
113
|
'(\u00B3\u2078Ar/\u00B3\u2076Ar)t', '%1\u03C3',
|
|
@@ -173,19 +173,22 @@ TOTAL_PARAMS_HEADERS = [
|
|
|
173
173
|
]
|
|
174
174
|
|
|
175
175
|
SAMPLE_INTERCEPT_SHORT_HEADERS = [
|
|
176
|
-
'Seq', 'Label', '
|
|
176
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
177
|
+
'Ar36', '1s', 'Ar37', '1s',
|
|
177
178
|
'Ar38', '1s', 'Ar39', '1s', 'Ar40', '1s'
|
|
178
179
|
]
|
|
179
180
|
BLANK_INTERCEPT_SHORT_HEADERS = [
|
|
180
|
-
'Seq', 'Label', '
|
|
181
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
182
|
+
'Ar36', '1s', 'Ar37', '1s',
|
|
181
183
|
'Ar38', '1s', 'Ar39', '1s', 'Ar40', '1s'
|
|
182
184
|
]
|
|
183
185
|
CORRECTED_SHORT_HEADERS = [
|
|
184
|
-
'Seq', 'Label', '
|
|
186
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
187
|
+
'Ar36', '1s', 'Ar37', '1s',
|
|
185
188
|
'Ar38', '1s', 'Ar39', '1s', 'Ar40', '1s'
|
|
186
189
|
]
|
|
187
190
|
DEGAS_SHORT_HEADERS = [
|
|
188
|
-
'Seq', 'Label', # 0-
|
|
191
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
189
192
|
'Ar36[a]', '1s', 'Ar36[c]', '1s', # 2-5
|
|
190
193
|
'Ar36[Ca]', '1s', 'Ar36[Cl]', '1s', # 6-9
|
|
191
194
|
'Ar37[Ca]', '1s', 'Ar38[Cl]', '1s', # 10-13
|
|
@@ -196,12 +199,14 @@ DEGAS_SHORT_HEADERS = [
|
|
|
196
199
|
'Ar40[c]', '1s', 'Ar40[K]', '1s' # 29-32
|
|
197
200
|
]
|
|
198
201
|
PUBLISH_TABLE_SHORT_HEADERS = [
|
|
199
|
-
'Seq', 'Label', '
|
|
202
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
203
|
+
'Ar36[a]', 'Ar37[Ca]', 'Ar38[Cl]',
|
|
200
204
|
'Ar39[K]', 'Ar40[r]', 'Apparent Age', '1s', 'Ar40r%',
|
|
201
205
|
'Ar39K%', 'Ca/K', '1s'
|
|
202
206
|
]
|
|
203
207
|
SPECTRUM_TABLE_SHORT_HEADERS = [
|
|
204
|
-
'Seq', 'Label', '
|
|
208
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
209
|
+
'Ar40/Ar39', '1s', 'Apparent Age',
|
|
205
210
|
'1s', '1s', '1s', 'Ar40[r]%', 'Ar39[K]%'
|
|
206
211
|
]
|
|
207
212
|
ISOCHRON_TABLE_SHORT_HEADERS = [
|
|
@@ -222,7 +227,7 @@ ISOCHRON_TABLE_SHORT_HEADERS = [
|
|
|
222
227
|
'r1', 'r2', 'r3', # 39-41
|
|
223
228
|
]
|
|
224
229
|
TOTAL_PARAMS_SHORT_HEADERS = [
|
|
225
|
-
'Seq', 'Label', # 0-
|
|
230
|
+
'Seq', 'Label', 'Mark', # 0-2
|
|
226
231
|
'T_40v36', '%1s',
|
|
227
232
|
'C_40v36', '%1s', # 2-5
|
|
228
233
|
'T_38v36', '%1s',
|
|
@@ -778,7 +783,7 @@ DEFAULT_PLOT_STYLES = lambda sample_type, age_unit: {
|
|
|
778
783
|
},
|
|
779
784
|
}
|
|
780
785
|
|
|
781
|
-
VERSION = '
|
|
786
|
+
VERSION = '20251001'
|
|
782
787
|
|
|
783
788
|
NAMED_DICT = {
|
|
784
789
|
"unknown": {"header": SAMPLE_INTERCEPT_HEADERS.copy()},
|
|
@@ -886,7 +891,8 @@ class Sample:
|
|
|
886
891
|
# self.__version = '20250321' # error sigma adjustment
|
|
887
892
|
# self.__version = '20250328' # Experiment info
|
|
888
893
|
# self.__version = '20250404' # J normalization factor
|
|
889
|
-
self.__version = '
|
|
894
|
+
# self.__version = '20251001' # add marker col for all tables
|
|
895
|
+
self.__version = '20251001' # version setter
|
|
890
896
|
|
|
891
897
|
@property
|
|
892
898
|
def version(self):
|
|
@@ -1015,17 +1021,25 @@ class Table:
|
|
|
1015
1021
|
setattr(self, k, v)
|
|
1016
1022
|
self.set_coltypes()
|
|
1017
1023
|
|
|
1018
|
-
def set_coltypes(self):
|
|
1019
|
-
|
|
1020
|
-
|
|
1024
|
+
def set_coltypes(self, text_indexes=None):
|
|
1025
|
+
if text_indexes is not None:
|
|
1026
|
+
self.text_indexes = text_indexes
|
|
1027
|
+
if not isinstance(self.text_indexes, list):
|
|
1028
|
+
raise TypeError(f"Text_indexes is not allowed: {self.text_indexes}")
|
|
1029
|
+
for i in range(self.colcount):
|
|
1030
|
+
if i in self.text_indexes:
|
|
1021
1031
|
self.coltypes[i].update({'type': 'text'})
|
|
1022
|
-
|
|
1023
|
-
if i < self.colcount:
|
|
1032
|
+
else:
|
|
1024
1033
|
self.coltypes[i].update({
|
|
1025
1034
|
'type': 'numeric',
|
|
1026
1035
|
'numericFormat': {'pattern': {'mantissa': self.decimal_places}},
|
|
1027
1036
|
})
|
|
1028
1037
|
|
|
1038
|
+
def set_colcount(self, c: int):
|
|
1039
|
+
self.colcount = c
|
|
1040
|
+
while len(self.coltypes) < c:
|
|
1041
|
+
self.coltypes.append({'type': 'text'})
|
|
1042
|
+
|
|
1029
1043
|
|
|
1030
1044
|
class Plot:
|
|
1031
1045
|
def __init__(self, id='', type='', name='', data=None, info=None, **kwargs):
|
ararpy/smp/style.py
CHANGED
|
@@ -195,9 +195,11 @@ def set_table_style(sample: Sample):
|
|
|
195
195
|
-------
|
|
196
196
|
|
|
197
197
|
"""
|
|
198
|
+
std = initial.initial(Sample())
|
|
198
199
|
for key, comp in basic.get_components(sample).items():
|
|
199
200
|
if isinstance(comp, Table):
|
|
200
201
|
comp.header = TABLEHEADER(sample_type=sample.Info.sample.type, index=int(comp.id))
|
|
202
|
+
comp.text_indexes = basic.get_component_byid(std, comp.id).text_indexes
|
|
201
203
|
comp.set_coltypes()
|
|
202
204
|
# comp.colcount = len(comp.header)
|
|
203
205
|
# comp.coltypes = [{'type': 'numeric'}] * (comp.colcount)
|
ararpy/smp/table.py
CHANGED
|
@@ -39,16 +39,16 @@ def update_table_data(smp: Sample, only_table: str = None):
|
|
|
39
39
|
continue
|
|
40
40
|
if key == '1':
|
|
41
41
|
data = calc.arr.merge(
|
|
42
|
-
smp.SequenceName, smp.SequenceValue, *smp.SampleIntercept)
|
|
42
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.SampleIntercept)
|
|
43
43
|
elif key == '2':
|
|
44
44
|
data = calc.arr.merge(
|
|
45
|
-
smp.SequenceName, smp.SequenceValue, *smp.BlankIntercept)
|
|
45
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.BlankIntercept)
|
|
46
46
|
elif key == '3':
|
|
47
47
|
data = calc.arr.merge(
|
|
48
|
-
smp.SequenceName, smp.SequenceValue, *smp.CorrectedValues)
|
|
48
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.CorrectedValues)
|
|
49
49
|
elif key == '4':
|
|
50
50
|
data = calc.arr.merge(
|
|
51
|
-
smp.SequenceName, smp.SequenceValue, *smp.DegasValues)
|
|
51
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.DegasValues)
|
|
52
52
|
elif key == '5':
|
|
53
53
|
smp.PublishValues[0] = copy.deepcopy(smp.DegasValues[ 0])
|
|
54
54
|
smp.PublishValues[1] = copy.deepcopy(smp.DegasValues[ 8])
|
|
@@ -58,19 +58,20 @@ def update_table_data(smp: Sample, only_table: str = None):
|
|
|
58
58
|
smp.PublishValues[5:7] = copy.deepcopy(smp.ApparentAgeValues[2:4])
|
|
59
59
|
smp.PublishValues[7:9] = copy.deepcopy(smp.ApparentAgeValues[6:8])
|
|
60
60
|
data = calc.arr.merge(
|
|
61
|
-
smp.SequenceName, smp.SequenceValue, *smp.PublishValues)
|
|
61
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.PublishValues)
|
|
62
62
|
elif key == '6':
|
|
63
63
|
data = calc.arr.merge(
|
|
64
|
-
smp.SequenceName, smp.SequenceValue, *smp.ApparentAgeValues)
|
|
64
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.ApparentAgeValues)
|
|
65
65
|
elif key == '7':
|
|
66
66
|
data = calc.arr.merge(
|
|
67
67
|
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.IsochronValues)
|
|
68
68
|
elif key == '8':
|
|
69
69
|
data = calc.arr.merge(
|
|
70
|
-
smp.SequenceName, smp.SequenceValue, *smp.TotalParam)
|
|
70
|
+
smp.SequenceName, smp.SequenceValue, smp.IsochronMark, *smp.TotalParam)
|
|
71
71
|
else:
|
|
72
72
|
data = [['']]
|
|
73
73
|
# calc.arr.replace(data, pd.isnull, None)
|
|
74
|
+
comp.set_colcount(len(data))
|
|
74
75
|
setattr(comp, 'data', calc.arr.transpose(data))
|
|
75
76
|
|
|
76
77
|
|
|
@@ -111,42 +112,43 @@ def update_handsontable(smp: Sample, data: list, id: str):
|
|
|
111
112
|
|
|
112
113
|
update_all_table = False
|
|
113
114
|
try:
|
|
114
|
-
if data[1] != smp.SequenceValue:
|
|
115
|
+
if data[1] != smp.SequenceValue or data[2] != smp.IsochronMark:
|
|
115
116
|
update_all_table = True
|
|
116
117
|
smp.SequenceValue = data[1]
|
|
118
|
+
smp.IsochronMark = data[2]
|
|
117
119
|
except IndexError:
|
|
120
|
+
print(f"Check sequence value / isochron mark failed")
|
|
118
121
|
pass
|
|
119
122
|
|
|
120
123
|
if id == '1': # 样品值
|
|
121
|
-
data = _normalize_data(data, len(samples.SAMPLE_INTERCEPT_HEADERS),
|
|
124
|
+
data = _normalize_data(data, len(samples.SAMPLE_INTERCEPT_HEADERS), 3)
|
|
122
125
|
smp.SampleIntercept = _digitize_data(data)
|
|
123
126
|
elif id == '2': # 本底值
|
|
124
|
-
data = _normalize_data(data, len(samples.BLANK_INTERCEPT_HEADERS),
|
|
127
|
+
data = _normalize_data(data, len(samples.BLANK_INTERCEPT_HEADERS), 3)
|
|
125
128
|
smp.BlankIntercept = _digitize_data(data)
|
|
126
129
|
elif id == '3': # 校正值
|
|
127
|
-
data = _normalize_data(data, len(samples.CORRECTED_HEADERS),
|
|
130
|
+
data = _normalize_data(data, len(samples.CORRECTED_HEADERS), 3)
|
|
128
131
|
smp.CorrectedValues = _digitize_data(data)
|
|
129
132
|
elif id == '4': # Degas table
|
|
130
|
-
data = _normalize_data(data, len(samples.DEGAS_HEADERS),
|
|
133
|
+
data = _normalize_data(data, len(samples.DEGAS_HEADERS), 3)
|
|
131
134
|
smp.DegasValues = _digitize_data(data)
|
|
132
135
|
elif id == '5': # 发行表
|
|
133
|
-
data = _normalize_data(data, len(samples.PUBLISH_TABLE_HEADERS),
|
|
136
|
+
data = _normalize_data(data, len(samples.PUBLISH_TABLE_HEADERS), 3)
|
|
134
137
|
smp.PublishValues = _digitize_data(data)
|
|
135
138
|
elif id == '6': # 年龄谱
|
|
136
|
-
data = _normalize_data(data, len(samples.SPECTRUM_TABLE_HEADERS),
|
|
139
|
+
data = _normalize_data(data, len(samples.SPECTRUM_TABLE_HEADERS), 3)
|
|
137
140
|
smp.ApparentAgeValues = _digitize_data(data)
|
|
138
141
|
elif id == '7': # 等时线
|
|
139
|
-
smp.IsochronMark = _digitize_data(data)[2]
|
|
140
142
|
data = _normalize_data(data, len(samples.ISOCHRON_TABLE_HEADERS), 3)
|
|
141
143
|
smp.IsochronValues = _digitize_data(data)
|
|
142
|
-
smp.sequence()
|
|
143
144
|
elif id == '8': # 总参数
|
|
144
|
-
data = _normalize_data(data, len(samples.TOTAL_PARAMS_HEADERS),
|
|
145
|
+
data = _normalize_data(data, len(samples.TOTAL_PARAMS_HEADERS), 3)
|
|
145
146
|
data = _digitize_data(data)
|
|
146
147
|
data[101: 112] = [_strToBool(i) for i in data[101: 112]]
|
|
147
148
|
smp.TotalParam = data
|
|
148
149
|
else:
|
|
149
150
|
raise ValueError(f"{id = }, The table id is not supported.")
|
|
151
|
+
smp.sequence()
|
|
150
152
|
if update_all_table:
|
|
151
153
|
update_table_data(smp)
|
|
152
154
|
else:
|
|
@@ -171,21 +173,21 @@ def update_data_from_table(smp: Sample, only_table: str = None):
|
|
|
171
173
|
if only_table is not None and key != only_table:
|
|
172
174
|
continue
|
|
173
175
|
if key == '1':
|
|
174
|
-
smp.SampleIntercept = calc.arr.transpose(comp.data)[
|
|
176
|
+
smp.SampleIntercept = calc.arr.transpose(comp.data)[3:]
|
|
175
177
|
elif key == '2':
|
|
176
|
-
smp.BlankIntercept = calc.arr.transpose(comp.data)[
|
|
178
|
+
smp.BlankIntercept = calc.arr.transpose(comp.data)[3:]
|
|
177
179
|
elif key == '3':
|
|
178
|
-
smp.CorrectedValues = calc.arr.transpose(comp.data)[
|
|
180
|
+
smp.CorrectedValues = calc.arr.transpose(comp.data)[3:]
|
|
179
181
|
elif key == '4':
|
|
180
|
-
smp.DegasValues = calc.arr.transpose(comp.data)[
|
|
182
|
+
smp.DegasValues = calc.arr.transpose(comp.data)[3:]
|
|
181
183
|
elif key == '5':
|
|
182
|
-
smp.PublishValues = calc.arr.transpose(comp.data)[
|
|
184
|
+
smp.PublishValues = calc.arr.transpose(comp.data)[3:]
|
|
183
185
|
elif key == '6':
|
|
184
|
-
smp.ApparentAgeValues = calc.arr.transpose(comp.data)[
|
|
186
|
+
smp.ApparentAgeValues = calc.arr.transpose(comp.data)[3:]
|
|
185
187
|
elif key == '7':
|
|
186
188
|
smp.IsochronValues = calc.arr.transpose(comp.data)[3:]
|
|
187
189
|
elif key == '8':
|
|
188
|
-
smp.TotalParam = calc.arr.transpose(comp.data)[
|
|
190
|
+
smp.TotalParam = calc.arr.transpose(comp.data)[3:]
|
|
189
191
|
else:
|
|
190
192
|
pass
|
|
191
193
|
|
|
@@ -127,8 +127,9 @@ def walker2(pos: np.ndarray, duration, step_length, min_bound, max_bound, time_s
|
|
|
127
127
|
:return:
|
|
128
128
|
"""
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
# Ar40模拟时不能判断,因为会增加
|
|
131
|
+
# if len(pos) == 0:
|
|
132
|
+
# return pos
|
|
132
133
|
|
|
133
134
|
dimension = pos.shape[-1] if len(pos.shape) > 1 else 1
|
|
134
135
|
|
|
@@ -141,7 +142,6 @@ def walker2(pos: np.ndarray, duration, step_length, min_bound, max_bound, time_s
|
|
|
141
142
|
conditions = np.array([[-50, -50, 50, 50, 1]])
|
|
142
143
|
|
|
143
144
|
for step in range(int(1e16)):
|
|
144
|
-
|
|
145
145
|
n = parent - int(parent * math.exp(-1 * decay * dt / (3600 * 24 * 365.2425)))
|
|
146
146
|
# print(f"number of new pos = {n}")
|
|
147
147
|
parent = parent - n
|
|
@@ -288,6 +288,8 @@ class DiffSimulation:
|
|
|
288
288
|
self.end_at = 0
|
|
289
289
|
self.dimension = 3
|
|
290
290
|
|
|
291
|
+
self.thermal_log = []
|
|
292
|
+
|
|
291
293
|
self.size_scale = 1
|
|
292
294
|
self.length_scale = 1
|
|
293
295
|
|
|
@@ -520,6 +522,7 @@ def run(times, temps, statuses, energies, fractions, ndoms: int = 1, grain_szie=
|
|
|
520
522
|
# epsilon=epsilon, simulation=simulation)
|
|
521
523
|
demo = demo_init(ndoms, energies, fractions, dimension, grain_szie, atom_density, frequency, ss=1)
|
|
522
524
|
demo.name = f"{file_name}"
|
|
525
|
+
demo.thermal_log = list(zip(times, temps))
|
|
523
526
|
|
|
524
527
|
if positions is not None:
|
|
525
528
|
demo.positions = positions
|
ararpy/thermo/basic.py
CHANGED
|
@@ -235,7 +235,7 @@ def get_tc(da2, sda2, E, sE, cooling_rate=10, temp_in_celsius=True, temp=None, A
|
|
|
235
235
|
R = 8.314 if R is None else R # in J/K mol
|
|
236
236
|
Tc = 600
|
|
237
237
|
sTc = 0
|
|
238
|
-
Tm =
|
|
238
|
+
Tm = 9999999999 if temp is None else temp
|
|
239
239
|
Tm = Tm + 273.15 if temp_in_celsius else Tm
|
|
240
240
|
cooling_rate = cooling_rate / 1000000
|
|
241
241
|
|
|
@@ -243,8 +243,8 @@ def get_tc(da2, sda2, E, sE, cooling_rate=10, temp_in_celsius=True, temp=None, A
|
|
|
243
243
|
iter_diff = 100
|
|
244
244
|
while abs(iter_diff) > 0.01 and iter_num < 100:
|
|
245
245
|
tau = R * Tc ** 2 / (E * cooling_rate)
|
|
246
|
-
# new_Tc = (E/R) / log(A * tau * da2)
|
|
247
246
|
new_Tc = (R / E) * log(A * tau * da2) + 1 / Tm #
|
|
247
|
+
# new_Tc = (R / E) * log(A * tau * da2)
|
|
248
248
|
d1 = cooling_rate / (A * da2 * Tc ** 2)
|
|
249
249
|
s1 = d1 ** 2 * sda2 ** 2 # da2
|
|
250
250
|
d2 = R / E ** 2 * (log(A * tau * da2) + 1)
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
ararpy/
|
|
1
|
+
ararpy/Example - Check arr.py,sha256=c9HUUZySUXOYk4eCqiPSp124G2sYpFP5zoMl0FXdalE,1709
|
|
2
|
+
ararpy/Example - Granite Cooling History.py,sha256=V4V63RVp1gocOZX0T3OOGOiVhCA1DqrCyJnXgFvEcUs,14917
|
|
3
|
+
ararpy/Example - Plot temperature calibration.py,sha256=8pR-WKqdaIKQTuuSbfwXuxoEkCop4zhmZUMJSARWDOg,10879
|
|
4
|
+
ararpy/Example - Show MDD results.py,sha256=YFkiQual60lyCClsfvivr4REY6waSYuomf0uo5soUHE,22635
|
|
5
|
+
ararpy/Example - Show all Kfs age spectra.py,sha256=1edPtBpFfS0lC7vLnLu34mDHt_xjbc8ptk6rZ--pf-I,12304
|
|
6
|
+
ararpy/Example - Show random walk results.py,sha256=8WWvbAI7ySiMR-XwtFe5kTQihW3mcqzL3S7EUZdoxYo,15477
|
|
7
|
+
ararpy/Example - Tc calculation.py,sha256=sD9pu3IaZ8mBV95rV2wOEhlQUexFNqBUoBqnNMdUBis,19617
|
|
8
|
+
ararpy/__init__.py,sha256=lBvc-oTc0Js1bMrGGgXnmSRTJPqkJrqa-vOWCawlPXE,6857
|
|
2
9
|
ararpy/test.py,sha256=4F46-JJ1Ge12HGae0qO44Qc6kiEMHBgn2MsY_5LlHDo,3973
|
|
3
10
|
ararpy/calc/__init__.py,sha256=kUjRuLE8TLuKOv3i976RnGJoEMj23QBZDu37LWs81U4,322
|
|
4
11
|
ararpy/calc/age.py,sha256=WOZs70zXiBWDIEhXJLIaNiYTOFJNk0NDbH5e5zCbCks,5435
|
|
@@ -9,9 +16,9 @@ ararpy/calc/err.py,sha256=63LtprqjemlIb1QGDst4Ggcv5KMSDHdlAIL-nyQs1eA,2691
|
|
|
9
16
|
ararpy/calc/histogram.py,sha256=0GVbDdsjd91KQ1sa2B7NtZ4KGo0XpRIJapgIrzAwQUo,5777
|
|
10
17
|
ararpy/calc/isochron.py,sha256=ej9G2e68k6yszonWHsLcEubh3TA7eh1upTJP_X0ttAA,5726
|
|
11
18
|
ararpy/calc/jvalue.py,sha256=OL5zPYU8Pac-wOxUWPCgu3onh2n01xDnhpi2mlUsjJM,1146
|
|
12
|
-
ararpy/calc/plot.py,sha256=
|
|
13
|
-
ararpy/calc/raw_funcs.py,sha256=
|
|
14
|
-
ararpy/calc/regression.py,sha256=
|
|
19
|
+
ararpy/calc/plot.py,sha256=Hdtb-q18xYC8ZJeDKGRauCSbj4_7e6Z8HQs9aYgfvao,2139
|
|
20
|
+
ararpy/calc/raw_funcs.py,sha256=GJ0VW0sc2qPIVp5jSDmPP1ClOoYRa_cc35ye7QDYOiI,2744
|
|
21
|
+
ararpy/calc/regression.py,sha256=lWMoZkovtj5OEYM8eT0FcMsGrDIkKm9rsG45ru3IVuk,39798
|
|
15
22
|
ararpy/calc/spectra.py,sha256=_Q23eP9necHlaCoHf3_UfW1N3JmVZj5rcWFro8GS-CA,1995
|
|
16
23
|
ararpy/examples/022_VU124-M11a.ahd,sha256=3m0Gd-ZObou3KsnRNFMf77QwzT1Uz3nu3vA33Sqeyng,5414
|
|
17
24
|
ararpy/examples/20WHA0103.age,sha256=cT-a4d7Wt77aotx6v0G47vulY_TZIcZUcaVHB3pqTPM,380416
|
|
@@ -33,11 +40,11 @@ ararpy/examples/WHA.pdf,sha256=iopbptHkWPmYdgihEVDDfv2nm2XE-Q-e7fFnkR44Xh0,17869
|
|
|
33
40
|
ararpy/examples/raw_example.xls,sha256=ftcSiXRx_7nYnbqJVma1Yl3Yr_iuceAWlEjhJwlAvFM,1929895
|
|
34
41
|
ararpy/examples/sample-default.smp,sha256=YNkoQGgPrsL_fXS7ZHxfRtLQWekCDqT9czS6vBScImk,432
|
|
35
42
|
ararpy/files/__init__.py,sha256=l5B5ZQ01WdtvjjN0aMkyAFNgpwANdM_1I0tQbqnRuEY,69
|
|
36
|
-
ararpy/files/arr_file.py,sha256=
|
|
37
|
-
ararpy/files/basic.py,sha256=
|
|
38
|
-
ararpy/files/calc_file.py,sha256=
|
|
43
|
+
ararpy/files/arr_file.py,sha256=pD5MxkAydL7cNq2wmKFUaOU4jHhc3MzTYrwbxZ3f46w,881
|
|
44
|
+
ararpy/files/basic.py,sha256=mGYP7QJBtyasVAYcwT0a9k6tPlcStxASddgzbaxYKkE,2105
|
|
45
|
+
ararpy/files/calc_file.py,sha256=RrfMo7Q8-4pBMQdpGY0guF52aSqAk8LEjq2NE3toL2w,28734
|
|
39
46
|
ararpy/files/new_file.py,sha256=efblARIBROVLWS2w3-98BxLX5VZ8grRpiTkJFtf_rAk,214
|
|
40
|
-
ararpy/files/raw_file.py,sha256=
|
|
47
|
+
ararpy/files/raw_file.py,sha256=3vGinbUyTWyQ57jMFIuckrPkN0TrNe1hqKCOAWaj70A,21854
|
|
41
48
|
ararpy/files/xls.py,sha256=DVcZ_yRnc19p-m4leGGjt-YPDpSa2udYKmGyrM0qub0,640
|
|
42
49
|
ararpy/smp/EXPORT_TO_PDF_DATA_PROPERTIES.py,sha256=baDM437tu6hsPv0uYfod0TREXlPd6kvMBFT1S9ZZlkk,3024
|
|
43
50
|
ararpy/smp/__init__.py,sha256=k6_fa27UJsQK7K7oC5GYlwMo6l0Xd8af3QtOrZz2XJk,478
|
|
@@ -45,22 +52,22 @@ ararpy/smp/basic.py,sha256=PMvlSoToY8CJEORRrhEo4rYM2-VfSmjg0IuDpGFOGUM,24899
|
|
|
45
52
|
ararpy/smp/calculation.py,sha256=LCFJWjLVLEKEQ5b7RFUIxsMahEzgLdodW4kCYXV5Z34,2919
|
|
46
53
|
ararpy/smp/consts.py,sha256=XIdjdz8cYxspG2jMnoItdlUsxr3hKbNFJjMZJh1bpzw,393
|
|
47
54
|
ararpy/smp/corr.py,sha256=U5K1Vld55IHea_fZ7EEY_8dkvjp0f6OhpdSxf7b9WGY,26551
|
|
48
|
-
ararpy/smp/diffusion_funcs.py,sha256=
|
|
49
|
-
ararpy/smp/export.py,sha256=
|
|
55
|
+
ararpy/smp/diffusion_funcs.py,sha256=q0kl-AYx7TYeWc1kruKLOl4U4JosIuf1uNmkps11eUs,186694
|
|
56
|
+
ararpy/smp/export.py,sha256=mWnnNg7DYIxcxyqeGXAWUS7faJmO7UHwnMVPX33_aLg,120638
|
|
50
57
|
ararpy/smp/info.py,sha256=iKUELm-BuUduDlJKC1d8tKKNHbwwbNmhUg2pi6bcBvA,489
|
|
51
|
-
ararpy/smp/initial.py,sha256=
|
|
58
|
+
ararpy/smp/initial.py,sha256=QGk7vh7JyVqalwnpd9VudQoX2Z9tyWzfIIw_cL5Sok0,18031
|
|
52
59
|
ararpy/smp/json.py,sha256=BTZCjVN0aj9epc700nwkYEYMKN2lHBYo-pLmtnz5oHY,2300
|
|
53
|
-
ararpy/smp/plots.py,sha256=
|
|
60
|
+
ararpy/smp/plots.py,sha256=fFuJxoFcnvGSysjdEdrbW_ITpukt0iGs2K25gshIKNU,33594
|
|
54
61
|
ararpy/smp/raw.py,sha256=51n-rrbW2FqeZHQyevuG7iObPLGvIBzTe414QDVM1FE,6523
|
|
55
|
-
ararpy/smp/sample.py,sha256=
|
|
56
|
-
ararpy/smp/style.py,sha256=
|
|
57
|
-
ararpy/smp/table.py,sha256=
|
|
62
|
+
ararpy/smp/sample.py,sha256=iaFjG0S0GuNwbLeUFpzEFIbqa0oX0KekRZuLJd2mSCQ,58903
|
|
63
|
+
ararpy/smp/style.py,sha256=Q8f6SsqnxmzocxpZUyGDiNanVW0ijCZpxHKh19UIeoM,7800
|
|
64
|
+
ararpy/smp/table.py,sha256=Vq3GK9aslEuBhmvlQoUHjcs71Q6raSFYqd5veB1L9mk,6887
|
|
58
65
|
ararpy/thermo/__init__.py,sha256=6VBuqTRFl403PVqOuMkVrut0nKaQsAosBmfW91X1dMg,263
|
|
59
66
|
ararpy/thermo/arrhenius.py,sha256=Ass1ichHfqIAtpv8eLlgrUc1UOb3Urh1qzr1E3gLB4U,233
|
|
60
|
-
ararpy/thermo/atomic_level_random_walk.py,sha256=
|
|
61
|
-
ararpy/thermo/basic.py,sha256=
|
|
62
|
-
ararpy-0.1.
|
|
63
|
-
ararpy-0.1.
|
|
64
|
-
ararpy-0.1.
|
|
65
|
-
ararpy-0.1.
|
|
66
|
-
ararpy-0.1.
|
|
67
|
+
ararpy/thermo/atomic_level_random_walk.py,sha256=ncw9DtxRfS6zlQbLVLNX7WNoO9sX_nSomwAsTH0_O3k,25910
|
|
68
|
+
ararpy/thermo/basic.py,sha256=JJRZbYmvXlpRAV2FeFPwLhrig4ZhNQmJnWqgOjo-1YQ,11508
|
|
69
|
+
ararpy-0.1.34.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
|
|
70
|
+
ararpy-0.1.34.dist-info/METADATA,sha256=ZOHvn2PDOQXK_B4Dy0XlzzY0KoxaXraCH-I8u67YQmM,24516
|
|
71
|
+
ararpy-0.1.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
72
|
+
ararpy-0.1.34.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
|
|
73
|
+
ararpy-0.1.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|