c4dynamics 2.3.2__tar.gz → 2.3.4__tar.gz
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.
- {c4dynamics-2.3.2/c4dynamics.egg-info → c4dynamics-2.3.4}/PKG-INFO +86 -36
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/README.md +52 -24
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/__init__.py +1 -1
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/datasets/_manager.py +11 -5
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/detectors/yolo3_opencv.py +22 -4
- c4dynamics-2.3.4/c4dynamics/envs/mountain_car.py +880 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/filters/kalman.py +1 -1
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/sensors/radar.py +1 -1
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/sensors/seeker.py +2 -2
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/states/lib/pixelpoint.py +23 -7
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/states/state.py +34 -28
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/gen_gif.py +8 -3
- {c4dynamics-2.3.2 → c4dynamics-2.3.4/c4dynamics.egg-info}/PKG-INFO +86 -36
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics.egg-info/SOURCES.txt +0 -1
- c4dynamics-2.3.4/c4dynamics.egg-info/requires.txt +45 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/pyproject.toml +26 -14
- c4dynamics-2.3.4/setup.py +63 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_animate.py +1 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_gen_gif.py +8 -1
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_plotdefaults.py +1 -2
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_radar.py +2 -2
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_state.py +36 -3
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_state_assignment.py +2 -2
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_state_assignment_strict.py +2 -2
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_yolov3_opencv.py +12 -3
- c4dynamics-2.3.2/CLASSIFIERS.txt +0 -6
- c4dynamics-2.3.2/c4dynamics/envs/mountain_car.py +0 -477
- c4dynamics-2.3.2/c4dynamics.egg-info/requires.txt +0 -13
- c4dynamics-2.3.2/setup.py +0 -60
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/LICENSE +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/datasets/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/datasets/_registry.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/detectors/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/envs/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/eqm/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/eqm/derivs.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/eqm/integrate.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/filters/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/filters/ekf.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/filters/lowpass.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/rotmat/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/rotmat/animate.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/rotmat/rotmat.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/sensors/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/sensors/lineofsight.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/states/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/states/lib/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/states/lib/datapoint.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/states/lib/rigidbody.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/__init__.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/_struct.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/const.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/cprint.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/idx2keys.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/images_loader.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/math.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/plottools.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/plottracks.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/printpts.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/slides_gen.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/tictoc.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/video_gen.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics/utils/vidgen.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics.egg-info/dependency_links.txt +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/c4dynamics.egg-info/top_level.txt +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/setup.cfg +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_const.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_cprint.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_datapoint.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_datasets.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_derivs.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_ekf.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_integrate.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_kalman.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_lowpass.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_math.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_pixelpoint.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_rigidbody.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_rotmat.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_seeker.py +0 -0
- {c4dynamics-2.3.2 → c4dynamics-2.3.4}/tests/test_tictoc.py +0 -0
|
@@ -1,32 +1,54 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: c4dynamics
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Python framework for state-space modeling and algorithm development
|
|
5
5
|
Author: c4dynamics
|
|
6
6
|
Author-email: Ziv Meri <zivmeri@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
|
-
Keywords: python,state-space,dynamics,physics,algorithms,computer vision,navigation,guidance,slam,vslam,image processing,signal processing,control
|
|
9
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Operating System :: Unix
|
|
13
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
14
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
15
8
|
Requires-Python: >=3.8,<3.13
|
|
16
9
|
Description-Content-Type: text/markdown
|
|
17
10
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: imageio>=2.37.0
|
|
19
11
|
Requires-Dist: matplotlib>=3.9.2
|
|
20
|
-
Requires-Dist: natsort>=8.3.1
|
|
21
12
|
Requires-Dist: numpy>=1.26.0
|
|
22
|
-
Requires-Dist: opencv-python>=4.11.0.86
|
|
23
13
|
Requires-Dist: pooch>=1.8.0
|
|
24
14
|
Requires-Dist: scipy>=1.13.0
|
|
15
|
+
Provides-Extra: vision
|
|
16
|
+
Requires-Dist: matplotlib>=3.9.2; extra == "vision"
|
|
17
|
+
Requires-Dist: numpy>=1.26.0; extra == "vision"
|
|
18
|
+
Requires-Dist: pooch>=1.8.0; extra == "vision"
|
|
19
|
+
Requires-Dist: scipy>=1.13.0; extra == "vision"
|
|
20
|
+
Requires-Dist: imageio>=2.37.0; extra == "vision"
|
|
21
|
+
Requires-Dist: natsort>=8.3.1; extra == "vision"
|
|
22
|
+
Requires-Dist: opencv-python>=4.11.0.86; extra == "vision"
|
|
25
23
|
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: matplotlib>=3.9.2; extra == "dev"
|
|
25
|
+
Requires-Dist: numpy>=1.26.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pooch>=1.8.0; extra == "dev"
|
|
27
|
+
Requires-Dist: scipy>=1.13.0; extra == "dev"
|
|
28
|
+
Requires-Dist: imageio>=2.37.0; extra == "dev"
|
|
29
|
+
Requires-Dist: natsort>=8.3.1; extra == "dev"
|
|
30
|
+
Requires-Dist: opencv-python>=4.11.0.86; extra == "dev"
|
|
31
|
+
Requires-Dist: coverage>=7.0.0; extra == "dev"
|
|
26
32
|
Requires-Dist: nbsphinx>=0.9.3; extra == "dev"
|
|
27
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: sphinx>=8.1.3; extra == "dev"
|
|
28
34
|
Requires-Dist: sphinx-book-theme>=1.1.4; extra == "dev"
|
|
29
35
|
Requires-Dist: sphinx_design>=0.6.1; extra == "dev"
|
|
36
|
+
Provides-Extra: keywords
|
|
37
|
+
Requires-Dist: python; extra == "keywords"
|
|
38
|
+
Requires-Dist: state-space; extra == "keywords"
|
|
39
|
+
Requires-Dist: dynamics; extra == "keywords"
|
|
40
|
+
Requires-Dist: physics; extra == "keywords"
|
|
41
|
+
Requires-Dist: algorithms; extra == "keywords"
|
|
42
|
+
Requires-Dist: control; extra == "keywords"
|
|
43
|
+
Requires-Dist: navigation; extra == "keywords"
|
|
44
|
+
Requires-Dist: guidance; extra == "keywords"
|
|
45
|
+
Requires-Dist: slam; extra == "keywords"
|
|
46
|
+
Requires-Dist: vslam; extra == "keywords"
|
|
47
|
+
Requires-Dist: computer-vision; extra == "keywords"
|
|
48
|
+
Requires-Dist: image-processing; extra == "keywords"
|
|
49
|
+
Requires-Dist: signal-processing; extra == "keywords"
|
|
50
|
+
Provides-Extra: dynamic
|
|
51
|
+
Requires-Dist: classifiers; extra == "dynamic"
|
|
30
52
|
Dynamic: author
|
|
31
53
|
Dynamic: license-file
|
|
32
54
|
Dynamic: requires-python
|
|
@@ -37,6 +59,27 @@ Dynamic: requires-python
|
|
|
37
59
|
|
|
38
60
|
|
|
39
61
|
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<div align="center">
|
|
65
|
+
<strong>📄 Published in the Journal of Open Source Software (JOSS)</strong><br>
|
|
66
|
+
<em>A peer-reviewed open-source framework for state-space modeling and algorithm development</em>
|
|
67
|
+
<br>
|
|
68
|
+
<a href="https://doi.org/10.5281/zenodo.17931207">
|
|
69
|
+
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.17931207.svg">
|
|
70
|
+
</a>
|
|
71
|
+
<br>
|
|
72
|
+
<a href="https://doi.org/10.21105/joss.08776">
|
|
73
|
+
<img src="https://joss.theoj.org/papers/10.21105/joss.08776/status.svg">
|
|
74
|
+
</a>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<br>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
40
83
|
# Tsipor Dynamics
|
|
41
84
|
|
|
42
85
|
## Algorithms Engineering and Development
|
|
@@ -57,9 +100,24 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
|
|
|
57
100
|

