nrl-tracker 0.21.5__py3-none-any.whl → 0.22.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.
Files changed (138) hide show
  1. {nrl_tracker-0.21.5.dist-info → nrl_tracker-0.22.0.dist-info}/METADATA +2 -2
  2. nrl_tracker-0.22.0.dist-info/RECORD +150 -0
  3. pytcl/__init__.py +9 -11
  4. pytcl/assignment_algorithms/__init__.py +32 -42
  5. pytcl/assignment_algorithms/data_association.py +9 -10
  6. pytcl/assignment_algorithms/gating.py +7 -5
  7. pytcl/assignment_algorithms/jpda.py +10 -14
  8. pytcl/assignment_algorithms/three_dimensional/__init__.py +6 -8
  9. pytcl/assignment_algorithms/three_dimensional/assignment.py +6 -2
  10. pytcl/assignment_algorithms/two_dimensional/__init__.py +9 -13
  11. pytcl/assignment_algorithms/two_dimensional/assignment.py +5 -2
  12. pytcl/assignment_algorithms/two_dimensional/kbest.py +9 -9
  13. pytcl/astronomical/__init__.py +130 -89
  14. pytcl/astronomical/ephemerides.py +524 -0
  15. pytcl/astronomical/lambert.py +6 -15
  16. pytcl/astronomical/orbital_mechanics.py +1 -3
  17. pytcl/astronomical/reference_frames.py +1 -3
  18. pytcl/astronomical/relativity.py +466 -0
  19. pytcl/astronomical/time_systems.py +2 -1
  20. pytcl/atmosphere/__init__.py +12 -14
  21. pytcl/atmosphere/models.py +5 -5
  22. pytcl/clustering/__init__.py +28 -36
  23. pytcl/clustering/dbscan.py +5 -2
  24. pytcl/clustering/gaussian_mixture.py +10 -10
  25. pytcl/clustering/hierarchical.py +7 -7
  26. pytcl/clustering/kmeans.py +7 -5
  27. pytcl/containers/__init__.py +29 -43
  28. pytcl/containers/cluster_set.py +13 -20
  29. pytcl/containers/covertree.py +8 -2
  30. pytcl/containers/kd_tree.py +6 -2
  31. pytcl/containers/measurement_set.py +11 -16
  32. pytcl/containers/rtree.py +8 -7
  33. pytcl/containers/track_list.py +13 -13
  34. pytcl/containers/vptree.py +7 -2
  35. pytcl/coordinate_systems/__init__.py +69 -74
  36. pytcl/coordinate_systems/conversions/__init__.py +20 -24
  37. pytcl/coordinate_systems/conversions/geodetic.py +7 -17
  38. pytcl/coordinate_systems/conversions/spherical.py +4 -2
  39. pytcl/coordinate_systems/jacobians/__init__.py +10 -12
  40. pytcl/coordinate_systems/jacobians/jacobians.py +2 -1
  41. pytcl/coordinate_systems/projections/__init__.py +27 -23
  42. pytcl/coordinate_systems/projections/projections.py +14 -39
  43. pytcl/coordinate_systems/rotations/__init__.py +20 -22
  44. pytcl/coordinate_systems/rotations/rotations.py +3 -4
  45. pytcl/core/__init__.py +16 -22
  46. pytcl/core/array_utils.py +7 -7
  47. pytcl/core/constants.py +1 -3
  48. pytcl/core/validation.py +13 -19
  49. pytcl/dynamic_estimation/__init__.py +77 -86
  50. pytcl/dynamic_estimation/imm.py +10 -15
  51. pytcl/dynamic_estimation/information_filter.py +8 -6
  52. pytcl/dynamic_estimation/kalman/__init__.py +40 -48
  53. pytcl/dynamic_estimation/kalman/extended.py +4 -5
  54. pytcl/dynamic_estimation/kalman/linear.py +7 -3
  55. pytcl/dynamic_estimation/kalman/square_root.py +7 -8
  56. pytcl/dynamic_estimation/kalman/unscented.py +8 -6
  57. pytcl/dynamic_estimation/particle_filters/__init__.py +12 -14
  58. pytcl/dynamic_estimation/particle_filters/bootstrap.py +8 -8
  59. pytcl/dynamic_estimation/smoothers.py +9 -10
  60. pytcl/dynamic_models/__init__.py +37 -41
  61. pytcl/dynamic_models/continuous_time/__init__.py +11 -11
  62. pytcl/dynamic_models/continuous_time/dynamics.py +4 -2
  63. pytcl/dynamic_models/discrete_time/__init__.py +11 -17
  64. pytcl/dynamic_models/process_noise/__init__.py +11 -17
  65. pytcl/dynamic_models/process_noise/polynomial.py +2 -6
  66. pytcl/gravity/__init__.py +55 -65
  67. pytcl/gravity/clenshaw.py +4 -7
  68. pytcl/gravity/egm.py +9 -6
  69. pytcl/gravity/models.py +1 -3
  70. pytcl/gravity/spherical_harmonics.py +6 -11
  71. pytcl/gravity/tides.py +9 -17
  72. pytcl/magnetism/__init__.py +26 -36
  73. pytcl/magnetism/emm.py +7 -13
  74. pytcl/magnetism/igrf.py +5 -6
  75. pytcl/magnetism/wmm.py +4 -10
  76. pytcl/mathematical_functions/__init__.py +69 -87
  77. pytcl/mathematical_functions/basic_matrix/__init__.py +25 -19
  78. pytcl/mathematical_functions/basic_matrix/decompositions.py +6 -5
  79. pytcl/mathematical_functions/basic_matrix/special_matrices.py +2 -1
  80. pytcl/mathematical_functions/combinatorics/__init__.py +18 -14
  81. pytcl/mathematical_functions/combinatorics/combinatorics.py +5 -4
  82. pytcl/mathematical_functions/geometry/__init__.py +15 -15
  83. pytcl/mathematical_functions/geometry/geometry.py +10 -15
  84. pytcl/mathematical_functions/interpolation/__init__.py +11 -13
  85. pytcl/mathematical_functions/interpolation/interpolation.py +8 -5
  86. pytcl/mathematical_functions/numerical_integration/__init__.py +16 -10
  87. pytcl/mathematical_functions/numerical_integration/quadrature.py +6 -2
  88. pytcl/mathematical_functions/signal_processing/__init__.py +42 -30
  89. pytcl/mathematical_functions/signal_processing/detection.py +9 -9
  90. pytcl/mathematical_functions/signal_processing/filters.py +7 -8
  91. pytcl/mathematical_functions/signal_processing/matched_filter.py +8 -7
  92. pytcl/mathematical_functions/special_functions/__init__.py +75 -77
  93. pytcl/mathematical_functions/special_functions/bessel.py +2 -1
  94. pytcl/mathematical_functions/special_functions/debye.py +4 -2
  95. pytcl/mathematical_functions/special_functions/elliptic.py +3 -4
  96. pytcl/mathematical_functions/special_functions/error_functions.py +2 -1
  97. pytcl/mathematical_functions/special_functions/gamma_functions.py +3 -4
  98. pytcl/mathematical_functions/special_functions/hypergeometric.py +2 -1
  99. pytcl/mathematical_functions/special_functions/lambert_w.py +3 -4
  100. pytcl/mathematical_functions/special_functions/marcum_q.py +2 -1
  101. pytcl/mathematical_functions/statistics/__init__.py +27 -31
  102. pytcl/mathematical_functions/statistics/distributions.py +21 -40
  103. pytcl/mathematical_functions/statistics/estimators.py +3 -4
  104. pytcl/mathematical_functions/transforms/__init__.py +45 -51
  105. pytcl/mathematical_functions/transforms/fourier.py +5 -2
  106. pytcl/mathematical_functions/transforms/stft.py +8 -11
  107. pytcl/mathematical_functions/transforms/wavelets.py +13 -20
  108. pytcl/navigation/__init__.py +96 -102
  109. pytcl/navigation/geodesy.py +13 -33
  110. pytcl/navigation/great_circle.py +7 -13
  111. pytcl/navigation/ins.py +12 -16
  112. pytcl/navigation/ins_gnss.py +24 -37
  113. pytcl/navigation/rhumb.py +7 -12
  114. pytcl/performance_evaluation/__init__.py +21 -25
  115. pytcl/performance_evaluation/estimation_metrics.py +3 -1
  116. pytcl/performance_evaluation/track_metrics.py +4 -4
  117. pytcl/plotting/__init__.py +30 -38
  118. pytcl/plotting/coordinates.py +8 -18
  119. pytcl/plotting/ellipses.py +5 -2
  120. pytcl/plotting/metrics.py +5 -10
  121. pytcl/plotting/tracks.py +7 -12
  122. pytcl/static_estimation/__init__.py +37 -41
  123. pytcl/static_estimation/least_squares.py +5 -4
  124. pytcl/static_estimation/maximum_likelihood.py +8 -5
  125. pytcl/static_estimation/robust.py +5 -2
  126. pytcl/terrain/__init__.py +28 -34
  127. pytcl/terrain/dem.py +6 -9
  128. pytcl/terrain/loaders.py +9 -14
  129. pytcl/terrain/visibility.py +4 -8
  130. pytcl/trackers/__init__.py +17 -25
  131. pytcl/trackers/hypothesis.py +8 -8
  132. pytcl/trackers/mht.py +18 -24
  133. pytcl/trackers/multi_target.py +8 -6
  134. pytcl/trackers/single_target.py +5 -2
  135. nrl_tracker-0.21.5.dist-info/RECORD +0 -148
  136. {nrl_tracker-0.21.5.dist-info → nrl_tracker-0.22.0.dist-info}/LICENSE +0 -0
  137. {nrl_tracker-0.21.5.dist-info → nrl_tracker-0.22.0.dist-info}/WHEEL +0 -0
  138. {nrl_tracker-0.21.5.dist-info → nrl_tracker-0.22.0.dist-info}/top_level.txt +0 -0
