pygeodesy 24.5.15__py2.py3-none-any.whl → 24.6.1__py2.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.
Files changed (90) hide show
  1. {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/METADATA +6 -5
  2. PyGeodesy-24.6.1.dist-info/RECORD +116 -0
  3. pygeodesy/__init__.py +4 -4
  4. pygeodesy/albers.py +41 -41
  5. pygeodesy/auxilats/__init__.py +1 -1
  6. pygeodesy/auxilats/__main__.py +2 -2
  7. pygeodesy/auxilats/auxAngle.py +32 -31
  8. pygeodesy/auxilats/auxLat.py +80 -51
  9. pygeodesy/azimuthal.py +123 -124
  10. pygeodesy/basics.py +46 -10
  11. pygeodesy/booleans.py +13 -14
  12. pygeodesy/cartesianBase.py +25 -23
  13. pygeodesy/clipy.py +3 -3
  14. pygeodesy/constants.py +3 -3
  15. pygeodesy/css.py +50 -42
  16. pygeodesy/datums.py +42 -41
  17. pygeodesy/deprecated/functions.py +9 -3
  18. pygeodesy/dms.py +6 -6
  19. pygeodesy/ecef.py +41 -41
  20. pygeodesy/ellipsoidalBase.py +41 -41
  21. pygeodesy/ellipsoidalBaseDI.py +3 -4
  22. pygeodesy/ellipsoidalGeodSolve.py +2 -2
  23. pygeodesy/ellipsoidalKarney.py +3 -3
  24. pygeodesy/ellipsoidalNvector.py +11 -12
  25. pygeodesy/ellipsoids.py +45 -38
  26. pygeodesy/elliptic.py +3 -4
  27. pygeodesy/epsg.py +4 -3
  28. pygeodesy/errors.py +52 -20
  29. pygeodesy/etm.py +68 -65
  30. pygeodesy/fmath.py +44 -49
  31. pygeodesy/formy.py +129 -115
  32. pygeodesy/frechet.py +118 -103
  33. pygeodesy/fstats.py +21 -14
  34. pygeodesy/fsums.py +124 -80
  35. pygeodesy/gars.py +10 -9
  36. pygeodesy/geodesicw.py +19 -17
  37. pygeodesy/geodesicx/__init__.py +1 -1
  38. pygeodesy/geodesicx/__main__.py +2 -2
  39. pygeodesy/geodesicx/gx.py +39 -33
  40. pygeodesy/geodesicx/gxarea.py +12 -9
  41. pygeodesy/geodesicx/gxbases.py +3 -4
  42. pygeodesy/geodesicx/gxline.py +6 -8
  43. pygeodesy/geodsolve.py +29 -28
  44. pygeodesy/geohash.py +60 -57
  45. pygeodesy/geoids.py +34 -32
  46. pygeodesy/hausdorff.py +114 -101
  47. pygeodesy/heights.py +137 -130
  48. pygeodesy/internals.py +16 -11
  49. pygeodesy/interns.py +3 -6
  50. pygeodesy/iters.py +19 -17
  51. pygeodesy/karney.py +21 -17
  52. pygeodesy/ktm.py +25 -18
  53. pygeodesy/latlonBase.py +12 -11
  54. pygeodesy/lazily.py +6 -6
  55. pygeodesy/lcc.py +24 -25
  56. pygeodesy/ltp.py +143 -113
  57. pygeodesy/ltpTuples.py +207 -150
  58. pygeodesy/mgrs.py +26 -26
  59. pygeodesy/named.py +172 -90
  60. pygeodesy/namedTuples.py +33 -25
  61. pygeodesy/nvectorBase.py +8 -8
  62. pygeodesy/osgr.py +40 -48
  63. pygeodesy/points.py +18 -18
  64. pygeodesy/props.py +29 -16
  65. pygeodesy/rhumb/__init__.py +1 -1
  66. pygeodesy/rhumb/aux_.py +13 -15
  67. pygeodesy/rhumb/bases.py +12 -5
  68. pygeodesy/rhumb/ekx.py +24 -18
  69. pygeodesy/rhumb/solve.py +13 -10
  70. pygeodesy/simplify.py +16 -16
  71. pygeodesy/solveBase.py +18 -18
  72. pygeodesy/sphericalBase.py +17 -21
  73. pygeodesy/sphericalTrigonometry.py +21 -21
  74. pygeodesy/streprs.py +5 -5
  75. pygeodesy/trf.py +13 -11
  76. pygeodesy/triaxials.py +68 -64
  77. pygeodesy/units.py +35 -35
  78. pygeodesy/unitsBase.py +24 -11
  79. pygeodesy/ups.py +66 -70
  80. pygeodesy/utily.py +3 -3
  81. pygeodesy/utm.py +183 -187
  82. pygeodesy/utmups.py +38 -38
  83. pygeodesy/utmupsBase.py +104 -106
  84. pygeodesy/vector2d.py +6 -7
  85. pygeodesy/vector3d.py +16 -17
  86. pygeodesy/vector3dBase.py +4 -5
  87. pygeodesy/webmercator.py +43 -51
  88. PyGeodesy-24.5.15.dist-info/RECORD +0 -116
  89. {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/WHEEL +0 -0
  90. {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/top_level.txt +0 -0
pygeodesy/fmath.py CHANGED
@@ -12,7 +12,7 @@ from pygeodesy.constants import EPS0, EPS02, EPS1, NAN, PI, PI_2, PI_4, \
12
12
  _0_0, _0_125, _1_6th, _0_25, _1_3rd, _0_5, _1_0, \
13
13
  _N_1_0, _1_5, _copysign_0_0, _isfinite, remainder
14
14
  from pygeodesy.errors import _IsnotError, LenError, _TypeError, _ValueError, \
15
- _xError, _xkwds_get, _xkwds_pop2
15
+ _xError, _xkwds_get1, _xkwds_pop2
16
16
  from pygeodesy.fsums import _2float, Fsum, fsum, fsum1_, _isFsumTuple, _1primed, \
17
17
  Fmt, unstr
18
18
  from pygeodesy.interns import MISSING, _negative_, _not_scalar_
@@ -24,7 +24,7 @@ from math import fabs, sqrt # pow
24
24
  import operator as _operator # in .datums, .trf, .utm
25
25
 
26
26
  __all__ = _ALL_LAZY.fmath
27
- __version__ = '24.05.10'
27
+ __version__ = '24.05.29'
28
28
 
29
29
  # sqrt(2) <https://WikiPedia.org/wiki/Square_root_of_2>
30
30
  _0_4142 = 0.41421356237309504880 # ... sqrt(2) - 1
@@ -39,12 +39,13 @@ class Fdot(Fsum):
39
39
  '''New L{Fdot} precision dot product M{sum(a[i] * b[i] for
40
40
  i=0..len(a)-1)}.
41
41
 
42
- @arg a: Iterable of values (each C{scalar} or an L{Fsum} or
43
- L{Fsum2Tuple} instance).
44
- @arg b: Other values (each C{scalar} or an L{Fsum} or L{Fsum2Tuple}
45
- instance), all positional.
46
- @kwarg name_RESIDUAL: Optional C{B{name}=NN} and C{B{RESIDUAL}=0.0}
47
- threshold, see L{Fsum<Fsum.__init__>}.
42
+ @arg a: Iterable of values (each C{scalar} or an L{Fsum} or L{Fsum2Tuple}
43
+ instance).
44
+ @arg b: Other values (each C{scalar} or an L{Fsum} or L{Fsum2Tuple} instance),
45
+ all positional.
46
+ @kwarg name_RESIDUAL: Optional C{B{name}=NN} (C{str}) and the C{B{RESIDUAL}=0.0}
47
+ threshold (C{scalar}) for raising L{ResidualError}s, see class
48
+ L{Fsum<Fsum.__init__>}.
48
49
 
49
50
  @raise LenError: Unequal C{len(B{a})} and C{len(B{b})}.
50
51
 
@@ -68,10 +69,11 @@ class Fhorner(Fsum):
68
69
  i=0..len(cs)-1)}.
69
70
 
70
71
  @arg x: Polynomial argument (C{scalar} or an L{Fsum} or L{Fsum2Tuple}).
71
- @arg cs: Polynomial coeffients (each C{scalar} or an L{Fsum} or
72
- L{Fsum2Tuple} instance), all positional.
73
- @kwarg name_RESIDUAL: Optional C{B{name}=NN} and C{B{RESIDUAL}=0.0}
74
- threshold, see L{Fsum<Fsum.__init__>}.
72
+ @arg cs: Polynomial coeffients (each C{scalar} or an L{Fsum} or L{Fsum2Tuple}
73
+ instance), all positional.
74
+ @kwarg name_RESIDUAL: Optional C{B{name}=NN} (C{str}) and the C{B{RESIDUAL}=0.0}
75
+ threshold (C{scalar}) for raising L{ResidualError}s, see class
76
+ L{Fsum<Fsum.__init__>}.
75
77
 
76
78
  @raise OverflowError: Partial C{2sum} overflow.
77
79
 
@@ -83,19 +85,7 @@ class Fhorner(Fsum):
83
85
  '''
84
86
  Fsum.__init__(self, **name_RESIDUAL)
85
87
  if cs:
86
- if _isFsumTuple(x):
87
- _mul = self._mul_Fsum
88
- else:
89
- _mul = self._mul_scalar
90
- x = _2float(x=x)
91
- op = Fhorner.__name__
92
- if len(cs) > 1 and x:
93
- for c in reversed(cs):
94
- self._fset_ps(_mul(x, op))
95
- self._fadd(c, op, up=False)
96
- self._update()
97
- else: # x == 0
98
- self._fadd(cs[0], op)
88
+ self._fhorner(x, cs, Fhorner.__name__)
99
89
  else:
100
90
  self._fset_ps(_0_0)
101
91
 
@@ -107,11 +97,12 @@ class Fhypot(Fsum):
107
97
  '''New L{Fhypot} hypotenuse of (the I{root} of) several components
108
98
  (raised to the power I{root}).
109
99
 
110
- @arg xs: Components (each C{scalar} or an L{Fsum} or L{Fsum2Tuple}
111
- instance), all positional.
112
- @kwarg root_name_RESIDUAL_raiser: Optional, exponent and C{B{root}=2}
113
- order, C{B{name}=NN}, C{B{RESIDUAL}=0.0} threshold and
114
- C{B{raiser}=True}, see class L{Fsum<Fsum.__init__>} and
100
+ @arg xs: Components (each C{scalar} or an L{Fsum} or L{Fsum2Tuple} instance),
101
+ all positional.
102
+ @kwarg root_name_RESIDUAL_raiser: Optional, exponent and C{B{root}=2} order
103
+ (C{scalar}), C{B{name}=NN} (C{str}), the C{B{RESIDUAL}=0.0}
104
+ threshold (C{scalar}) and C{B{raiser}=True} (C{bool}) for
105
+ raising L{ResidualError}s, see class L{Fsum<Fsum.__init__>} and
115
106
  method L{root<Fsum.root>}.
116
107
  '''
117
108
  r = None # _xkwds_pop2 error
@@ -134,10 +125,11 @@ class Fpolynomial(Fsum):
134
125
  M{sum(cs[i] * x**i for i=0..len(cs)-1)}.
135
126
 
136
127
  @arg x: Polynomial argument (C{scalar} or an L{Fsum} or L{Fsum2Tuple}).
137
- @arg cs: Polynomial coeffients (each C{scalar} or an L{Fsum} or
138
- L{Fsum2Tuple} instance), all positional.
139
- @kwarg name_RESIDUAL: Optional C{B{name}=NN} and C{B{RESIDUAL}=0.0}
140
- threshold, see L{Fsum<Fsum.__init__>}.
128
+ @arg cs: Polynomial coeffients (each C{scalar} or an L{Fsum} or L{Fsum2Tuple}
129
+ instance), all positional.
130
+ @kwarg name_RESIDUAL: Optional C{B{name}=NN} (C{str}) and the C{B{RESIDUAL}=0.0}
131
+ threshold (C{scalar}) for raising L{ResidualError}s, see class
132
+ L{Fsum<Fsum.__init__>}.
141
133
 
142
134
  @raise OverflowError: Partial C{2sum} overflow.
143
135
 
@@ -162,11 +154,12 @@ class Fpowers(Fsum):
162
154
  '''New L{Fpowers} sum of (the I{power} of) several bases.
163
155
 
164
156
  @arg power: The exponent (C{scalar} or an L{Fsum} or L{Fsum2Tuple}).
165
- @arg xs: One or more bases (each C{scalar} or an L{Fsum} or L{Fsum2Tuple}
166
- instance), all positional.
167
- @kwarg name_RESIDUAL_raiser: Optional C{B{name}=NN}, C{B{RESIDUAL}=0.0}
168
- threshold and C{B{raiser}=True}, see L{Fsum<Fsum.__init__>}
169
- and L{fpow<Fsum.fpow>}.
157
+ @arg xs: One or more bases (each C{scalar} or an L{Fsum} or L{Fsum2Tuple} instance),
158
+ all positional.
159
+ @kwarg name_RESIDUAL_raiser: Optional C{B{name}=NN} (C{str}), the C{B{RESIDUAL}=0.0}
160
+ threshold (C{scalar}) and C{B{raiser}=True} (C{bool}) for raising
161
+ L{ResidualError}s, see class L{Fsum<Fsum.__init__>} and method
162
+ L{fpow<Fsum.fpow>}.
170
163
  '''
171
164
  try:
172
165
  raiser = _Fsum__init__(self, **name_RESIDUAL_raiser)
@@ -183,11 +176,12 @@ class Froot(Fsum):
183
176
  '''New L{Froot} root of a precision sum.
184
177
 
185
178
  @arg root: The order (C{scalar} or an L{Fsum} or L{Fsum2Tuple}), non-zero.
186
- @arg xs: Items to summate (each a C{scalar} or an L{Fsum} or L{Fsum2Tuple}
187
- instance), all positional.
188
- @kwarg name_RESIDUAL_raiser: Optional C{B{name}=NN}, C{B{RESIDUAL}=0.0}
189
- threshold and C{B{raiser}=True}, see L{Fsum<Fsum.__init__>}
190
- and L{fpow<Fsum.fpow>}.
179
+ @arg xs: Items to summate (each a C{scalar} or an L{Fsum} or L{Fsum2Tuple} instance),
180
+ all positional.
181
+ @kwarg name_RESIDUAL_raiser: Optional C{B{name}=NN} (C{str}), the C{B{RESIDUAL}=0.0}
182
+ threshold (C{scalar}) and C{B{raiser}=True} (C{bool}) for raising
183
+ L{ResidualError}s, see class L{Fsum<Fsum.__init__>} and method
184
+ L{fpow<Fsum.fpow>}.
191
185
  '''
192
186
  try:
193
187
  raiser = _Fsum__init__(self, **name_RESIDUAL_raiser)
@@ -337,8 +331,9 @@ def facos1(x):
337
331
  if a < EPS0:
338
332
  r = PI_2
339
333
  elif a < EPS1:
340
- H = Fhorner(-a, 1.5707288, 0.2121144, 0.0742610, 0.0187293)
341
- r = float(H * sqrt(_1_0 - a))
334
+ H = Fhorner(-a, 1.5707288, 0.2121144, 0.0742610, 0.0187293)
335
+ H *= Fsqrt(_1_0, -a)
336
+ r = float(H)
342
337
  if x < 0:
343
338
  r = PI - r
344
339
  else:
@@ -370,7 +365,7 @@ def fatan(x):
370
365
 
371
366
 
372
367
  def fatan1(x):
373
- '''Fast approximation of C{atan(B{x})} for C{0 <= B{x} <= 1}, I{unchecked}.
368
+ '''Fast approximation of C{atan(B{x})} for C{0 <= B{x} < 1}, I{unchecked}.
374
369
 
375
370
  @see: U{ShaderFastLibs.h<https://GitHub.com/michaldrobot/ShaderFastLibs/
376
371
  blob/master/ShaderFastMathLib.h>} and U{Efficient approximations
@@ -379,7 +374,7 @@ def fatan1(x):
379
374
  IEEE Signal Processing Magazine, 111, May 2006.
380
375
  '''
381
376
  # Eq (9): PI_4 * x - x * (abs(x) - 1) * (0.2447 + 0.0663 * abs(x)), for -1 < x < 1
382
- # PI_4 * x - (x**2 - x) * (0.2447 + 0.0663 * x), for 0 < x - 1
377
+ # PI_4 * x - (x**2 - x) * (0.2447 + 0.0663 * x), for 0 < x < 1
383
378
  # x * (1.0300981633974482 + x * (-0.1784 - x * 0.0663))
384
379
  H = Fhorner(x, _0_0, 1.0300981634, -0.1784, -0.0663)
385
380
  return float(H)
@@ -591,7 +586,7 @@ def fpolynomial(x, *cs, **over):
591
586
  @see: Class L{Fpolynomial} for further details.
592
587
  '''
593
588
  P = Fpolynomial(x, *cs)
594
- d = _xkwds_get(over, over=0) if over else 0
589
+ d = _xkwds_get1(over, over=0) if over else 0
595
590
  return P.fover(d) if d else float(P)
596
591
 
597
592