|
|
58
101
|
|
|
59
102
|
|
|
103
|
+
## About c4dynamics
|
|
60
104
|
|
|
105
|
+
**c4dynamics** is designed to
|
|
106
|
+
simplify the development of algorithms for dynamic systems,
|
|
107
|
+
using state space representations.
|
|
108
|
+
It offers engineers and researchers a systematic approach to model,
|
|
109
|
+
simulate, and control systems in fields like
|
|
110
|
+
``robotics, aerospace,`` and ``navigation``.
|
|
61
111
|
|
|
62
|
-
|
|
112
|
+
The framework introduces ``state objects,`` which are foundational
|
|
113
|
+
data structures that encapsulate state vectors and provide
|
|
114
|
+
the tools for managing data, simulating system behavior,
|
|
115
|
+
and analyzing results.
|
|
116
|
+
|
|
117
|
+
With integrated modules for sensors,
|
|
118
|
+
detectors, and filters,
|
|
119
|
+
c4dynamics accelerates algorithm development
|
|
120
|
+
while maintaining flexibility and scalability.
|
|
63
121
|
|
|
64
122
|
|
|
65
123
|
## Why c4dynamics?
|
|
@@ -78,24 +136,15 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
|
|
|
78
136
|
|
|
79
137
|
|
|
80
138
|
|
|
139
|
+
## Documentation
|
|
81
140
|
|
|
82
|
-
**
|
|
83
|
-
|
|
84
|
-
using state space representations.
|
|
85
|
-
It offers engineers and researchers a systematic approach to model,
|
|
86
|
-
simulate, and control systems in fields like
|
|
87
|
-
``robotics, aerospace,`` and ``navigation``.
|
|
88
|
-
|
|
89
|
-
The framework introduces ``state objects,`` which are foundational
|
|
90
|
-
data structures that encapsulate state vectors and provide
|
|
91
|
-
the tools for managing data, simulating system behavior,
|
|
92
|
-
and analyzing results.
|
|
93
|
-
|
|
94
|
-
With integrated modules for sensors,
|
|
95
|
-
detectors, and filters,
|
|
96
|
-
c4dynamics accelerates algorithm development
|
|
97
|
-
while maintaining flexibility and scalability.
|
|
141
|
+
📘 **Full documentation:**
|
|
142
|
+
https://c4dynamics.github.io/c4dynamics/
|
|
98
143
|
|
|
144
|
+
- Installation and setup guides
|
|
145
|
+
- Core concepts and state-space modeling philosophy
|
|
146
|
+
- API reference and examples
|
|
147
|
+
- Tutorials for filtering, sensing, and simulation workflows
|
|
99
148
|
|
|
100
149
|
|
|
101
150
|
## Requirements
|
|
@@ -124,24 +173,25 @@ To run the latest GitHub version, download the repo and install required package
|
|
|
124
173
|
>>> pip install -r requirements.txt
|
|
125
174
|
```
|
|
126
175
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
176
|
|
|
131
177
|
## Quickstart
|
|
132
178
|
|
|
133
179
|
Import c4dynamics:
|
|
134
|
-
```
|
|
180
|
+
```python
|
|
135
181
|
>>> import c4dynamics as c4d
|
|
136
182
|
```
|
|
137
183
|
|
|
138
184
|
Define state space object of two variables in the state space (y, vy) with initial conditions (change the state with your variables):
|
|
139
|
-
```
|
|
185
|
+
```python
|
|
140
186
|
>>> s = c4d.state(y = 1, vy = 0.5)
|
|
141
187
|
```
|
|
188
|
+
Store with time stamp `t = 0`:
|
|
189
|
+
```python
|
|
190
|
+
>>> s.store(t = 0)
|
|
191
|
+
```
|
|
142
192
|
|
|
143
193
|
Multiply the state vector by a matrix and store:
|
|
144
|
-
```
|
|
194
|
+
```python
|
|
145
195
|
>>> F = [[1, 1],
|
|
146
196
|
[0, 1]]
|
|
147
197
|
>>> s.X += F @ s.X
|
|
@@ -149,7 +199,7 @@ Multiply the state vector by a matrix and store:
|
|
|
149
199
|
```
|
|
150
200
|
|
|
151
201
|
Print the state variables, the state vector, and the stored data:
|
|
152
|
-
```
|
|
202
|
+
```python
|
|
153
203
|
>>> print(s)
|
|
154
204
|
[ y vy ]
|
|
155
205
|
>>> s.X
|
|
@@ -4,6 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<div align="center">
|
|
10
|
+
<strong>📄 Published in the Journal of Open Source Software (JOSS)</strong><br>
|
|
11
|
+
<em>A peer-reviewed open-source framework for state-space modeling and algorithm development</em>
|
|
12
|
+
<br>
|
|
13
|
+
<a href="https://doi.org/10.5281/zenodo.17931207">
|
|
14
|
+
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.17931207.svg">
|
|
15
|
+
</a>
|
|
16
|
+
<br>
|
|
17
|
+
<a href="https://doi.org/10.21105/joss.08776">
|
|
18
|
+
<img src="https://joss.theoj.org/papers/10.21105/joss.08776/status.svg">
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<br>
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
7
28
|
# Tsipor Dynamics
|
|
8
29
|
|
|
9
30
|
## Algorithms Engineering and Development
|
|
@@ -24,9 +45,24 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
|
|
|
24
45
|