@@ -15,114 +15,96 @@ This module contains a wide variety of mathematical functions including:
15
15
  """
16
16
 
17
17
  # Import submodules for easy access
18
- from pytcl.mathematical_functions import (
19
- basic_matrix,
20
- combinatorics,
21
- geometry,
22
- interpolation,
23
- numerical_integration,
24
- signal_processing,
25
- special_functions,
26
- statistics,
27
- transforms,
28
- )
18
+ from pytcl.mathematical_functions import basic_matrix
19
+ from pytcl.mathematical_functions import combinatorics
20
+ from pytcl.mathematical_functions import geometry
21
+ from pytcl.mathematical_functions import interpolation
22
+ from pytcl.mathematical_functions import numerical_integration
23
+ from pytcl.mathematical_functions import signal_processing
24
+ from pytcl.mathematical_functions import special_functions
25
+ from pytcl.mathematical_functions import statistics
26
+ from pytcl.mathematical_functions import transforms
29
27
 
30
28
  # Basic matrix operations
31
- from pytcl.mathematical_functions.basic_matrix import (
32
- block_diag,
33
- chol_semi_def,
34
- kron,
35
- matrix_sqrt,
36
- null_space,
37
- pinv_truncated,
38
- range_space,
39
- tria,
40
- tria_sqrt,
41
- unvec,
42
- vec,
43
- )
29
+ from pytcl.mathematical_functions.basic_matrix import block_diag
30
+ from pytcl.mathematical_functions.basic_matrix import chol_semi_def
31
+ from pytcl.mathematical_functions.basic_matrix import kron
32
+ from pytcl.mathematical_functions.basic_matrix import matrix_sqrt
33
+ from pytcl.mathematical_functions.basic_matrix import null_space
34
+ from pytcl.mathematical_functions.basic_matrix import pinv_truncated
35
+ from pytcl.mathematical_functions.basic_matrix import range_space
36
+ from pytcl.mathematical_functions.basic_matrix import tria
37
+ from pytcl.mathematical_functions.basic_matrix import tria_sqrt
38
+ from pytcl.mathematical_functions.basic_matrix import unvec
39
+ from pytcl.mathematical_functions.basic_matrix import vec
44
40
 
45
41
  # Combinatorics
46
- from pytcl.mathematical_functions.combinatorics import (
47
- combinations,
48
- factorial,
49
- n_choose_k,
50
- permutation_rank,
51
- permutation_unrank,
52
- permutations,
53
- )
42
+ from pytcl.mathematical_functions.combinatorics import combinations
43
+ from pytcl.mathematical_functions.combinatorics import factorial
44
+ from pytcl.mathematical_functions.combinatorics import n_choose_k
45
+ from pytcl.mathematical_functions.combinatorics import permutation_rank
46
+ from pytcl.mathematical_functions.combinatorics import permutation_unrank
47
+ from pytcl.mathematical_functions.combinatorics import permutations
54
48
 
55
49
  # Geometry
56
- from pytcl.mathematical_functions.geometry import (
57
- bounding_box,
58
- convex_hull,
59
- line_intersection,
60
- point_in_polygon,
61
- polygon_area,
62
- )
50
+ from pytcl.mathematical_functions.geometry import bounding_box
51
+ from pytcl.mathematical_functions.geometry import convex_hull
52
+ from pytcl.mathematical_functions.geometry import line_intersection
53
+ from pytcl.mathematical_functions.geometry import point_in_polygon
54
+ from pytcl.mathematical_functions.geometry import polygon_area
63
55
 
64
56
  # Interpolation
65
- from pytcl.mathematical_functions.interpolation import (
66
- cubic_spline,
67
- interp1d,
68
- interp2d,
69
- linear_interp,
70
- rbf_interpolate,
71
- )
57
+ from pytcl.mathematical_functions.interpolation import cubic_spline
58
+ from pytcl.mathematical_functions.interpolation import interp1d
59
+ from pytcl.mathematical_functions.interpolation import interp2d
60
+ from pytcl.mathematical_functions.interpolation import linear_interp
61
+ from pytcl.mathematical_functions.interpolation import rbf_interpolate
72
62
 
73
63
  # Numerical integration
64
+ from pytcl.mathematical_functions.numerical_integration import gauss_hermite
65
+ from pytcl.mathematical_functions.numerical_integration import gauss_legendre
66
+ from pytcl.mathematical_functions.numerical_integration import quad
67
+ from pytcl.mathematical_functions.numerical_integration import spherical_cubature
74
68
  from pytcl.mathematical_functions.numerical_integration import (
75
- gauss_hermite,
76
- gauss_legendre,
77
- quad,
78
- spherical_cubature,
79
69
  unscented_transform_points,
80
70
  )
81
71
 
82
72
  # Signal processing
83
- from pytcl.mathematical_functions.signal_processing import (
84
- butter_design,
85
- cfar_ca,
86
- matched_filter,
87
- )
73
+ from pytcl.mathematical_functions.signal_processing import butter_design
74
+ from pytcl.mathematical_functions.signal_processing import cfar_ca
75
+ from pytcl.mathematical_functions.signal_processing import matched_filter
88
76
 
89
77
  # Special functions
90
- from pytcl.mathematical_functions.special_functions import (
91
- besseli,
92
- besselj,
93
- besselk,
94
- bessely,
95
- beta,
96
- betaln,
97
- erf,
98
- erfc,
99
- erfinv,
100
- gamma,
101
- gammaln,
102
- )
78
+ from pytcl.mathematical_functions.special_functions import besseli
79
+ from pytcl.mathematical_functions.special_functions import besselj
80
+ from pytcl.mathematical_functions.special_functions import besselk
81
+ from pytcl.mathematical_functions.special_functions import bessely
82
+ from pytcl.mathematical_functions.special_functions import beta
83
+ from pytcl.mathematical_functions.special_functions import betaln
84
+ from pytcl.mathematical_functions.special_functions import erf
85
+ from pytcl.mathematical_functions.special_functions import erfc
86
+ from pytcl.mathematical_functions.special_functions import erfinv
87
+ from pytcl.mathematical_functions.special_functions import gamma
88
+ from pytcl.mathematical_functions.special_functions import gammaln
103
89
 
104
90
  # Statistics
105
- from pytcl.mathematical_functions.statistics import (
106
- ChiSquared,
107
- Gaussian,
108
- MultivariateGaussian,
109
- Uniform,
110
- mad,
111
- nees,
112
- nis,
113
- weighted_cov,
114
- weighted_mean,
115
- )
91
+ from pytcl.mathematical_functions.statistics import ChiSquared
92
+ from pytcl.mathematical_functions.statistics import Gaussian
93
+ from pytcl.mathematical_functions.statistics import MultivariateGaussian
94
+ from pytcl.mathematical_functions.statistics import Uniform
95
+ from pytcl.mathematical_functions.statistics import mad
96
+ from pytcl.mathematical_functions.statistics import nees
97
+ from pytcl.mathematical_functions.statistics import nis
98
+ from pytcl.mathematical_functions.statistics import weighted_cov
99
+ from pytcl.mathematical_functions.statistics import weighted_mean
116
100
 
117
101
  # Transforms
118
- from pytcl.mathematical_functions.transforms import (
119
- cwt,
120
- fft,
121
- ifft,
122
- power_spectrum,
123
- spectrogram,
124
- stft,
125
- )
102
+ from pytcl.mathematical_functions.transforms import cwt
103
+ from pytcl.mathematical_functions.transforms import fft
104
+ from pytcl.mathematical_functions.transforms import ifft
105
+ from pytcl.mathematical_functions.transforms import power_spectrum
106
+ from pytcl.mathematical_functions.transforms import spectrogram
107
+ from pytcl.mathematical_functions.transforms import stft
126
108
 
127
109
  __all__ = [
128
110
  # Submodules
@@ -9,32 +9,38 @@ This module provides:
9
9
 
10
10
  from pytcl.mathematical_functions.basic_matrix.decompositions import ( # noqa: E501
11
11
  chol_semi_def,
12
- matrix_sqrt,
13
- null_space,
14
- pinv_truncated,
15
- range_space,
16
- rank_revealing_qr,
17
- tria,
18
- tria_sqrt,
19
12
  )
13
+ from pytcl.mathematical_functions.basic_matrix.decompositions import matrix_sqrt
14
+ from pytcl.mathematical_functions.basic_matrix.decompositions import null_space
15
+ from pytcl.mathematical_functions.basic_matrix.decompositions import pinv_truncated
16
+ from pytcl.mathematical_functions.basic_matrix.decompositions import range_space
17
+ from pytcl.mathematical_functions.basic_matrix.decompositions import rank_revealing_qr
18
+ from pytcl.mathematical_functions.basic_matrix.decompositions import tria
19
+ from pytcl.mathematical_functions.basic_matrix.decompositions import tria_sqrt
20
20
  from pytcl.mathematical_functions.basic_matrix.special_matrices import ( # noqa: E501
21
21
  block_diag,
22
- circulant,
22
+ )
23
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import circulant
24
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import (
23
25
  commutation_matrix,
24
- companion,
25
- dft_matrix,
26
+ )
27
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import companion
28
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import dft_matrix
29
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import (
26
30
  duplication_matrix,
31
+ )
32
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import (
27
33
  elimination_matrix,
28
- hadamard,
29
- hankel,
30
- hilbert,
31
- invhilbert,
32
- kron,
33
- toeplitz,
34
- unvec,
35
- vandermonde,
36
- vec,
37
34
  )
35
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import hadamard
36
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import hankel
37
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import hilbert
38
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import invhilbert
39
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import kron
40
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import toeplitz
41
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import unvec
42
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import vandermonde
43
+ from pytcl.mathematical_functions.basic_matrix.special_matrices import vec
38
44
 
39
45
  __all__ = [
40
46
  # Decompositions
@@ -5,11 +5,14 @@ This module provides matrix decomposition functions that wrap numpy/scipy
5
5
  with consistent APIs matching the MATLAB TrackerComponentLibrary conventions.
6
6
  """
