metrolopy 0.6.5__py3-none-any.whl → 1.0.0__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.
metrolopy/constant.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # module constant
4
4
 
5
- # Copyright (C) 2019 National Research Council Canada
5
+ # Copyright (C) 2025 National Research Council Canada
6
6
  # Author: Harold Parks
7
7
 
8
8
  # This file is part of MetroloPy.
@@ -28,16 +28,17 @@ from .indexed import Indexed
28
28
  from .gummy import gummy,jummy
29
29
  from .unitutils import _mrtxt
30
30
  from importlib import import_module
31
- from .printing import PrettyPrinter,print_markdown,print_html,ipython_installed
31
+ from .printing import PrettyPrinter
32
32
  from .exceptions import ConstantNotFoundError
33
33
  from .printing import _latex_math
34
34
 
35
35
  class GummyConstant(gummy,Indexed):
36
36
 
37
+ _case_sensitive = False
37
38
  return_toummy = False
38
39
  return_splonk = False
39
40
 
40
- _builtins_to_import = ['..codata2018']
41
+ _builtins_to_import = ['..builtin_constants']
41
42
 
42
43
  _builtin_lib = {}
43
44
  _lib = {}
@@ -92,7 +93,7 @@ class GummyConstant(gummy,Indexed):
92
93
  from the unicode representation of the symbol.
93
94
 
94
95
  description: `str` or `None`, optional
95
- a description of the unit
96
+ a description of the constant
96
97
  """
97
98
  if name is None:
98
99
  name = symbol
@@ -133,7 +134,7 @@ class GummyConstant(gummy,Indexed):
133
134
  self.name = name
134
135
 
135
136
  class JummyConstant(jummy,Indexed):
136
- _builtins_to_import = ['..codata2018']
137
+ _builtins_to_import = ['..builtin_constants']
137
138
 
138
139
  _builtin_lib = {}
139
140
  _lib = {}
@@ -221,16 +222,85 @@ def constant(name,toummy=None,splonk=None):
221
222
 
222
223
  return ret
223
224
 
224
- class _search_display(PrettyPrinter):
225
- def __init__(self,search,constants):
226
- self.search = search
225
+ class search_constants_result(PrettyPrinter):
226
+ """
227
+ A `search_constants_result` instance emulates a list of constants returned
228
+ from a 'search_constants` function call, and pretty-prints the results to
229
+ the output
230
+ """
231
+
232
+ def __init__(self,constants):
227
233
  self.constants = constants
228
234
 
229
235
  def tostring(self,fmt='unicode',**kwds):
230
- return search_constants(self.search,fmt=fmt,constants=self.constants,
231
- prnt=False)
236
+ if fmt == 'latex':
237
+ txt = "<ul style=\"font-family: 'Times New Roman', Times, serif;font-size:1.2em\">\n"
238
+ elif fmt == 'html':
239
+ txt = "<ul>\n"
240
+ else:
241
+ txt = ''
242
+ for u in self.constants:
243
+ if fmt in ['latex','html']:
244
+ txt += "<li>"
245
+ try:
246
+ txt += u.name + ' '
247
+
248
+ if fmt == 'latex':
249
+ txt += _latex_math(u.tostring(fmt=fmt,show_name=True))
250
+ else:
251
+ txt += u.tostring(fmt=fmt,show_name=True)
252
+
253
+ aliases = u.aliases
254
+ if len(aliases) == 1:
255
+ txt += ', alias: ' + _mrtxt(aliases.pop(),fmt)
256
+ if len(aliases) > 1:
257
+ txt += ', aliases: '
258
+ if u.short_name in aliases:
259
+ txt += _mrtxt(u.short_name,fmt) + ', '
260
+ aliases.remove(u.short_name)
261
+ txt += _mrtxt(', '.join(sorted(aliases,key=str.lower)),fmt)
262
+
263
+ saliases = u.shadowed_aliases
264
+ if len(saliases) > 0:
265
+ if len(aliases) > 0:
266
+ txt += '; '
267
+ else:
268
+ txt += ', '
269
+ if len(saliases) == 1:
270
+ txt += 'shadowed alias: ' + _mrtxt(saliases.pop(),fmt)
271
+ else:
272
+ txt += 'shadowed aliases: ' + _mrtxt(', '.join(sorted(saliases,key=str.lower)),fmt)
273
+ except:
274
+ raise
275
+ txt += '??'
276
+
277
+ if fmt == 'html' or fmt == 'latex':
278
+ txt += '</li>\n'
279
+ else:
280
+ txt += '\n'
281
+
282
+ txt = txt[:-1]
283
+ if fmt in ['latex','html']:
284
+ txt += '</ul>'
285
+
286
+ return txt
287
+
288
+ def __len__(self):
289
+ return len(self.constants)
290
+
291
+ def __getitem__(self,i):
292
+ return self.constants[i]
293
+
294
+ def __iter__(self):
295
+ return iter(self.constants)
296
+
297
+ def __reversed__(self):
298
+ return reversed(self.constants)
299
+
300
+ def __contains__(self,item):
301
+ return item in self.constants
232
302
 
233
- def search_constants(search=None,fmt=None,constants=None,prnt=True):
303
+ def search_constants(search=None,fmt=None,constants=None):
234
304
  """
