nrl-tracker 0.21.4__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.
- {nrl_tracker-0.21.4.dist-info → nrl_tracker-0.22.0.dist-info}/METADATA +2 -2
- nrl_tracker-0.22.0.dist-info/RECORD +150 -0
- pytcl/__init__.py +9 -11
- pytcl/assignment_algorithms/__init__.py +32 -42
- pytcl/assignment_algorithms/data_association.py +9 -10
- pytcl/assignment_algorithms/gating.py +7 -5
- pytcl/assignment_algorithms/jpda.py +10 -14
- pytcl/assignment_algorithms/three_dimensional/__init__.py +6 -8
- pytcl/assignment_algorithms/three_dimensional/assignment.py +6 -2
- pytcl/assignment_algorithms/two_dimensional/__init__.py +9 -13
- pytcl/assignment_algorithms/two_dimensional/assignment.py +5 -2
- pytcl/assignment_algorithms/two_dimensional/kbest.py +9 -9
- pytcl/astronomical/__init__.py +130 -89
- pytcl/astronomical/ephemerides.py +524 -0
- pytcl/astronomical/lambert.py +6 -15
- pytcl/astronomical/orbital_mechanics.py +1 -3
- pytcl/astronomical/reference_frames.py +1 -3
- pytcl/astronomical/relativity.py +466 -0
- pytcl/astronomical/time_systems.py +2 -1
- pytcl/atmosphere/__init__.py +12 -14
- pytcl/atmosphere/models.py +5 -5
- pytcl/clustering/__init__.py +28 -36
- pytcl/clustering/dbscan.py +5 -2
- pytcl/clustering/gaussian_mixture.py +10 -10
- pytcl/clustering/hierarchical.py +7 -7
- pytcl/clustering/kmeans.py +7 -5
- pytcl/containers/__init__.py +29 -43
- pytcl/containers/cluster_set.py +13 -20
- pytcl/containers/covertree.py +8 -2
- pytcl/containers/kd_tree.py +6 -2
- pytcl/containers/measurement_set.py +11 -16
- pytcl/containers/rtree.py +8 -7
- pytcl/containers/track_list.py +13 -13
- pytcl/containers/vptree.py +7 -2
- pytcl/coordinate_systems/__init__.py +69 -74
- pytcl/coordinate_systems/conversions/__init__.py +20 -24
- pytcl/coordinate_systems/conversions/geodetic.py +7 -17
- pytcl/coordinate_systems/conversions/spherical.py +4 -2
- pytcl/coordinate_systems/jacobians/__init__.py +10 -12
- pytcl/coordinate_systems/jacobians/jacobians.py +2 -1
- pytcl/coordinate_systems/projections/__init__.py +27 -23
- pytcl/coordinate_systems/projections/projections.py +14 -39
- pytcl/coordinate_systems/rotations/__init__.py +20 -22
- pytcl/coordinate_systems/rotations/rotations.py +3 -4
- pytcl/core/__init__.py +16 -22
- pytcl/core/array_utils.py +7 -7
- pytcl/core/constants.py +1 -3
- pytcl/core/validation.py +13 -19
- pytcl/dynamic_estimation/__init__.py +77 -86
- pytcl/dynamic_estimation/imm.py +10 -15
- pytcl/dynamic_estimation/information_filter.py +8 -6
- pytcl/dynamic_estimation/kalman/__init__.py +40 -48
- pytcl/dynamic_estimation/kalman/extended.py +4 -5
- pytcl/dynamic_estimation/kalman/linear.py +7 -3
- pytcl/dynamic_estimation/kalman/square_root.py +7 -8
- pytcl/dynamic_estimation/kalman/unscented.py +8 -6
- pytcl/dynamic_estimation/particle_filters/__init__.py +12 -14
- pytcl/dynamic_estimation/particle_filters/bootstrap.py +8 -8
- pytcl/dynamic_estimation/smoothers.py +9 -10
- pytcl/dynamic_models/__init__.py +37 -41
- pytcl/dynamic_models/continuous_time/__init__.py +11 -11
- pytcl/dynamic_models/continuous_time/dynamics.py +4 -2
- pytcl/dynamic_models/discrete_time/__init__.py +11 -17
- pytcl/dynamic_models/process_noise/__init__.py +11 -17
- pytcl/dynamic_models/process_noise/polynomial.py +2 -6
- pytcl/gravity/__init__.py +55 -65
- pytcl/gravity/clenshaw.py +4 -7
- pytcl/gravity/egm.py +9 -6
- pytcl/gravity/models.py +1 -3
- pytcl/gravity/spherical_harmonics.py +6 -11
- pytcl/gravity/tides.py +9 -17
- pytcl/magnetism/__init__.py +26 -36
- pytcl/magnetism/emm.py +7 -13
- pytcl/magnetism/igrf.py +5 -6
- pytcl/magnetism/wmm.py +4 -10
- pytcl/mathematical_functions/__init__.py +69 -87
- pytcl/mathematical_functions/basic_matrix/__init__.py +25 -19
- pytcl/mathematical_functions/basic_matrix/decompositions.py +6 -5
- pytcl/mathematical_functions/basic_matrix/special_matrices.py +2 -1
- pytcl/mathematical_functions/combinatorics/__init__.py +18 -14
- pytcl/mathematical_functions/combinatorics/combinatorics.py +5 -4
- pytcl/mathematical_functions/geometry/__init__.py +15 -15
- pytcl/mathematical_functions/geometry/geometry.py +10 -15
- pytcl/mathematical_functions/interpolation/__init__.py +11 -13
- pytcl/mathematical_functions/interpolation/interpolation.py +8 -5
- pytcl/mathematical_functions/numerical_integration/__init__.py +16 -10
- pytcl/mathematical_functions/numerical_integration/quadrature.py +6 -2
- pytcl/mathematical_functions/signal_processing/__init__.py +42 -30
- pytcl/mathematical_functions/signal_processing/detection.py +9 -9
- pytcl/mathematical_functions/signal_processing/filters.py +7 -8
- pytcl/mathematical_functions/signal_processing/matched_filter.py +8 -7
- pytcl/mathematical_functions/special_functions/__init__.py +75 -77
- pytcl/mathematical_functions/special_functions/bessel.py +2 -1
- pytcl/mathematical_functions/special_functions/debye.py +4 -2
- pytcl/mathematical_functions/special_functions/elliptic.py +3 -4
- pytcl/mathematical_functions/special_functions/error_functions.py +2 -1
- pytcl/mathematical_functions/special_functions/gamma_functions.py +3 -4
- pytcl/mathematical_functions/special_functions/hypergeometric.py +2 -1
- pytcl/mathematical_functions/special_functions/lambert_w.py +3 -4
- pytcl/mathematical_functions/special_functions/marcum_q.py +2 -1
- pytcl/mathematical_functions/statistics/__init__.py +27 -31
- pytcl/mathematical_functions/statistics/distributions.py +21 -40
- pytcl/mathematical_functions/statistics/estimators.py +3 -4
- pytcl/mathematical_functions/transforms/__init__.py +45 -51
- pytcl/mathematical_functions/transforms/fourier.py +5 -2
- pytcl/mathematical_functions/transforms/stft.py +8 -11
- pytcl/mathematical_functions/transforms/wavelets.py +13 -20
- pytcl/navigation/__init__.py +96 -102
- pytcl/navigation/geodesy.py +13 -33
- pytcl/navigation/great_circle.py +7 -13
- pytcl/navigation/ins.py +12 -16
- pytcl/navigation/ins_gnss.py +24 -37
- pytcl/navigation/rhumb.py +7 -12
- pytcl/performance_evaluation/__init__.py +21 -25
- pytcl/performance_evaluation/estimation_metrics.py +3 -1
- pytcl/performance_evaluation/track_metrics.py +4 -4
- pytcl/plotting/__init__.py +30 -38
- pytcl/plotting/coordinates.py +8 -18
- pytcl/plotting/ellipses.py +5 -2
- pytcl/plotting/metrics.py +5 -10
- pytcl/plotting/tracks.py +7 -12
- pytcl/static_estimation/__init__.py +37 -41
- pytcl/static_estimation/least_squares.py +5 -4
- pytcl/static_estimation/maximum_likelihood.py +8 -5
- pytcl/static_estimation/robust.py +5 -2
- pytcl/terrain/__init__.py +28 -34
- pytcl/terrain/dem.py +6 -9
- pytcl/terrain/loaders.py +9 -14
- pytcl/terrain/visibility.py +4 -8
- pytcl/trackers/__init__.py +17 -25
- pytcl/trackers/hypothesis.py +8 -8
- pytcl/trackers/mht.py +18 -24
- pytcl/trackers/multi_target.py +8 -6
- pytcl/trackers/single_target.py +5 -2
- nrl_tracker-0.21.4.dist-info/RECORD +0 -148
- {nrl_tracker-0.21.4.dist-info → nrl_tracker-0.22.0.dist-info}/LICENSE +0 -0
- {nrl_tracker-0.21.4.dist-info → nrl_tracker-0.22.0.dist-info}/WHEEL +0 -0
- {nrl_tracker-0.21.4.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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
85
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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
|
|
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
|
|
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
|
|
@@ -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
|
-
|
|
14
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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
|
|
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
|
|
8
|
+
from typing import Optional
|
|
9
|
+
from typing import Tuple
|
|
9
10
|
|
|
10
11
|
import numpy as np
|
|
11
|
-
from numpy.typing import ArrayLike
|
|
12
|
-
from
|
|
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
|
-
|
|
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
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|