7
7
 
8
- from typing import Literal, Optional, Tuple
8
+ from typing import Literal
9
+ from typing import Optional
10
+ from typing import Tuple
9
11
 
10
12
  import numpy as np
11
13
  import scipy.linalg as la
12
- from numpy.typing import ArrayLike, NDArray
14
+ from numpy.typing import ArrayLike
15
+ from numpy.typing import NDArray
13
16
 
14
17
 
15
18
  def chol_semi_def(
@@ -160,9 +163,7 @@ def tria_sqrt(
160
163
  if B is not None:
161
164
  B = np.asarray(B, dtype=np.float64)
162
165
  if A.shape[0] != B.shape[0]:
163
- raise ValueError(
164
- f"A and B must have same number of rows: {A.shape[0]} vs {B.shape[0]}"
165
- )
166
+ raise ValueError(f"A and B must have same number of rows: {A.shape[0]} vs {B.shape[0]}")
166
167
  combined = np.hstack([A, B])
167
168
  else:
168
169
  combined = A
@@ -8,7 +8,8 @@ used in numerical algorithms and signal processing.
8
8
  from typing import Optional
9
9
 
10
10
  import numpy as np
11
- from numpy.typing import ArrayLike, NDArray
11
+ from numpy.typing import ArrayLike
12
+ from numpy.typing import NDArray
12
13
 
13
14
 
14
15
  def vandermonde(
@@ -10,23 +10,27 @@ This module provides:
10
10
 
11
11
  from pytcl.mathematical_functions.combinatorics.combinatorics import ( # noqa: E501
12
12
  bell_number,
13
- catalan_number,
14
- combinations,
13
+ )
14
+ from pytcl.mathematical_functions.combinatorics.combinatorics import catalan_number
15
+ from pytcl.mathematical_functions.combinatorics.combinatorics import combinations
16
+ from pytcl.mathematical_functions.combinatorics.combinatorics import (
15
17
  combinations_with_replacement,
16
- derangements_count,
17
- factorial,
18
+ )
19
+ from pytcl.mathematical_functions.combinatorics.combinatorics import derangements_count
20
+ from pytcl.mathematical_functions.combinatorics.combinatorics import factorial
21
+ from pytcl.mathematical_functions.combinatorics.combinatorics import (
18
22
  multinomial_coefficient,
19
- n_choose_k,
20
- n_permute_k,
21
- next_permutation,
22
- partition_count,
23
- partitions,
24
- permutation_rank,
25
- permutation_unrank,
26
- permutations,
27
- stirling_second,
28
- subfactorial,
29
23
  )
24
+ from pytcl.mathematical_functions.combinatorics.combinatorics import n_choose_k
25
+ from pytcl.mathematical_functions.combinatorics.combinatorics import n_permute_k
26
+ from pytcl.mathematical_functions.combinatorics.combinatorics import next_permutation
27
+ from pytcl.mathematical_functions.combinatorics.combinatorics import partition_count
28
+ from pytcl.mathematical_functions.combinatorics.combinatorics import partitions
29
+ from pytcl.mathematical_functions.combinatorics.combinatorics import permutation_rank
30
+ from pytcl.mathematical_functions.combinatorics.combinatorics import permutation_unrank
31
+ from pytcl.mathematical_functions.combinatorics.combinatorics import permutations
32
+ from pytcl.mathematical_functions.combinatorics.combinatorics import stirling_second
33
+ from pytcl.mathematical_functions.combinatorics.combinatorics import subfactorial
30
34
 
31
35
  __all__ = [
32
36
  "factorial",
@@ -7,7 +7,10 @@ related operations commonly used in assignment problems and data association.
7
7
 
8
8
  import itertools
9
9
  from functools import lru_cache
10
- from typing import Iterator, List, Optional, Tuple
10
+ from typing import Iterator
11
+ from typing import List
12
+ from typing import Optional
13
+ from typing import Tuple
11
14
 
12
15
  from numpy.typing import ArrayLike
13
16
 
@@ -378,9 +381,7 @@ def partitions(n: int, k: Optional[int] = None) -> Iterator[Tuple[int, ...]]:
378
381
  [(4,), (3, 1), (2, 2), (2, 1, 1), (1, 1, 1, 1)]
379
382
  """
380
383
 
381
- def gen_partitions(
382
- n: int, max_val: int, prefix: Tuple[int, ...]
383
- ) -> Iterator[Tuple[int, ...]]:
384
+ def gen_partitions(n: int, max_val: int, prefix: Tuple[int, ...]) -> Iterator[Tuple[int, ...]]:
384
385
  if n == 0:
385
386
  yield prefix
386
387
  return
@@ -9,24 +9,24 @@ This module provides:
9
9
  - Bounding box computation
10
10
  """
11
11
 
12
+ from pytcl.mathematical_functions.geometry.geometry import barycentric_coordinates
13
+ from pytcl.mathematical_functions.geometry.geometry import bounding_box
14
+ from pytcl.mathematical_functions.geometry.geometry import convex_hull
15
+ from pytcl.mathematical_functions.geometry.geometry import convex_hull_area
16
+ from pytcl.mathematical_functions.geometry.geometry import delaunay_triangulation
17
+ from pytcl.mathematical_functions.geometry.geometry import line_intersection
18
+ from pytcl.mathematical_functions.geometry.geometry import line_plane_intersection
19
+ from pytcl.mathematical_functions.geometry.geometry import minimum_bounding_circle
20
+ from pytcl.mathematical_functions.geometry.geometry import oriented_bounding_box
21
+ from pytcl.mathematical_functions.geometry.geometry import point_in_polygon
22
+ from pytcl.mathematical_functions.geometry.geometry import point_to_line_distance
12
23
  from pytcl.mathematical_functions.geometry.geometry import (
13
- barycentric_coordinates,
14
- bounding_box,
15
- convex_hull,
16
- convex_hull_area,
17
- delaunay_triangulation,
18
- line_intersection,
19
- line_plane_intersection,
20
- minimum_bounding_circle,
21
- oriented_bounding_box,
22
- point_in_polygon,
23
- point_to_line_distance,
24
24
  point_to_line_segment_distance,
25
- points_in_polygon,
26
- polygon_area,
27
- polygon_centroid,
28
- triangle_area,
29
25
  )
26
+ from pytcl.mathematical_functions.geometry.geometry import points_in_polygon
27
+ from pytcl.mathematical_functions.geometry.geometry import polygon_area
28
+ from pytcl.mathematical_functions.geometry.geometry import polygon_centroid
29
+ from pytcl.mathematical_functions.geometry.geometry import triangle_area
30
30
 
31
31
  __all__ = [
32
32
  "point_in_polygon",
@@ -5,11 +5,14 @@ This module provides geometric functions for points, lines, planes,
5
5
  polygons, and related operations used in tracking applications.
6
6
  """
7
7
 
8
- from typing import Optional, Tuple
8
+ from typing import Optional
9
+ from typing import Tuple
9
10
 
10
11
  import numpy as np
11
- from numpy.typing import ArrayLike, NDArray
12
- from scipy.spatial import ConvexHull, Delaunay
12
+ from numpy.typing import ArrayLike
13
+ from numpy.typing import NDArray
14
+ from scipy.spatial import ConvexHull
15
+ from scipy.spatial import Delaunay
13
16
 
14
17
 
15
18
  def point_in_polygon(
@@ -191,12 +194,8 @@ def polygon_centroid(vertices: ArrayLike) -> NDArray[np.floating]:
191
194
 
192
195
  # Centroid
193
196
  factor = 1.0 / (3.0 * a)
194
- cx = factor * np.sum(
195
- (x + np.roll(x, -1)) * (x * np.roll(y, -1) - np.roll(x, -1) * y)
196
- )
197
- cy = factor * np.sum(
198
- (y + np.roll(y, -1)) * (x * np.roll(y, -1) - np.roll(x, -1) * y)
199
- )
197
+ cx = factor * np.sum((x + np.roll(x, -1)) * (x * np.roll(y, -1) - np.roll(x, -1) * y))
198
+ cy = factor * np.sum((y + np.roll(y, -1)) * (x * np.roll(y, -1) - np.roll(x, -1) * y))
200
199
 
201
200
  return np.array([cx, cy], dtype=np.float64)
202
201
 
@@ -551,14 +550,10 @@ def minimum_bounding_circle(
551
550
  return circle_from_two_points(p1, p3)
552
551
 
553
552
  ux = (
554
- (ax**2 + ay**2) * (by - cy)
555
- + (bx**2 + by**2) * (cy - ay)
556
- + (cx**2 + cy**2) * (ay - by)
553
+ (ax**2 + ay**2) * (by - cy) + (bx**2 + by**2) * (cy - ay) + (cx**2 + cy**2) * (ay - by)
557
554
  ) / d
558
555
  uy = (
559
- (ax**2 + ay**2) * (cx - bx)
560
- + (bx**2 + by**2) * (ax - cx)
561
- + (cx**2 + cy**2) * (bx - ax)
556
+ (ax**2 + ay**2) * (cx - bx) + (bx**2 + by**2) * (ax - cx) + (cx**2 + cy**2) * (bx - ax)
562
557
  ) / d
563
558
 
564
559
  center = np.array([ux, uy])
@@ -8,19 +8,17 @@ This module provides:
8
8
  - Spherical interpolation
9
9
  """
10
10
 
11
- from pytcl.mathematical_functions.interpolation.interpolation import ( # noqa: E501
12
- akima,
13
- barycentric,
14
- cubic_spline,
15
- interp1d,
16
- interp2d,
17
- interp3d,
18
- krogh,
19
- linear_interp,
20
- pchip,
21
- rbf_interpolate,
22
- spherical_interp,
23
- )
11
+ from pytcl.mathematical_functions.interpolation.interpolation import akima # noqa: E501
12
+ from pytcl.mathematical_functions.interpolation.interpolation import barycentric
13
+ from pytcl.mathematical_functions.interpolation.interpolation import cubic_spline
14
+ from pytcl.mathematical_functions.interpolation.interpolation import interp1d
15
+ from pytcl.mathematical_functions.interpolation.interpolation import interp2d
16
+ from pytcl.mathematical_functions.interpolation.interpolation import interp3d
17
+ from pytcl.mathematical_functions.interpolation.interpolation import krogh
18
+ from pytcl.mathematical_functions.interpolation.interpolation import linear_interp
19
+ from pytcl.mathematical_functions.interpolation.interpolation import pchip
20
+ from pytcl.mathematical_functions.interpolation.interpolation import rbf_interpolate
21
+ from pytcl.mathematical_functions.interpolation.interpolation import spherical_interp
24
22
 
25
23
  __all__ = [
26
24
  "interp1d",
@@ -5,10 +5,15 @@ This module provides interpolation functions for 1D, 2D, and 3D data,
5
5
  commonly used in tracking for measurement interpolation and terrain models.
6
6
  """
7
7
 
8
- from typing import Callable, Literal, Optional, Tuple, Union
8
+ from typing import Callable
9
+ from typing import Literal
10
+ from typing import Optional
11
+ from typing import Tuple
12
+ from typing import Union
9
13
 
10
14
  import numpy as np
11
- from numpy.typing import ArrayLike, NDArray
15
+ from numpy.typing import ArrayLike
16
+ from numpy.typing import NDArray
12
17
  from scipy import interpolate
13
18
 
14
19
 
@@ -371,9 +376,7 @@ def rbf_interpolate(
371
376
  points = np.asarray(points, dtype=np.float64)
372
377
  values = np.asarray(values, dtype=np.float64)
373
378
 
374
- return interpolate.RBFInterpolator(
375
- points, values, kernel=kernel, smoothing=smoothing
376
- )
379
+ return interpolate.RBFInterpolator(points, values, kernel=kernel, smoothing=smoothing)
377
380
 
378
381
 
379
382
  def barycentric(
@@ -9,18 +9,24 @@ This module provides:
9
9
 
10
10
  from pytcl.mathematical_functions.numerical_integration.quadrature import ( # noqa: E501
11
11
  cubature_gauss_hermite,
12
- dblquad,
13
- fixed_quad,
12
+ )
13
+ from pytcl.mathematical_functions.numerical_integration.quadrature import dblquad
14
+ from pytcl.mathematical_functions.numerical_integration.quadrature import fixed_quad
15
+ from pytcl.mathematical_functions.numerical_integration.quadrature import (
14
16
  gauss_chebyshev,
15
- gauss_hermite,
16
- gauss_laguerre,
17
- gauss_legendre,
18
- quad,
19
- romberg,
20
- simpson,
17
+ )
18
+ from pytcl.mathematical_functions.numerical_integration.quadrature import gauss_hermite
19
+ from pytcl.mathematical_functions.numerical_integration.quadrature import gauss_laguerre
20
+ from pytcl.mathematical_functions.numerical_integration.quadrature import gauss_legendre
21
+ from pytcl.mathematical_functions.numerical_integration.quadrature import quad
22
+ from pytcl.mathematical_functions.numerical_integration.quadrature import romberg
23
+ from pytcl.mathematical_functions.numerical_integration.quadrature import simpson
24
+ from pytcl.mathematical_functions.numerical_integration.quadrature import (
21
25
  spherical_cubature,
22
- tplquad,
23
- trapezoid,
26
+ )
27
+ from pytcl.mathematical_functions.numerical_integration.quadrature import tplquad
28
+ from pytcl.mathematical_functions.numerical_integration.quadrature import trapezoid
29
+ from pytcl.mathematical_functions.numerical_integration.quadrature import (
24
30
  unscented_transform_points,
25
31
  )
26
32
 
@@ -5,11 +5,15 @@ This module provides Gaussian quadrature rules and numerical integration
5
5
  functions commonly used in state estimation and filtering.
6
6
  """
7
7
 
8
- from typing import Callable, Literal, Optional, Tuple
8
+ from typing import Callable
9
+ from typing import Literal
10
+ from typing import Optional
11
+ from typing import Tuple
9
12
 
10
13
  import numpy as np
11
14
  import scipy.integrate as integrate
12
- from numpy.typing import ArrayLike, NDArray
15
+ from numpy.typing import ArrayLike
16
+ from numpy.typing import NDArray
13
17
 
14
18
 
15
19
  def gauss_legendre(
@@ -8,47 +8,59 @@ radar applications, including:
8
8
  - CFAR (Constant False Alarm Rate) detection algorithms
9
9
  """
10
10
 
11
+ from pytcl.mathematical_functions.signal_processing.detection import CFARResult
12
+ from pytcl.mathematical_functions.signal_processing.detection import CFARResult2D
13
+ from pytcl.mathematical_functions.signal_processing.detection import cfar_2d
14
+ from pytcl.mathematical_functions.signal_processing.detection import cfar_ca
15
+ from pytcl.mathematical_functions.signal_processing.detection import cfar_go
16
+ from pytcl.mathematical_functions.signal_processing.detection import cfar_os
17
+ from pytcl.mathematical_functions.signal_processing.detection import cfar_so
18
+ from pytcl.mathematical_functions.signal_processing.detection import cluster_detections
11
19
  from pytcl.mathematical_functions.signal_processing.detection import (
12
- CFARResult,
13
- CFARResult2D,
14
- cfar_2d,
15
- cfar_ca,
16
- cfar_go,
17
- cfar_os,
18
- cfar_so,
19
- cluster_detections,
20
20
  detection_probability,
21
- snr_loss,
22
- threshold_factor,
23
- )
24
- from pytcl.mathematical_functions.signal_processing.filters import (
25
- FilterCoefficients,
26
- FrequencyResponse,
27
- apply_filter,
28
- bessel_design,
29
- butter_design,
30
- cheby1_design,
31
- cheby2_design,
32
- ellip_design,
33
- filter_order,
34
- filtfilt,
35
- fir_design,
36
- fir_design_remez,
37
- frequency_response,
38
- group_delay,
39
- sos_to_zpk,
40
- zpk_to_sos,
41
21
  )
22
+ from pytcl.mathematical_functions.signal_processing.detection import snr_loss
23
+ from pytcl.mathematical_functions.signal_processing.detection import threshold_factor
24
+ from pytcl.mathematical_functions.signal_processing.filters import FilterCoefficients
25
+ from pytcl.mathematical_functions.signal_processing.filters import FrequencyResponse
26
+ from pytcl.mathematical_functions.signal_processing.filters import apply_filter
27
+ from pytcl.mathematical_functions.signal_processing.filters import bessel_design
28
+ from pytcl.mathematical_functions.signal_processing.filters import butter_design
29
+ from pytcl.mathematical_functions.signal_processing.filters import cheby1_design
30
+ from pytcl.mathematical_functions.signal_processing.filters import cheby2_design
31
+ from pytcl.mathematical_functions.signal_processing.filters import ellip_design
32
+ from pytcl.mathematical_functions.signal_processing.filters import filter_order
33
+ from pytcl.mathematical_functions.signal_processing.filters import filtfilt
34
+ from pytcl.mathematical_functions.signal_processing.filters import fir_design
35
+ from pytcl.mathematical_functions.signal_processing.filters import fir_design_remez
36
+ from pytcl.mathematical_functions.signal_processing.filters import frequency_response
37
+ from pytcl.mathematical_functions.signal_processing.filters import group_delay
38
+ from pytcl.mathematical_functions.signal_processing.filters import sos_to_zpk
39
+ from pytcl.mathematical_functions.signal_processing.filters import zpk_to_sos
42
40
  from pytcl.mathematical_functions.signal_processing.matched_filter import (
43
41
  MatchedFilterResult,
42
+ )
43
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
44
44
  PulseCompressionResult,
45
+ )
46
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
45
47
  ambiguity_function,
48
+ )
49
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
46
50
  cross_ambiguity,
51
+ )
52
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
47
53
  generate_lfm_chirp,
54
+ )
55
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
48
56
  generate_nlfm_chirp,
49
- matched_filter,
57
+ )
58
+ from pytcl.mathematical_functions.signal_processing.matched_filter import matched_filter
59
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
50
60
  matched_filter_frequency,
51
- optimal_filter,
61
+ )
62
+ from pytcl.mathematical_functions.signal_processing.matched_filter import optimal_filter
63
+ from pytcl.mathematical_functions.signal_processing.matched_filter import (
52
64
  pulse_compression,
53
65
  )
54
66