|
|
25
46
|
|
|
26
47
|
|
|
48
|
+
## About c4dynamics
|
|
27
49
|
|
|
50
|
+
**c4dynamics** is designed to
|
|
51
|
+
simplify the development of algorithms for dynamic systems,
|
|
52
|
+
using state space representations.
|
|
53
|
+
It offers engineers and researchers a systematic approach to model,
|
|
54
|
+
simulate, and control systems in fields like
|
|
55
|
+
``robotics, aerospace,`` and ``navigation``.
|
|
28
56
|
|
|
29
|
-
|
|
57
|
+
The framework introduces ``state objects,`` which are foundational
|
|
58
|
+
data structures that encapsulate state vectors and provide
|
|
59
|
+
the tools for managing data, simulating system behavior,
|
|
60
|
+
and analyzing results.
|
|
61
|
+
|
|
62
|
+
With integrated modules for sensors,
|
|
63
|
+
detectors, and filters,
|
|
64
|
+
c4dynamics accelerates algorithm development
|
|
65
|
+
while maintaining flexibility and scalability.
|
|
30
66
|
|
|
31
67
|
|
|
32
68
|
## Why c4dynamics?
|
|
@@ -45,24 +81,15 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
|
|
|
45
81
|
|
|
46
82
|
|
|
47
83
|
|
|
84
|
+
## Documentation
|
|
48
85
|
|
|
49
|
-
**
|
|
50
|
-
|
|
51
|
-
using state space representations.
|
|
52
|
-
It offers engineers and researchers a systematic approach to model,
|
|
53
|
-
simulate, and control systems in fields like
|
|
54
|
-
``robotics, aerospace,`` and ``navigation``.
|
|
55
|
-
|
|
56
|
-
The framework introduces ``state objects,`` which are foundational
|
|
57
|
-
data structures that encapsulate state vectors and provide
|
|
58
|
-
the tools for managing data, simulating system behavior,
|
|
59
|
-
and analyzing results.
|
|
60
|
-
|
|
61
|
-
With integrated modules for sensors,
|
|
62
|
-
detectors, and filters,
|
|
63
|
-
c4dynamics accelerates algorithm development
|
|
64
|
-
while maintaining flexibility and scalability.
|
|
86
|
+
📘 **Full documentation:**
|
|
87
|
+
https://c4dynamics.github.io/c4dynamics/
|
|
65
88
|
|
|
89
|
+
- Installation and setup guides
|
|
90
|
+
- Core concepts and state-space modeling philosophy
|
|
91
|
+
- API reference and examples
|
|
92
|
+
- Tutorials for filtering, sensing, and simulation workflows
|
|
66
93
|
|
|
67
94
|
|
|
68
95
|
## Requirements
|
|
@@ -91,24 +118,25 @@ To run the latest GitHub version, download the repo and install required package
|
|
|
91
118
|
>>> pip install -r requirements.txt
|
|
92
119
|
```
|
|
93
120
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
121
|
|
|
98
122
|
## Quickstart
|
|
99
123
|
|
|
100
124
|
Import c4dynamics:
|
|
101
|
-
```
|
|
125
|
+
```python
|
|
102
126
|
>>> import c4dynamics as c4d
|
|
103
127
|
```
|
|
104
128
|
|
|
105
129
|
Define state space object of two variables in the state space (y, vy) with initial conditions (change the state with your variables):
|
|
106
|
-
```
|
|
130
|
+
```python
|
|
107
131
|
>>> s = c4d.state(y = 1, vy = 0.5)
|
|
108
132
|
```
|
|
133
|
+
Store with time stamp `t = 0`:
|
|
134
|
+
```python
|
|
135
|
+
>>> s.store(t = 0)
|
|
136
|
+
```
|
|
109
137
|
|
|
110
138
|
Multiply the state vector by a matrix and store:
|
|
111
|
-
```
|
|
139
|
+
```python
|
|
112
140
|
>>> F = [[1, 1],
|
|
113
141
|
[0, 1]]
|
|
114
142
|
>>> s.X += F @ s.X
|
|
@@ -116,7 +144,7 @@ Multiply the state vector by a matrix and store:
|
|
|
116
144
|
```
|
|
117
145
|
|
|
118
146
|
Print the state variables, the state vector, and the stored data:
|
|
119
|
-
```
|
|
147
|
+
```python
|
|
120
148
|
>>> print(s)
|
|
121
149
|
[ y vy ]
|
|
122
150
|
>>> s.X
|
|
@@ -573,20 +573,26 @@ def sha256(filename: str) -> str:
|
|
|
573
573
|
if __name__ == "__main__":
|
|
574
574
|
|
|
575
575
|
|
|
576
|
+
current_module = sys.modules[__name__]
|
|
576
577
|
|
|
577
578
|
try:
|
|
578
579
|
import open3d as o3d # OPEN3D AVAILABLE
|
|
579
|
-
|
|
580
580
|
except ImportError: # OPEN3D UNAVAILABLE
|
|
581
581
|
# remove the doctests for d3_model if open3d is not available
|
|
582
|
-
|
|
583
|
-
current_module = sys.modules[__name__]
|
|
584
582
|
if hasattr(current_module, "d3_model"):
|
|
585
583
|
current_module.d3_model.__doc__ = "" # clears doctest examples
|
|
586
584
|
|
|
585
|
+
try:
|
|
586
|
+
import cv2
|
|
587
|
+
except ImportError:
|
|
588
|
+
if hasattr(current_module, "video"):
|
|
589
|
+
current_module.video.__doc__ = "" # clears doctest examples
|
|
590
|
+
if hasattr(current_module, "nn_model"):
|
|
591
|
+
current_module.nn_model.__doc__ = "" # clears doctest examples
|
|
592
|
+
|
|
587
593
|
|
|
588
|
-
import doctest, contextlib
|
|
589
|
-
from c4dynamics import IgnoreOutputChecker, cprint
|
|
594
|
+
# import doctest, contextlib
|
|
595
|
+
# from c4dynamics import IgnoreOutputChecker, cprint
|
|
590
596
|
|
|
591
597
|
|
|
592
598
|
# # Register the custom OutputChecker
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import os, sys
|
|
2
|
-
|
|
2
|
+
# optional vision modules
|
|
3
|
+
try:
|
|
4
|
+
import cv2
|
|
5
|
+
except ImportError:
|
|
6
|
+
# vision modules are unavailable
|
|
7
|
+
pass
|
|
3
8
|
|
|
4
9
|
import numpy as np
|
|
5
10
|
sys.path.append('.')
|
|
@@ -657,8 +662,21 @@ class yolov3:
|
|
|
657
662
|
|
|
658
663
|
if __name__ == "__main__":
|
|
659
664
|
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
665
|
+
from c4dynamics import rundoctests
|
|
666
|
+
|
|
667
|
+
# current_module = sys.modules[__name__].yolov3
|
|
668
|
+
current_module = sys.modules[__name__]
|
|
669
|
+
|
|
670
|
+
try:
|
|
671
|
+
import cv2
|
|
672
|
+
except ImportError:
|
|
673
|
+
# if hasattr(current_module, "yolov3"):
|
|
674
|
+
current_module.yolov3.__doc__ = "" # clears doctest examples
|
|
675
|
+
current_module.yolov3.detect.__doc__ = "" # clears doctest examples
|
|
676
|
+
current_module.yolov3.confidence_th.__doc__ = "" # clears doctest examples
|
|
677
|
+
current_module.yolov3.nms_th.__doc__ = "" # clears doctest examples
|
|
678
|
+
|
|
679
|
+
rundoctests(sys.modules[__name__])
|
|
680
|
+
|
|
663
681
|
|
|
664
682
|
|