afmaths 2.0.3__tar.gz → 2.0.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.
- {afmaths-2.0.3 → afmaths-2.0.4}/PKG-INFO +4 -1
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/formula.py +1 -1
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/geometry.py +12 -32
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/physics.py +9 -1
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/space_engineering.py +32 -2
- {afmaths-2.0.3 → afmaths-2.0.4/lib}/afmaths.egg-info/PKG-INFO +4 -1
- afmaths-2.0.4/lib/afmaths.egg-info/SOURCES.txt +17 -0
- afmaths-2.0.4/lib/afmaths.egg-info/requires.txt +1 -0
- afmaths-2.0.4/lib/afmaths.egg-info/top_level.txt +1 -0
- {afmaths-2.0.3 → afmaths-2.0.4}/setup.py +8 -3
- afmaths-2.0.3/afmaths.egg-info/SOURCES.txt +0 -16
- afmaths-2.0.3/afmaths.egg-info/top_level.txt +0 -1
- {afmaths-2.0.3 → afmaths-2.0.4}/LICENSE +0 -0
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/__init__.py +0 -0
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/cs.py +0 -0
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/graph.py +0 -0
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/list.py +0 -0
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/operation.py +0 -0
- {afmaths-2.0.3/lib → afmaths-2.0.4/lib/afmaths}/statistics.py +0 -0
- {afmaths-2.0.3 → afmaths-2.0.4/lib}/afmaths.egg-info/dependency_links.txt +0 -0
- {afmaths-2.0.3 → afmaths-2.0.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: afmaths
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: A simple package of math functions.
|
|
5
5
|
Home-page: https://github.com/Arturius771/afmaths
|
|
6
6
|
Author: Artur Foden
|
|
@@ -8,12 +8,14 @@ Classifier: Programming Language :: Python :: 3
|
|
|
8
8
|
Requires-Python: >=3.12
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
|
+
Requires-Dist: astronomy_types>=2.1.0
|
|
11
12
|
Dynamic: author
|
|
12
13
|
Dynamic: classifier
|
|
13
14
|
Dynamic: description
|
|
14
15
|
Dynamic: description-content-type
|
|
15
16
|
Dynamic: home-page
|
|
16
17
|
Dynamic: license-file
|
|
18
|
+
Dynamic: requires-dist
|
|
17
19
|
Dynamic: requires-python
|
|
18
20
|
Dynamic: summary
|
|
19
21
|
|
|
@@ -52,6 +54,7 @@ Ensure that setuptools and wheel are installed in your environment:
|
|
|
52
54
|
|
|
53
55
|
```bash
|
|
54
56
|
pip install -r requirements.txt
|
|
57
|
+
pip install -e .
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
## 3. Update version number
|
|
@@ -9,9 +9,16 @@ from astronomy_types import (
|
|
|
9
9
|
TrueAnomaly,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
-
from operation import
|
|
12
|
+
from .operation import (
|
|
13
|
+
HALF,
|
|
14
|
+
SQUARE,
|
|
15
|
+
add,
|
|
16
|
+
divide,
|
|
17
|
+
multiply,
|
|
18
|
+
subtract,
|
|
19
|
+
)
|
|
13
20
|
import math
|
|
14
|
-
from formula import taylor_series
|
|
21
|
+
from .formula import taylor_series
|
|
15
22
|
|
|
16
23
|
pythagoras = lambda a: lambda b: add(SQUARE(a))(SQUARE(b))
|
|
17
24
|
|
|
@@ -79,7 +86,9 @@ def semi_major_axis_from_axes(a: float, b: float) -> SemiMajorAxis:
|
|
|
79
86
|
return HALF(add(a)(b))
|
|
80
87
|
|
|
81
88
|
|
|
82
|
-
def circle_bounding_box_from_coordinates(
|
|
89
|
+
def circle_bounding_box_from_coordinates(
|
|
90
|
+
coordinates: Coordinate2D, radius: float
|
|
91
|
+
) -> tuple[Coordinate2D, Coordinate2D]:
|
|
83
92
|
"""
|
|
84
93
|
Calculate the bounding box of a circle given its center coordinates and radius.
|
|
85
94
|
|
|
@@ -199,32 +208,3 @@ def calculate_semi_minor_axis(
|
|
|
199
208
|
raise ValueError("Eccentricity must be in the range [0, 1).")
|
|
200
209
|
|
|
201
210
|
return semi_major_axis * (1 - eccentricity**2) ** 0.5
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def true_anomaly_from_eccentric_anomaly(
|
|
205
|
-
eccentric_anomaly, eccentricity: Eccentricity
|
|
206
|
-
) -> TrueAnomaly:
|
|
207
|
-
"""
|
|
208
|
-
Calculate the true anomaly from the eccentric anomaly and eccentricity.
|
|
209
|
-
|
|
210
|
-
Parameters:
|
|
211
|
-
E (float): The eccentric anomaly in radians.
|
|
212
|
-
e (float): The eccentricity of the orbit (0 <= eccentricity < 1).
|
|
213
|
-
|
|
214
|
-
Returns:
|
|
215
|
-
float: The true anomaly in radians.
|
|
216
|
-
"""
|
|
217
|
-
if eccentricity < 0 or eccentricity >= 1:
|
|
218
|
-
raise ValueError("Eccentricity must be in the range [0, 1).")
|
|
219
|
-
|
|
220
|
-
return TrueAnomaly(
|
|
221
|
-
Radians(
|
|
222
|
-
Scalar(
|
|
223
|
-
2
|
|
224
|
-
* math.atan2(
|
|
225
|
-
math.sqrt(1 + eccentricity) * math.sin(eccentric_anomaly / 2),
|
|
226
|
-
math.sqrt(1 - eccentricity) * math.cos(eccentric_anomaly / 2),
|
|
227
|
-
)
|
|
228
|
-
)
|
|
229
|
-
)
|
|
230
|
-
)
|
|
@@ -2,7 +2,15 @@ import math
|
|
|
2
2
|
from formula import inverse_square_law
|
|
3
3
|
from geometry import area_of_right_triangle
|
|
4
4
|
from graph import GraphCoordinates, slope_gradiant
|
|
5
|
-
from operation import
|
|
5
|
+
from operation import (
|
|
6
|
+
HALF,
|
|
7
|
+
SQUARE,
|
|
8
|
+
add,
|
|
9
|
+
divide,
|
|
10
|
+
exponentiate,
|
|
11
|
+
multiply,
|
|
12
|
+
subtract,
|
|
13
|
+
)
|
|
6
14
|
from astronomy_types import Scalar, Distance
|
|
7
15
|
|
|
8
16
|
SPEED_OF_LIGHT_METRES_PER_SECONDS = 299792458
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from math import atan
|
|
2
2
|
import math
|
|
3
3
|
|
|
4
|
-
from geometry import semi_major_axis_from_axes
|
|
5
|
-
from operation import (
|
|
4
|
+
from .geometry import semi_major_axis_from_axes
|
|
5
|
+
from .operation import (
|
|
6
6
|
CUBE,
|
|
7
7
|
SQUARE,
|
|
8
8
|
add,
|
|
@@ -241,6 +241,36 @@ def eccentric_anomaly_solved(
|
|
|
241
241
|
return E_i, history
|
|
242
242
|
|
|
243
243
|
|
|
244
|
+
## Check if this belongs in geometry.py
|
|
245
|
+
# def true_anomaly_from_eccentric_anomaly(
|
|
246
|
+
# eccentric_anomaly: float, eccentricity: Eccentricity
|
|
247
|
+
# ) -> TrueAnomaly:
|
|
248
|
+
# """
|
|
249
|
+
# Calculate the true anomaly from the eccentric anomaly and eccentricity.
|
|
250
|
+
|
|
251
|
+
# Parameters:
|
|
252
|
+
# E (float): The eccentric anomaly in radians.
|
|
253
|
+
# e (float): The eccentricity of the orbit (0 <= eccentricity < 1).
|
|
254
|
+
|
|
255
|
+
# Returns:
|
|
256
|
+
# float: The true anomaly in radians.
|
|
257
|
+
# """
|
|
258
|
+
# if eccentricity < 0 or eccentricity >= 1:
|
|
259
|
+
# raise ValueError("Eccentricity must be in the range [0, 1).")
|
|
260
|
+
|
|
261
|
+
# return TrueAnomaly(
|
|
262
|
+
# Radians(
|
|
263
|
+
# Scalar(
|
|
264
|
+
# 2
|
|
265
|
+
# * math.atan2(
|
|
266
|
+
# math.sqrt(1 + eccentricity) * math.sin(eccentric_anomaly / 2),
|
|
267
|
+
# math.sqrt(1 - eccentricity) * math.cos(eccentric_anomaly / 2),
|
|
268
|
+
# )
|
|
269
|
+
# )
|
|
270
|
+
# )
|
|
271
|
+
# )
|
|
272
|
+
|
|
273
|
+
|
|
244
274
|
def true_anomaly_from_eccentric_anomaly(
|
|
245
275
|
E_rad: float, eccentricity: Eccentricity
|
|
246
276
|
) -> TrueAnomaly:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: afmaths
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: A simple package of math functions.
|
|
5
5
|
Home-page: https://github.com/Arturius771/afmaths
|
|
6
6
|
Author: Artur Foden
|
|
@@ -8,12 +8,14 @@ Classifier: Programming Language :: Python :: 3
|
|
|
8
8
|
Requires-Python: >=3.12
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
|
+
Requires-Dist: astronomy_types>=2.1.0
|
|
11
12
|
Dynamic: author
|
|
12
13
|
Dynamic: classifier
|
|
13
14
|
Dynamic: description
|
|
14
15
|
Dynamic: description-content-type
|
|
15
16
|
Dynamic: home-page
|
|
16
17
|
Dynamic: license-file
|
|
18
|
+
Dynamic: requires-dist
|
|
17
19
|
Dynamic: requires-python
|
|
18
20
|
Dynamic: summary
|
|
19
21
|
|
|
@@ -52,6 +54,7 @@ Ensure that setuptools and wheel are installed in your environment:
|
|
|
52
54
|
|
|
53
55
|
```bash
|
|
54
56
|
pip install -r requirements.txt
|
|
57
|
+
pip install -e .
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
## 3. Update version number
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
setup.py
|
|
3
|
+
lib/afmaths/__init__.py
|
|
4
|
+
lib/afmaths/cs.py
|
|
5
|
+
lib/afmaths/formula.py
|
|
6
|
+
lib/afmaths/geometry.py
|
|
7
|
+
lib/afmaths/graph.py
|
|
8
|
+
lib/afmaths/list.py
|
|
9
|
+
lib/afmaths/operation.py
|
|
10
|
+
lib/afmaths/physics.py
|
|
11
|
+
lib/afmaths/space_engineering.py
|
|
12
|
+
lib/afmaths/statistics.py
|
|
13
|
+
lib/afmaths.egg-info/PKG-INFO
|
|
14
|
+
lib/afmaths.egg-info/SOURCES.txt
|
|
15
|
+
lib/afmaths.egg-info/dependency_links.txt
|
|
16
|
+
lib/afmaths.egg-info/requires.txt
|
|
17
|
+
lib/afmaths.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
astronomy_types>=2.1.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
afmaths
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
from pathlib import Path
|
|
1
2
|
from setuptools import setup, find_packages
|
|
2
3
|
|
|
3
4
|
setup(
|
|
4
5
|
name="afmaths",
|
|
5
|
-
version="2.0.
|
|
6
|
-
|
|
6
|
+
version="2.0.4",
|
|
7
|
+
package_dir={"": "lib"},
|
|
8
|
+
packages=find_packages(where="lib"),
|
|
7
9
|
author="Artur Foden",
|
|
8
10
|
description="A simple package of math functions.",
|
|
9
|
-
long_description=
|
|
11
|
+
long_description=Path("readme.md").read_text(encoding="utf-8"),
|
|
10
12
|
long_description_content_type="text/markdown",
|
|
11
13
|
url="https://github.com/Arturius771/afmaths",
|
|
12
14
|
classifiers=[
|
|
13
15
|
"Programming Language :: Python :: 3",
|
|
14
16
|
],
|
|
15
17
|
python_requires=">=3.12",
|
|
18
|
+
install_requires=[
|
|
19
|
+
"astronomy_types>=2.1.0",
|
|
20
|
+
],
|
|
16
21
|
)
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
setup.py
|
|
3
|
-
afmaths.egg-info/PKG-INFO
|
|
4
|
-
afmaths.egg-info/SOURCES.txt
|
|
5
|
-
afmaths.egg-info/dependency_links.txt
|
|
6
|
-
afmaths.egg-info/top_level.txt
|
|
7
|
-
lib/__init__.py
|
|
8
|
-
lib/cs.py
|
|
9
|
-
lib/formula.py
|
|
10
|
-
lib/geometry.py
|
|
11
|
-
lib/graph.py
|
|
12
|
-
lib/list.py
|
|
13
|
-
lib/operation.py
|
|
14
|
-
lib/physics.py
|
|
15
|
-
lib/space_engineering.py
|
|
16
|
-
lib/statistics.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
lib
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|