ararpy 0.1.29__py3-none-any.whl → 0.1.30__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/calc/raw_funcs.py CHANGED
@@ -29,6 +29,9 @@ def get_raw_data_regression_results(points_data, unselected: list = None):
29
29
  -------
30
30
 
31
31
  """
32
+ def power(a0, a1):
33
+ # return regression.power(a0, a1)
34
+ raise ValueError("Deprecated regression")
32
35
  # if unselected is None:
33
36
  # unselected = []
34
37
  # linesData = []
@@ -36,7 +39,7 @@ def get_raw_data_regression_results(points_data, unselected: list = None):
36
39
  # un_x = transpose(unselected)[0] if is_twoD(unselected) else []
37
40
  reg_handler = [
38
41
  regression.linest, regression.quadratic, regression.exponential,
39
- regression.power, regression.average]
42
+ power, regression.average]
40
43
  # size = 50
41
44
  # lines_x = [(max(x + un_x) - 0) / size * i for i in range(size + 1)]
42
45
  for i in range(len(reg_handler)):
ararpy/files/raw_file.py CHANGED
@@ -22,6 +22,7 @@ from parse import parse as string_parser
22
22
  import dateutil.parser as datetime_parser
23
23
  from ..calc.arr import get_item
24
24
  from ..calc.basic import utc_dt
25
+ from ..smp.sample import RawData
25
26
 
26
27
  """ Open raw data file """
27
28
 
@@ -211,8 +212,28 @@ def open_raw_xls(file_path, input_filter: List[Union[str, int]]):
211
212
 
212
213
 
213
214
  def open_raw_seq(file_path, input_filter=None):
215
+
216
+ class RenameUnpickler(pickle.Unpickler):
217
+ def find_class(self, module: str, name: str):
218
+ MODULE = RawData().__module__
219
+ renamed_module = module
220
+ if '.sample' in module and module != MODULE:
221
+ renamed_module = MODULE
222
+ try:
223
+ return super(RenameUnpickler, self).find_class(renamed_module, name)
224
+ except AttributeError:
225
+ return super(RenameUnpickler, self).find_class(renamed_module, 'ArArBasic')
226
+
227
+ def renamed_load(file_obj):
228
+ return RenameUnpickler(file_obj).load()
229
+
214
230
  with open(file_path, 'rb') as f:
215
- sequences = pickle.load(f)
231
+ sequences = renamed_load(f)
232
+
233
+ # with open(file_path, 'rb') as f:
234
+ # sequences = pickle.load(f)
235
+ # print(sequences[0].__module__)
236
+
216
237
  name_list = []
217
238
  for seq in sequences:
218
239
  while seq.name in name_list:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ararpy
3
- Version: 0.1.29
3
+ Version: 0.1.30
4
4
  Summary: A project for Ar-Ar geochronology
5
5
  Home-page: https://github.com/wuyangchn/ararpy.git
6
6
  Author: Yang Wu
@@ -10,7 +10,7 @@ ararpy/calc/histogram.py,sha256=0GVbDdsjd91KQ1sa2B7NtZ4KGo0XpRIJapgIrzAwQUo,5777
10
10
  ararpy/calc/isochron.py,sha256=ej9G2e68k6yszonWHsLcEubh3TA7eh1upTJP_X0ttAA,5726
11
11
  ararpy/calc/jvalue.py,sha256=OL5zPYU8Pac-wOxUWPCgu3onh2n01xDnhpi2mlUsjJM,1146
12
12
  ararpy/calc/plot.py,sha256=sUqjKBdAEjFarUoSCLqf8cbUM0rEAdZhmtyXB2K7LkA,2139
13
- ararpy/calc/raw_funcs.py,sha256=UC01lvA6GyZ5FJv43jgoUULAFoLnZJMxeSa0BeVFCAM,2637
13
+ ararpy/calc/raw_funcs.py,sha256=UPwXlYBwE1ugYRD9rsOs8JqJtm14FGcpWmUpUYJ4Roc,2744
14
14
  ararpy/calc/regression.py,sha256=mHUKobKx-Q9c7E49vPoQA2tA-MwO9BWvCp3VfnuUhUA,39776
15
15
  ararpy/calc/spectra.py,sha256=_Q23eP9necHlaCoHf3_UfW1N3JmVZj5rcWFro8GS-CA,1995
16
16
  ararpy/examples/022_VU124-M11a.ahd,sha256=3m0Gd-ZObou3KsnRNFMf77QwzT1Uz3nu3vA33Sqeyng,5414
@@ -37,7 +37,7 @@ ararpy/files/arr_file.py,sha256=KqksGlEA6nmMQofTgi7v45flscQZVtefxaNCKrV3Am4,837
37
37
  ararpy/files/basic.py,sha256=nc7Hgo_qLSkdmtKzZmd5SQ8Jy0dhW46ly4gh-oisUDs,2095
38
38
  ararpy/files/calc_file.py,sha256=wbt-cQhPnFJ32QyofXvjCPPehmWSj4CHnidkrP7dFgk,28694
39
39
  ararpy/files/new_file.py,sha256=efblARIBROVLWS2w3-98BxLX5VZ8grRpiTkJFtf_rAk,214
40
- ararpy/files/raw_file.py,sha256=PSJ0WwZHSIRrNDre69UwzpGevZQkI7utqhm9aKAm_Rs,20797
40
+ ararpy/files/raw_file.py,sha256=AUvx5Uh3aTQvGy7mXQ7771CeqFZ8u-KgdJvVOD-pU8k,21557
41
41
  ararpy/files/xls.py,sha256=DVcZ_yRnc19p-m4leGGjt-YPDpSa2udYKmGyrM0qub0,640
42
42
  ararpy/smp/EXPORT_TO_PDF_DATA_PROPERTIES.py,sha256=baDM437tu6hsPv0uYfod0TREXlPd6kvMBFT1S9ZZlkk,3024
43
43
  ararpy/smp/__init__.py,sha256=k6_fa27UJsQK7K7oC5GYlwMo6l0Xd8af3QtOrZz2XJk,478
@@ -59,8 +59,8 @@ ararpy/thermo/__init__.py,sha256=6VBuqTRFl403PVqOuMkVrut0nKaQsAosBmfW91X1dMg,263
59
59
  ararpy/thermo/arrhenius.py,sha256=Ass1ichHfqIAtpv8eLlgrUc1UOb3Urh1qzr1E3gLB4U,233
60
60
  ararpy/thermo/atomic_level_random_walk.py,sha256=Q97zfe2h2RaxADkoBAqd0uEiP16BFOajrTmXHMkL2EQ,25502
61
61
  ararpy/thermo/basic.py,sha256=nBGHI9uK7VdJwThwBIOcKAzdnYqPyQseFoY6s4zKizk,11504
62
- ararpy-0.1.29.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
63
- ararpy-0.1.29.dist-info/METADATA,sha256=4OPGl6KfTwxwSI6oU5gcILqUjMTrazzzhC-acKZ54MY,24516
64
- ararpy-0.1.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
- ararpy-0.1.29.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
66
- ararpy-0.1.29.dist-info/RECORD,,
62
+ ararpy-0.1.30.dist-info/licenses/LICENSE,sha256=cvG5t_C1qY_zUyJI7sNOa7gCArdngNPaOrfujl2LYuc,1085
63
+ ararpy-0.1.30.dist-info/METADATA,sha256=OkwCC5DEb-8Q_ZtpeNhcLuYsBvA6nzyVQ6ZMpRYjkko,24516
64
+ ararpy-0.1.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
+ ararpy-0.1.30.dist-info/top_level.txt,sha256=9iTpsPCYuRYq09yQTk9d2lqB8JtTEOmbN-IcGB-K3vY,7
66
+ ararpy-0.1.30.dist-info/RECORD,,