235
305
  Prints a list of all loaded constant or all constants that match the search
236
306
  terms.
@@ -250,39 +320,38 @@ def search_constants(search=None,fmt=None,constants=None,prnt=True):
250
320
  constants: `list` of `str`,optional
251
321
  A list of constants to print. If this parameter is specified the values
252
322
  of the search and `show_all` parameters are ignored.
253
-
254
- prnt: `bool`, optional
255
- If this is `True`, the results are printed. If it is `False` the results
256
- are returned as a string. The default is `True`.
323
+
324
+ Returns
325
+ -------
326
+ A `search_constants_result` instance which emulates a list of the returned
327
+ constants and pretty-prints the results to the output or `None` if no
328
+ constants are found.
257
329
  """
258
330
 
259
- if fmt is None and prnt:
260
- return _search_display(search,constants)
261
-
262
- fmt = fmt.lower().strip()
263
- if fmt == 'utf-8':
264
- fmt = 'unicode'
331
+ if fmt is not None:
332
+ fmt = fmt.lower().strip()
333
+ if fmt == 'utf-8':
334
+ fmt = 'unicode'
265
335
 
266
336
  if constants is None:
267
337
  while len(GummyConstant._builtins_to_import) > 0:
268
338
  import_module(GummyConstant._builtins_to_import.pop(),
269
339
  GummyConstant.__module__)
270
340
 
271
- constants = {id(c):c for c in GummyConstant._builtin_lib.values()}
272
- constants.update({id(c):c for c in GummyConstant._lib.values()})
273
- constants.update({id(c):c for c in JummyConstant._builtin_lib.values()})
274
- constants.update({id(c):c for c in JummyConstant._lib.values()})
275
- constants = constants.values()
341
+ iconstants = {id(c):c for c in GummyConstant._builtin_lib.values()}
342
+ iconstants.update({id(c):c for c in GummyConstant._lib.values()})
343
+ iconstants.update({id(c):c for c in JummyConstant._builtin_lib.values()})
344
+ iconstants.update({id(c):c for c in JummyConstant._lib.values()})
345
+ iconstants = iconstants.values()
276
346
 
277
347
  if search is None:
348
+ constants = iconstants
278
349
  if len(constants) == 0:
279
- if prnt:
280
- print('no constants are loaded')
281
- return
282
- return ''
350
+ print('no constants are loaded')
351
+ return None
283
352
  else:
284
- uf = set()
285
- for u in constants:
353
+ constants = []
354
+ for u in iconstants:
286
355
  s = set()
287
356
  for a in u.aliases:
288
357
  s = s.union(set(a.lower().split()))
@@ -300,19 +369,17 @@ def search_constants(search=None,fmt=None,constants=None,prnt=True):
300
369
 
301
370
  srch = search.lower().split()
302
371
  ad = True
372
+
303
373
  for a in srch:
304
374
  if a.strip(',.;') not in s:
305
375
  ad = False
306
376
  break
307
377
  if ad:
308
- uf.add(u)
378
+ constants.append(u)
309
379
 
310
- constants = uf
311
380
  if len(constants) == 0:
312
- if prnt:
313
- print('no constants found matching "' + search + '"')
314
- return
315
- return ''
381
+ print('no constants found matching "' + search + '"')
382
+ return None
316
383
 
317
384
  uf = []
318
385
  for u in constants:
@@ -328,73 +395,14 @@ def search_constants(search=None,fmt=None,constants=None,prnt=True):
328
395
 
329
396
  constants = sorted(constants,key=lambda u:u[0].lower())
330
397
 
331
- if fmt == 'latex':
332
- txt = "<ul style=\"font-family: 'Times New Roman', Times, serif;font-size:1.2em\">\n"
333
- elif fmt == 'html':
334
- txt = "<ul>\n"
335
- else:
336
- txt = ''
337
- for u in constants:
338
- if fmt in ['latex','html']:
339
- txt += "<li>"
340
- try:
341
- u = u[1]
342
- txt += u.name + ' '
343
-
344
- if fmt == 'latex':
345
- txt += _latex_math(u.tostring(fmt=fmt,show_name=True))
346
- else:
347
- txt += u.tostring(fmt=fmt,show_name=True)
348
-
349
- aliases = u.aliases
350
- if len(aliases) == 1:
351
- txt += ', alias: ' + _mrtxt(aliases.pop(),fmt)
352
- if len(aliases) > 1:
353
- txt += ', aliases: '
354
- if u.short_name in aliases:
355
- txt += _mrtxt(u.short_name,fmt) + ', '
356
- aliases.remove(u.short_name)
357
- txt += _mrtxt(', '.join(sorted(aliases,key=str.lower)),fmt)
358
-
359
- saliases = u.shadowed_aliases
360
- if len(saliases) > 0:
361
- if len(aliases) > 0:
362
- txt += '; '
363
- else:
364
- txt += ', '
365
- if len(saliases) == 1:
366
- txt += 'shadowed alias: ' + _mrtxt(saliases.pop(),fmt)
367
- else:
368
- txt += 'shadowed aliases: ' + _mrtxt(', '.join(sorted(saliases,key=str.lower)),fmt)
369
- except:
370
- raise
371
- txt += '??'
372
-
373
- if fmt == 'html' or fmt == 'latex':
374
- txt += '</li>\n'
375
- else:
376
- txt += '\n'
377
-
378
- txt = txt[:-1]
379
- if fmt in ['latex','html']:
380
- txt += '</ul>'
381
-
382
- if not prnt:
383
- return txt
384
-
385
- if fmt == 'latex' and ipython_installed:
386
- print_markdown(txt)
387
- elif fmt == 'html' and ipython_installed:
388
- print_html(txt)
389
- else:
390
- print(txt)
398
+ return search_constants_result([u[1] for u in constants])
391
399
 
392
400
 
393
401
  def shadowed_constants(fmt=None,prnt=True):
394
402
  """
