ararpy 0.1.193__tar.gz → 0.1.195__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.193 → ararpy-0.1.195}/PKG-INFO +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/__init__.py +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/arr.py +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/basic.py +7 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/corr.py +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/export.py +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/initial.py +11 -10
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy.egg-info/PKG-INFO +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/setup.py +1 -1
- {ararpy-0.1.193 → ararpy-0.1.195}/LICENSE +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/README.md +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/__init__.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/age.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/basic.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/corr.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/err.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/histogram.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/isochron.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/jvalue.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/plot.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/raw_funcs.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/regression.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/calc/spectra.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/022_VU124-M11a.ahd +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/20WHA0103.age +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/22WHA0078.xls +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/22WHA0433.age +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/22WHA0433.arr +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/22WHA0433.full.xls +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/24WHN0001-51-592.XLS +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/AHD.input-filter +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/ArAr.calc +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/ArArCALC.age +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/NGX-600 - Copy.TXT +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/NGX-600.TXT +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/NGX-XLS.input-filter +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/Qtegra-exported-xls.input-filter +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/S01-239.csv +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/WH01.irra +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/WHA.pdf +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/raw_example.xls +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/examples/sample-default.smp +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/__init__.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/arr_file.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/basic.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/calc_file.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/new_file.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/raw_file.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/files/xls.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/EXPORT_TO_PDF_DATA_PROPERTIES.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/__init__.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/calculation.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/consts.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/diffusion_funcs.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/info.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/json.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/plots.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/raw.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/sample.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/style.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/smp/table.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/test.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/thermo/__init__.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/thermo/arrhenius.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/thermo/atomic_level_random_walk.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy/thermo/basic.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy.egg-info/SOURCES.txt +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy.egg-info/dependency_links.txt +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/ararpy.egg-info/top_level.txt +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/setup.cfg +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/tests/test.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/tests/test2.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/tests/test_error_correlation.py +0 -0
- {ararpy-0.1.193 → ararpy-0.1.195}/tests/test_regression_methods.py +0 -0
|
@@ -575,7 +575,7 @@ def wtd_mean(a: list, e: list, sf: int = 1, adjust_error: bool = True):
|
|
|
575
575
|
k0 = sum(a * wt) / sum(wt) # error weighting
|
|
576
576
|
k4 = sum((a - k0) ** 2 * wt) # Chi square
|
|
577
577
|
k3 = k4 / df # MSWD mentioned in Min et al., 2000
|
|
578
|
-
if adjust_error:
|
|
578
|
+
if adjust_error and k3 > 1:
|
|
579
579
|
k1 = (k3 / sum(wt)) ** .5
|
|
580
580
|
else:
|
|
581
581
|
k1 = (1 / sum(wt)) ** .5
|
|
@@ -500,10 +500,16 @@ def set_params(smp: Sample, params: Union[List, str], flag: Optional[str] = None
|
|
|
500
500
|
flag = params.split(".")[-1]
|
|
501
501
|
return set_params(smp, read_params(params), flag=flag)
|
|
502
502
|
|
|
503
|
+
def isValid(item):
|
|
504
|
+
valid = True
|
|
505
|
+
if isinstance(item, (float, int)):
|
|
506
|
+
valid = not np.isnan(item)
|
|
507
|
+
return valid and item is not None and item != ""
|
|
508
|
+
|
|
503
509
|
def remove_none(old_params, new_params, row_list, length):
|
|
504
510
|
res = [[old_params[i][j] if j < len(old_params[i]) else None for j in range(max(len(old_params[i]), length))] for i in range(len(old_params))]
|
|
505
511
|
for index, item in enumerate(new_params):
|
|
506
|
-
if item
|
|
512
|
+
if isValid(item):
|
|
507
513
|
for row in row_list:
|
|
508
514
|
res[index][row] = item
|
|
509
515
|
return res
|
|
@@ -349,7 +349,7 @@ def calc_degas_r(sample: Sample):
|
|
|
349
349
|
"""
|
|
350
350
|
ar40ar = calc.arr.sub(sample.CorrectedValues[8:10], sample.DegasValues[30:32])
|
|
351
351
|
ar40r = calc.arr.sub(ar40ar, sample.DegasValues[26:28])
|
|
352
|
-
ar40r[0] = [
|
|
352
|
+
ar40r[0] = [0 if item < 0 and sample.TotalParam[101][index] else item for index, item in enumerate(ar40r[0])]
|
|
353
353
|
sample.DegasValues[24:26] = copy.deepcopy(ar40r)
|
|
354
354
|
sample.PublishValues[4] = copy.deepcopy(ar40r[0])
|
|
355
355
|
|
|
@@ -1069,7 +1069,7 @@ class WritingWorkbook:
|
|
|
1069
1069
|
material = self.sample.Info.sample.material
|
|
1070
1070
|
weight = self.sample.Info.sample.weight
|
|
1071
1071
|
J_value = self.sample.TotalParam[67][0]
|
|
1072
|
-
J_error = self.sample.TotalParam[68][0]
|
|
1072
|
+
J_error = self.sample.TotalParam[68][0] * self.sample.TotalParam[67][0] / 100
|
|
1073
1073
|
sigma = self.sample.Info.preference['confidenceLevel']
|
|
1074
1074
|
sequence_type = {"StepLaser": "Laser", "StepFurnace": "Temperature", "StepCrusher": "Drop", }.get(method, "Step Value")
|
|
1075
1075
|
sequence_unit = self.sample.Info.sample.sequence_unit if self.sample.Info.sample.sequence_unit != "" else "Unit"
|
|
@@ -268,10 +268,10 @@ def initial_plot_styles(sample: Sample, except_attrs=None):
|
|
|
268
268
|
set_attr(plot, key, attr)
|
|
269
269
|
|
|
270
270
|
|
|
271
|
-
def re_set_smp(
|
|
271
|
+
def re_set_smp(smp: Sample):
|
|
272
272
|
std = initial(Sample())
|
|
273
|
-
basic.get_merged_smp(
|
|
274
|
-
return
|
|
273
|
+
basic.get_merged_smp(smp, std)
|
|
274
|
+
return check_version(smp)
|
|
275
275
|
|
|
276
276
|
|
|
277
277
|
def check_version(smp: Sample):
|
|
@@ -286,10 +286,11 @@ def check_version(smp: Sample):
|
|
|
286
286
|
|
|
287
287
|
"""
|
|
288
288
|
if smp.version != samples.VERSION:
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
std = initial(Sample())
|
|
290
|
+
basic.get_merged_smp(smp, std)
|
|
291
|
+
# if int(smp.version) <= 20250328: # Experiment info
|
|
292
|
+
smp.Info.experiment.name = smp.name()
|
|
293
|
+
smp.Info.experiment.step_num = smp.sequence().size
|
|
293
294
|
return smp
|
|
294
295
|
|
|
295
296
|
|
|
@@ -356,7 +357,7 @@ def from_calc_files(file_path: str, **kwargs):
|
|
|
356
357
|
"""
|
|
357
358
|
file = calc_file.ArArCalcFile(file_path=file_path, **kwargs).open()
|
|
358
359
|
sample = create_sample_from_df(file.get_content(), file.get_smp_info())
|
|
359
|
-
return sample
|
|
360
|
+
return check_version(sample)
|
|
360
361
|
|
|
361
362
|
|
|
362
363
|
# create
|
|
@@ -375,7 +376,7 @@ def from_full_files(file_path: str, sample_name: str = None):
|
|
|
375
376
|
sample_name = str(os.path.split(file_path)[-1]).split('.')[0]
|
|
376
377
|
content, sample_info = calc_file.open_full_xls(file_path, sample_name)
|
|
377
378
|
sample = create_sample_from_dict(content=content, smp_info=sample_info)
|
|
378
|
-
return sample
|
|
379
|
+
return check_version(sample)
|
|
379
380
|
|
|
380
381
|
|
|
381
382
|
# create
|
|
@@ -453,4 +454,4 @@ def from_raw_data(raw: RawData, mapping: Optional[List[dict]] = None) -> Sample:
|
|
|
453
454
|
|
|
454
455
|
# sample.TotalParam[31] = [raw.get_sequence(row['unknown'], flag='name').datetime for row in mapping]
|
|
455
456
|
|
|
456
|
-
return sample
|
|
457
|
+
return check_version(sample)
|
|
@@ -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.195', # 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
|