395
403
  Lists any constants which have a shadowed name or alias. Constants may be
396
- shadowed if the user has defined a new unit with the same name or alias as
397
- an existing unit.
404
+ shadowed if the user has defined a new constant with the same name or alias
405
+ as an existing constant.
398
406
 
399
407
  Parameters
400
408
  ---------
@@ -402,10 +410,6 @@ def shadowed_constants(fmt=None,prnt=True):
402
410
  The output format. If `None`, then the `gummy.printer` value is used.
403
411
  If latex output is selected, Markdown is actually used with the unit
404
412
  symbols and conversion displayed using inline LaTeX.
405
-
406
- prnt: `bool`, optional
407
- If this is `True`, the results are printed. If it is `False` the results
408
- are returned as a string. The default is `True`.
409
413
  """
410
414
  constants = {id(c):c for c in GummyConstant._builtin_lib.values()}
411
415
  constants.update({id(c):c for c in GummyConstant._lib.values()})
metrolopy/constcom.py CHANGED
@@ -28,7 +28,8 @@ are from CODATA 2018
28
28
  import numpy as np
29
29
  from warnings import warn
30
30
  from .gummy import gummy
31
- from .ummy import ummy,MFraction,_getfinfo,_iinfo
31
+ from .ummy import ummy,_getfinfo,_iinfo
32
+ from .unit import MFraction
32
33
 
33
34
 
34
35
  def _rounding_u(x):
@@ -49,89 +50,89 @@ euler = _rounding_u(np.e)
49
50
  sqrt2 = _rounding_u(np.sqrt(2))
50
51
 
51
52
 
52
- # constants from CODATA 2018:
53
+ # constants from CODATA 2022:
53
54
 
54
55
  (
55
- alph,
56
- aral,
57
- ryd,
58
- are,
59
- mpsme,
60
- ae,
61
- rd,
62
- ghn,
63
- arh,
64
- sigmah,
65
- mmu,
66
- amu,
67
- arn,
68
- gnn,
69
- ard,
70
- gdn,
71
- gp,
72
- sigmapp,
73
- mtu,
74
- gtn
75
- ) = gummy.create([0.0072973525693,
76
- 4.001506179127,
77
- 10973731.56816,
78
- 0.000548579909065,
79
- 1836.15267343,
80
- 0.00115965218128,
81
- 2.12799e-15,
82
- -4.255250615,
83
- 3.014932247175,
84
- 5.996743000000001e-05,
85
- 1.8835316269999999e-28,
86
- 0.00116592089,
87
- 1.00866491595,
88
- -3.82608545,
89
- 2.013553212745,
90
- 0.8574382338,
91
- 5.5856946893,
92
- 2.5689000000000004e-05,
93
- 3.01550071621,
94
- 5.957924931],
95
- u=[1.1e-12,
96
- 6.3e-11,
97
- 2.1e-05,
98
- 1.6e-14,
99
- 1.1e-07,
100
- 1.8e-13,
101
- 7.4e-19,
102
- 5e-08,
103
- 9.7e-11,
104
- 1.0e-10,
105
- 4.2e-36,
106
- 6.3e-10,
107
- 4.9e-10,
108
- 9e-07,
109
- 4e-11,
110
- 2.2e-09,
111
- 1.6e-09,
112
- 1.1e-08,
113
- 1.2e-10,
114
- 1.2e-08],
115
- correlation_matrix=[[ 1, 0.00003, 0.00207,-0.05927, 0.03103, 0.99492, 0.00320,-0.00017, 0.00147, 0.00000,-0.00013, 0.00055, 0.00003,-0.00001, 0.00002, 0.00005, 0.00001,-0.00019, 0.00117, 0.00000],
116
- [ 0.00003, 1,-0.00000,-0.00050, 0.00024, 0.00003,-0.00000,-0.00000, 0.00000, 0.00000, 0.00000,-0.00000, 0.00000,-0.00000, 0.00000, 0.00000, 0.00000,-0.00000, 0.00000, 0.00000],
117
- [ 0.00207,-0.00000, 1, 0.00704,-0.01206, 0.00206, 0.90366, 0.00006,-0.00578, 0.00000, 0.00017, 0.00001, 0.00044, 0.00000,-0.00093,-0.00002,-0.00000, 0.00007,-0.00463,-0.00000],
118
- [-0.05927,-0.00050, 0.00704, 1,-0.48443,-0.05896, 0.00317, 0.00249,-0.00044, 0.00000,-0.00001, 0.00002,-0.00003, 0.00012,-0.00040,-0.00067,-0.00016, 0.00267,-0.00022,-0.00002],
119
- [ 0.03103, 0.00024,-0.01206,-0.48443, 1, 0.03087,-0.01113,-0.00513, 0.47743, 0.00000, 0.00003,-0.00009,-0.03920,-0.00026, 0.00020, 0.00137, 0.00032,-0.00551, 0.38235, 0.00005],
120
- [ 0.99492, 0.00003, 0.00206,-0.05896, 0.03087, 1, 0.00319,-0.00017, 0.00146, 0.00000,-0.00013, 0.00055, 0.00003,-0.00001, 0.00002, 0.00005, 0.00001,-0.00019, 0.00116, 0.00000],
121
- [ 0.00320,-0.00000, 0.90366, 0.00317,-0.01113, 0.00319, 1, 0.00006,-0.00511, 0.00000, 0.00016, 0.00001, 0.00049, 0.00000, 0.00209,-0.00002,-0.00000, 0.00006,-0.00410,-0.00000],
122
- [-0.00017,-0.00000, 0.00006, 0.00249,-0.00513,-0.00017, 0.00006, 1,-0.00245,-0.00854,-0.00000, 0.00000, 0.00020, 0.04291,-0.00000,-0.00001,-0.00000, 0.92869,-0.00196,-0.00000],
123
- [ 0.00147, 0.00000,-0.00578,-0.00044, 0.47743, 0.00146,-0.00511,-0.00245, 1, 0.00000, 0.00001,-0.00005,-0.02445,-0.00012, 0.41560, 0.00066, 0.00015,-0.00263, 0.80098, 0.00002],
124
- [ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000,-0.00854, 0.00000, 1, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000],
125
- [-0.00013, 0.00000, 0.00017,-0.00001, 0.00003,-0.00013, 0.00016,-0.00000, 0.00001, 0.00000, 1, 0.06971,-0.00000,-0.00000,-0.00000,-0.00002,-0.00016,-0.00000, 0.00001,-0.00002],
126
- [ 0.00055,-0.00000, 0.00001, 0.00002,-0.00009, 0.00055, 0.00001, 0.00000,-0.00005, 0.00000, 0.06971, 1, 0.00000, 0.00000,-0.00000, 0.00006, 0.00054, 0.00002,-0.00004, 0.00008],
127
- [ 0.00003, 0.00000, 0.00044,-0.00003,-0.03920, 0.00003, 0.00049, 0.00020,-0.02445, 0.00000,-0.00000, 0.00000, 1, 0.00001,-0.00000,-0.00005,-0.00001, 0.00022,-0.01959,-0.00000],
128
- [-0.00001,-0.00000, 0.00000, 0.00012,-0.00026,-0.00001, 0.00000, 0.04291,-0.00012, 0.00000,-0.00000, 0.00000, 0.00001, 1,-0.00000,-0.00000,-0.00000, 0.04618,-0.00010,-0.00000],
129
- [ 0.00002, 0.00000,-0.00093,-0.00040, 0.00020, 0.00002, 0.00209,-0.00000, 0.41560, 0.00000,-0.00000,-0.00000,-0.00000,-0.00000, 1, 0.00000, 0.00000,-0.00000, 0.33288, 0.00000],
130
- [ 0.00005, 0.00000,-0.00002,-0.00067, 0.00137, 0.00005,-0.00002,-0.00001, 0.00066, 0.00000,-0.00002, 0.00006,-0.00005,-0.00000, 0.00000, 1, 0.10706, 0.00289, 0.00053, 0.01581],
131
- [ 0.00001, 0.00000,-0.00000,-0.00016, 0.00032, 0.00001,-0.00000,-0.00000, 0.00015, 0.00000,-0.00016, 0.00054,-0.00001,-0.00000, 0.00000, 0.10706, 1, 0.02707, 0.00012, 0.14766],
132
- [-0.00019,-0.00000, 0.00007, 0.00267,-0.00551,-0.00019, 0.00006, 0.92869,-0.00263, 0.00000,-0.00000, 0.00002, 0.00022, 0.04618,-0.00000, 0.00289, 0.02707, 1,-0.00211, 0.00400],
133
- [ 0.00117, 0.00000,-0.00463,-0.00022, 0.38235, 0.00116,-0.00410,-0.00196, 0.80098, 0.00000, 0.00001,-0.00004,-0.01959,-0.00010, 0.33288, 0.00053, 0.00012,-0.00211, 1, 0.00002],
134
- [ 0.00000, 0.00000,-0.00000,-0.00002, 0.00005, 0.00000,-0.00000,-0.00000, 0.00002, 0.00000,-0.00002, 0.00008,-0.00000,-0.00000, 0.00000, 0.01581, 0.14766, 0.00400, 0.00002, 1]]
56
+ alph, # fine structure constant
57
+ aral, # alpha particle mass in u
58
+ ryd, # Rydberg constant (1/m)
59
+ are, # electron mass in u
60
+ mpsme, # proton-electron mass ratio
61
+ ae, # electron mag. mom. anomaly
62
+ rd, # deuteron rms charge radius (m)
63
+ ghn, # helion g factor
64
+ arh, # helion relative atomic mass
65
+ sigmah, # helion shielding shift
66
+ mmu, # muon mass (kg)
67
+ amu, # muon mag. mom. anomaly
68
+ arn, # neutron mass in u
69
+ gnn, # neutron g factor
70
+ ard, # deuteron relative atomic mass
71
+ gdn, # deuteron g factor
72
+ gp, # proton g factor
73
+ sigmapp, # proton sheilding factor
74
+ mtu, # triton relative atomic mass
75
+ gtn # triton g factor
76
+ ) = gummy.create([7.2973525643e-3,
77
+ 4.001506179129,
78
+ 10973731.568157,
79
+ 5.485799090441e-4,
80
+ 1836.152673426,
81
+ 1.15965218046e-3,
82
+ 2.12778e-15,
83
+ -4.2552506995,
84
+ 3.014932246932,
85
+ 5.9967029e-5,
86
+ 1.883531627e-28,
87
+ 1.16592062e-3,
88
+ 1.00866491606,
89
+ -3.82608552,
90
+ 2.013553212544,
91
+ 0.8574382335,
92
+ 5.5856946893,
93
+ 2.56715e-5,
94
+ 3.01550071597,
95
+ 5.957924930],
96
+ u=[0.0000000011e-3,
97
+ 0.000000000062,
98
+ 0.000012,
99
+ 0.000000000097e-4,
100
+ 0.000000032,
101
+ 0.00000000018e-3,
102
+ 0.00027e-15 ,
103
+ 0.0000000034,
104
+ 0.000000000074,
105
+ 0.0000023e-5,
106
+ 0.000000042e-28,
107
+ 0.00000041e-3,
108
+ 0.00000000040,
109
+ 0.00000090,
110
+ 0.000000000015,
111
+ 0.000000002,
112
+ 0.0000000016,
113
+ 0.00041e-5,
114
+ 0.00000000010,
115
+ 0.000000012],
116
+ correlation_matrix=[[ 1, 0.00001, 0.00125,-0.03972, 0.03527, 0.97556, 0.00036, 0.00000,-0.00332, 0.00000,-0.00014, 0.00087, 0.00168, 0.00000,-0.01036, 0.00002, 0.00000,-0.00003,-0.00237, 0.00000],
117
+ [ 0.00001, 1, 0.00001,-0.00031, 0.00028, 0.00001,-0.00001, 0.00000,-0.00002, 0.00000, 0.00000,-0.00000, 0.00000,-0.00007, 0.00000, 0.00000, 0.00000, 0.00000,-0.00002, 0.00000],
118
+ [ 0.00125, 0.00001, 1,-0.03754,-0.04138, 0.00225, 0.60917, 0.00000, 0.00203, 0.00000, 0.00010, 0.00000, 0.00010, 0.00000, 0.00645, 0.00002, 0.00000,-0.00002, 0.00145, 0.00000],
119
+ [-0.03972,-0.00031,-0.03754, 1,-0.88879,-0.03875, 0.02306, 0.00009, 0.08307, 0.00000,-0.00001, 0.00000, 0.00397, 0.00001, 0.25967,-0.00035,-0.00008, 0.00052, 0.05946,-0.00001],
120
+ [ 0.03527, 0.00028,-0.04138,-0.88879, 1, 0.03441,-0.02598,-0.00010, 0.05140, 0.00000, 0.00001,-0.00001, 0.00130,-0.00001, 0.14561, 0.00040, 0.00009,-0.00059,-0.00232, 0.00000],
121
+ [ 0.97556, 0.00001, 0.00225,-0.03875, 0.03441, 1, 0.00035, 0.00000,-0.00323, 0.00000,-0.00013, 0.00085, 0.00164, 0.00000,-0.01011, 0.00002, 0.00000,-0.00003, 0.00116, 0.00000],
122
+ [ 0.00036,-0.00001, 0.60917, 0.02306,-0.02598, 0.00035, 1, 0.00000,-0.00134, 0.00000, 0.00006, 0.00000,-0.00003, 0.00000,-0.00375,-0.00001, 0.00000, 0.00002,-0.00095, 0.00000],
123
+ [ 0.00000, 0.00000, 0.00000, 0.00009,-0.00010, 0.00000, 0.00000, 1,-0.00001,-0.02844,-0.00004,-0.00199, 0.00000, 0.00296,-0.00001, 0.00000, 0.00000, 0.17032, 0.00000, 0.00000],
124
+ [-0.00332,-0.00002, 0.00203, 0.08307, 0.05140,-0.00323,-0.00134,-0.00001, 1, 0.00000, 0.00000,-0.00001, 0.00513, 0.00000, 0.29794, 0.00002, 0.00000,-0.00003, 0.71472, 0.00000],
125
+ [ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000,-0.02844, 0.00000, 1, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000],
126
+ [-0.00014, 0.00000, 0.00010,-0.00001, 0.00001,-0.00013, 0.00006,-0.00004, 0.00000, 0.00000, 1, 0.08172, 0.00000, 0.00000, 0.00000,-0.00002,-0.00018,-0.00023, 0.00000,-0.00003],
127
+ [ 0.00087,-0.00000, 0.00000, 0.00000,-0.00001, 0.00085, 0.00000,-0.00199,-0.00001, 0.00000, 0.08172, 1, 0.00000,-0.00020,-0.00002, 0.00000,-0.00001,-0.01160, 0.00000, 0.00000],
128
+ [ 0.00168, 0.00000, 0.00010, 0.00397, 0.00130, 0.00164,-0.00003, 0.00000, 0.00513, 0.00000, 0.00000, 0.00000, 1, 0.00000, 0.01921, 0.00000, 0.00000, 0.00000, 0.00366, 0.00000],
129
+ [ 0.00000,-0.00007, 0.00000, 0.00001,-0.00001, 0.00000, 0.00000, 0.00296, 0.00000, 0.00000, 0.00000,-0.00020, 0.00000, 1, 0.00000, 0.00000, 0.00000, 0.01731, 0.00000, 0.00000],
130
+ [-0.01036, 0.00000, 0.00645, 0.25967, 0.14561,-0.01011,-0.00375,-0.00001, 0.29794, 0.00000, 0.00000,-0.00002, 0.01921, 0.00000, 1, 0.00006, 0.00001,-0.00009, 0.21297, 0.00000],
131
+ [ 0.00002, 0.00000, 0.00002,-0.00035, 0.00040, 0.00002,-0.00001, 0.00000, 0.00002, 0.00000,-0.00002, 0.00000, 0.00000, 0.00000, 0.00006, 1, 0.10706, 0.00770, 0.00001, 0.01581],
132
+ [ 0.00000, 0.00000, 0.00000,-0.00008, 0.00009, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000,-0.00018,-0.00001, 0.00000, 0.00000, 0.00001, 0.10706, 1, 0.07194, 0.00000, 0.14767],
133
+ [-0.00003, 0.00000,-0.00002, 0.00052,-0.00059,-0.00003, 0.00002, 0.17032,-0.00003, 0.00000,-0.00023,-0.01160, 0.00000, 0.01731,-0.00009, 0.00770, 0.07194, 1,-0.00002, 0.01062],
134
+ [-0.00237,-0.00002, 0.00145, 0.05946,-0.00232, 0.00116,-0.00095, 0.00000, 0.71472, 0.00000, 0.00000, 0.00000, 0.00366, 0.00000, 0.21297, 0.00001, 0.00000,-0.00002, 1, 0.00000],
135
+ [ 0.00000, 0.00000, 0.00000,-0.00001, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000,-0.00003, 0.00000, 0.00000, 0.00000, 0.00000, 0.01581, 0.14767, 0.01062, 0.00000, 1]]
135
136
  )
136
137
 
137
138
 
@@ -148,7 +149,7 @@ RK = h/e**2
148
149
  KJ90 = MFraction('483597.9e9') # Josephson constant Hz/V, 1990 conventional value
149
150
  RK90 = MFraction('25812.807') # Von Klitzing constant in ohm, 1990 conventional value
150
151
 
151
- G = ummy(6.67430e-11,0.00015e-11) # gravitational constant in m**3/kg s**2
152
+ G = ummy(6.67430e-11,0.00015e-11) # gravitational constant in m**3/kg s**2, CODATA 2022
152
153
 
153
154
  dalton = 2*ryd*h/(are*c*alph**2)
154
155
  me = 2*ryd*h/(c*alph**2) #electron mass in kg