pylunar 0.7.3__tar.gz → 0.8.0__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.
Files changed (42) hide show
  1. {pylunar-0.7.3 → pylunar-0.8.0}/CONTRIBUTING.rst +2 -3
  2. {pylunar-0.7.3 → pylunar-0.8.0}/HISTORY.rst +29 -0
  3. {pylunar-0.7.3 → pylunar-0.8.0}/Makefile +1 -0
  4. {pylunar-0.7.3 → pylunar-0.8.0}/PKG-INFO +7 -5
  5. {pylunar-0.7.3 → pylunar-0.8.0}/docs/usage.rst +4 -4
  6. {pylunar-0.7.3 → pylunar-0.8.0}/pyproject.toml +15 -8
  7. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/__init__.py +2 -0
  8. pylunar-0.8.0/src/pylunar/altitude_dict.py +57 -0
  9. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/lunar_feature.py +1 -1
  10. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/lunar_feature_container.py +2 -2
  11. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/moon_info.py +25 -2
  12. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar.egg-info/PKG-INFO +7 -5
  13. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar.egg-info/SOURCES.txt +2 -0
  14. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar.egg-info/requires.txt +10 -4
  15. pylunar-0.8.0/tests/test_altitude_dict.py +31 -0
  16. {pylunar-0.7.3 → pylunar-0.8.0}/tests/test_moon_info.py +17 -0
  17. {pylunar-0.7.3 → pylunar-0.8.0}/.pre-commit-config.yaml +0 -0
  18. {pylunar-0.7.3 → pylunar-0.8.0}/AUTHORS.rst +0 -0
  19. {pylunar-0.7.3 → pylunar-0.8.0}/LICENSE +0 -0
  20. {pylunar-0.7.3 → pylunar-0.8.0}/MANIFEST.in +0 -0
  21. {pylunar-0.7.3 → pylunar-0.8.0}/README.rst +0 -0
  22. {pylunar-0.7.3 → pylunar-0.8.0}/docs/Makefile +0 -0
  23. {pylunar-0.7.3 → pylunar-0.8.0}/docs/authors.rst +0 -0
  24. {pylunar-0.7.3 → pylunar-0.8.0}/docs/conf.py +0 -0
  25. {pylunar-0.7.3 → pylunar-0.8.0}/docs/contributing.rst +0 -0
  26. {pylunar-0.7.3 → pylunar-0.8.0}/docs/history.rst +0 -0
  27. {pylunar-0.7.3 → pylunar-0.8.0}/docs/index.rst +0 -0
  28. {pylunar-0.7.3 → pylunar-0.8.0}/docs/installation.rst +0 -0
  29. {pylunar-0.7.3 → pylunar-0.8.0}/docs/make.bat +0 -0
  30. {pylunar-0.7.3 → pylunar-0.8.0}/renovate.json +0 -0
  31. {pylunar-0.7.3 → pylunar-0.8.0}/scripts/startup.py +0 -0
  32. {pylunar-0.7.3 → pylunar-0.8.0}/setup.cfg +0 -0
  33. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/data/lunar.db +0 -0
  34. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/helpers.py +0 -0
  35. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar/pkg_types.py +0 -0
  36. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar.egg-info/dependency_links.txt +0 -0
  37. {pylunar-0.7.3 → pylunar-0.8.0}/src/pylunar.egg-info/top_level.txt +0 -0
  38. {pylunar-0.7.3 → pylunar-0.8.0}/tests/__init__.py +0 -0
  39. {pylunar-0.7.3 → pylunar-0.8.0}/tests/test_helpers.py +0 -0
  40. {pylunar-0.7.3 → pylunar-0.8.0}/tests/test_lunar_feature.py +0 -0
  41. {pylunar-0.7.3 → pylunar-0.8.0}/tests/test_lunar_feature_container.py +0 -0
  42. {pylunar-0.7.3 → pylunar-0.8.0}/tox.ini +0 -0
@@ -93,9 +93,8 @@ Pull Request Guidelines
93
93
  Before you submit a pull request, check that it meets these guidelines:
94
94
 
95
95
  #. The pull request should include tests.
96
- #. If the pull request adds functionality, the docs should be updated. Put
97
- your new functionality into a function with a docstring, and add the
98
- feature to the list in HISTORY.rst.
96
+ #. If the pull request adds functionality, put your new functionality into a
97
+ function with a docstring. Run ``scriv create`` to add a changelog fragment and fill out the appropriate section for the change. Add that to the commits for the pull request.
99
98
  #. The pull request should work for the supported range of Python versions.
100
99
  The pull request will run GitHub actions to perform those checks.
101
100
  Check https://github.com/mareuter/pylunar/pulls
@@ -2,6 +2,35 @@
2
2
 
3
3
  History
4
4
  -------
5
+ .. scriv-insert-here
6
+
7
+ .. _changelog-0.8.0:
8
+
9
+ 0.8.0 (2024-11-09)
10
+ ++++++++++++++++++
11
+
12
+ Added
13
+ ^^^^^
14
+
15
+ - Solar altitude over lunar feature calculation
16
+ - AltitudeDict class to provide solar altitude for Lunar II features
17
+ - Use scriv for history generation
18
+
19
+ Changed
20
+ ^^^^^^^
21
+
22
+ - OS version for readthedocs build
23
+ - Updated CONTRIBUTING.rst to add scriv usage
24
+
25
+ Fixed
26
+ ^^^^^
27
+
28
+ - Internal class cross-references in docs
29
+
30
+ 0.7.4 (2024-10-27)
31
+ ++++++++++++++++++
32
+
33
+ * Updates to project dependencies
5
34
 
6
35
  0.7.3 (2024-09-29)
7
36
  ++++++++++++++++++
@@ -17,6 +17,7 @@ help:
17
17
  init:
18
18
  pip install --editable .[dev]
19
19
  pre-commit install
20
+ mkdir changelog.d
20
21
 
21
22
  clean: clean-build clean-docs clean-pyc
22
23
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylunar
3
- Version: 0.7.3
3
+ Version: 0.8.0
4
4
  Summary: Information for completing the Astronomical League's Lunar and Lunar II observing programs.
5
5
  Author-email: Michael Reuter <mareuternh@gmail.com>
6
6
  Project-URL: Documentation, http://pylunar.readthedocs.io
@@ -18,21 +18,23 @@ Classifier: Programming Language :: Python :: 3.12
18
18
  Description-Content-Type: text/x-rst
19
19
  License-File: LICENSE
20
20
  License-File: AUTHORS.rst
21
- Requires-Dist: ephem==4.1.5
21
+ Requires-Dist: ephem==4.1.6
22
22
  Requires-Dist: importlib-resources==6.4.5; python_version < "3.10"
23
23
  Requires-Dist: typing-extensions==4.12.2; python_version < "3.10"
24
24
  Requires-Dist: pytz==2024.2
25
25
  Provides-Extra: dev
26
26
  Requires-Dist: pylunar[build,docs,lint,test]; extra == "dev"
27
- Requires-Dist: tox==4.20.0; extra == "dev"
27
+ Requires-Dist: scriv==1.5.1; extra == "dev"
28
+ Requires-Dist: tox==4.23.2; extra == "dev"
28
29
  Provides-Extra: test
29
- Requires-Dist: coverage[toml]==7.6.1; extra == "test"
30
+ Requires-Dist: coverage[toml]==7.6.1; python_version < "3.9" and extra == "test"
31
+ Requires-Dist: coverage[toml]==7.6.4; python_version >= "3.9" and extra == "test"
30
32
  Requires-Dist: pytest==8.3.3; extra == "test"
31
33
  Provides-Extra: lint
32
34
  Requires-Dist: pre-commit==3.5.0; python_version < "3.9" and extra == "lint"
33
35
  Requires-Dist: pre-commit==3.8.0; python_version >= "3.9" and extra == "lint"
34
36
  Provides-Extra: build
35
- Requires-Dist: build==1.2.2; extra == "build"
37
+ Requires-Dist: build==1.2.2.post1; extra == "build"
36
38
  Requires-Dist: twine==5.1.1; extra == "build"
37
39
  Provides-Extra: docs
38
40
  Requires-Dist: sphinx~=7.1; extra == "docs"
@@ -22,22 +22,22 @@ API requires UTC, so add 4 hours since on Daylight Savings (changes day)
22
22
  >>> mi.phase_name()
23
23
  'WAXING_GIBBOUS'
24
24
 
25
- This package also contains the :py:class:`.LunarFeatureContainer` class which holds features on the moon for the Astronomical League's Lunar Club and Lunar II observing programs. To create a container for the Lunar Club program, do.
25
+ This package also contains the :py:class:`pylunar.LunarFeatureContainer` class which holds features on the moon for the Astronomical League's Lunar Club and Lunar II observing programs. To create a container for the Lunar Club program, do.
26
26
 
27
27
  >>> lc = pylunar.LunarFeatureContainer("Lunar")
28
28
  >>> lc.load()
29
29
  >>> len(lc)
30
30
  90
31
31
 
32
- There are 90 features available to this observing program. The container allows one to filter those features based on the position of the lunar terminator with respect to a given feature. The :py:meth:`.LunarFeatureContainer.load` method can be passed a :py:class:`.MoonInfo` instance to perform that filtering.
32
+ There are 90 features available to this observing program. The container allows one to filter those features based on the position of the lunar terminator with respect to a given feature. The :py:meth:`pylunar.LunarFeatureContainer.load` method can be passed a :py:class:`pylunar.MoonInfo` instance to perform that filtering.
33
33
 
34
34
  >>> lc.load(mi)
35
35
  >>> len(lc)
36
36
  12
37
37
 
38
- A container for Lunar II can be created by passing the `LunarII` string to the constructor of :py:class:`.LunarFeatureContainer`.
38
+ A container for Lunar II can be created by passing the `LunarII` string to the constructor of :py:class:`pylunar.LunarFeatureContainer`.
39
39
 
40
- Feature instances (:py:class:`.LunarFeature`) can be obtained from the container in usual manner.
40
+ Feature instances (:py:class:`pylunar.LunarFeature`) can be obtained from the container in usual manner.
41
41
 
42
42
  >>> for feature in lc:
43
43
  ... print(feature)
@@ -27,7 +27,7 @@ classifiers = [
27
27
  "Programming Language :: Python :: 3.12",
28
28
  ]
29
29
  dependencies = [
30
- "ephem==4.1.5",
30
+ "ephem==4.1.6",
31
31
  "importlib-resources==6.4.5;python_version<'3.10'",
32
32
  "typing-extensions==4.12.2;python_version<'3.10'",
33
33
  "pytz==2024.2"
@@ -40,10 +40,12 @@ Repository = "https://github.com/mareuter/pylunar"
40
40
  [project.optional-dependencies]
41
41
  dev = [
42
42
  "pylunar[build,docs,lint,test]",
43
- "tox==4.20.0"
43
+ "scriv==1.5.1",
44
+ "tox==4.23.2"
44
45
  ]
45
46
  test = [
46
- "coverage[toml]==7.6.1",
47
+ "coverage[toml]==7.6.1;python_version<'3.9'",
48
+ "coverage[toml]==7.6.4;python_version>='3.9'",
47
49
  "pytest==8.3.3",
48
50
  ]
49
51
  lint = [
@@ -51,7 +53,7 @@ lint = [
51
53
  "pre-commit==3.8.0;python_version>='3.9'"
52
54
  ]
53
55
  build = [
54
- "build==1.2.2",
56
+ "build==1.2.2.post1",
55
57
  "twine==5.1.1"
56
58
  ]
57
59
  docs = [
@@ -67,11 +69,11 @@ exclude = [
67
69
  "scripts/startup.py"
68
70
 
69
71
  ]
70
- ignore = [
72
+ lint.ignore = [
71
73
  "D104"
72
74
  ]
73
75
  line-length = 110
74
- select = [
76
+ lint.select = [
75
77
  "B",
76
78
  "D",
77
79
  "E",
@@ -82,7 +84,7 @@ select = [
82
84
  "W"
83
85
  ]
84
86
 
85
- [tool.ruff.per-file-ignores]
87
+ [tool.ruff.lint.per-file-ignores]
86
88
  "src/pylunar/__init__.py" = [
87
89
  "E402",
88
90
  "F401",
@@ -94,7 +96,7 @@ select = [
94
96
  "D103",
95
97
  ]
96
98
 
97
- [tool.ruff.isort]
99
+ [tool.ruff.lint.isort]
98
100
  force-sort-within-sections = true
99
101
 
100
102
  [tool.ruff.lint.pydocstyle]
@@ -121,3 +123,8 @@ exclude = [
121
123
  "conf",
122
124
  "startup"
123
125
  ]
126
+
127
+ [tool.scriv]
128
+ entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})"
129
+ output_file = "HISTORY.${config:format}"
130
+ rst_header_chars = "+^"
@@ -9,6 +9,7 @@
9
9
  # license that can be found in the LICENSE file.
10
10
 
11
11
  __all__ = [
12
+ "AltitudeDict",
12
13
  "__author__",
13
14
  "__email__",
14
15
  "__version__",
@@ -36,6 +37,7 @@ version_info = __version__.split(".")
36
37
  Use this for version comparison.
37
38
  """
38
39
 
40
+ from .altitude_dict import AltitudeDict
39
41
  from .helpers import mjd_to_date_tuple, tuple_to_string
40
42
  from .lunar_feature import LunarFeature
41
43
  from .lunar_feature_container import LunarFeatureContainer
@@ -0,0 +1,57 @@
1
+ # This file is part of pylunar.
2
+ #
3
+ # Developed by Michael Reuter.
4
+ #
5
+ # See the LICENSE file at the top-level directory of this distribution
6
+ # for details of code ownership.
7
+ #
8
+ # Use of this source code is governed by a 3-clause BSD-style
9
+ # license that can be found in the LICENSE file.
10
+
11
+ """Module for the AltitudeDict class."""
12
+
13
+ from __future__ import annotations
14
+
15
+ import sys
16
+ from typing import Dict
17
+
18
+ if sys.version_info >= (3, 10):
19
+ from importlib.resources import files
20
+ else:
21
+ from importlib_resources import files
22
+
23
+ import sqlite3
24
+
25
+ from .lunar_feature import LunarFeature
26
+ from .moon_info import MoonInfo
27
+
28
+ __all__ = ["AltitudeDict"]
29
+
30
+
31
+ class AltitudeDict(Dict[str, float]):
32
+ """Dictionary for the Lunar II features requiring solar altitude."""
33
+
34
+ def load(self, moon_info: MoonInfo) -> None:
35
+ """Provide solar altitude for the Lunar II features.
36
+
37
+ Parameters
38
+ ----------
39
+ moon_info : :class:`pylunar.MoonInfo`
40
+ Instance of the Lunar information class.
41
+ """
42
+ features = ["Byrgius A", "Proclus", "Rupes Recta", "Tycho"]
43
+ dbname = str(files("pylunar.data").joinpath("lunar.db"))
44
+ conn = sqlite3.connect(dbname)
45
+ cur = conn.cursor()
46
+
47
+ sql = f"select * from Features where Name in {str(tuple(features))}"
48
+ cur.execute(sql)
49
+
50
+ feature_list = []
51
+ for row in cur:
52
+ feature_list.append(LunarFeature.from_row(row))
53
+
54
+ for feature in sorted(feature_list, key=lambda x: x.name):
55
+ self[feature.name] = moon_info.solar_altitude(feature)
56
+
57
+ cur.close()
@@ -108,7 +108,7 @@ class LunarFeature:
108
108
 
109
109
  Returns
110
110
  -------
111
- :class:`.LunarFeature`
111
+ :class:`pylunar.LunarFeature`
112
112
  Class initialized from database row.
113
113
  """
114
114
  return cls(*row[1:])
@@ -52,7 +52,7 @@ class LunarFeatureContainer:
52
52
 
53
53
  Yields
54
54
  ------
55
- :class:`.LunarFeature`
55
+ :class:`pylunar.LunarFeature`
56
56
  The current lunar feature.
57
57
  """
58
58
  yield from self.features.values()
@@ -72,7 +72,7 @@ class LunarFeatureContainer:
72
72
 
73
73
  Parameters
74
74
  ----------
75
- moon_info : :class:`.MoonInfo`, optional
75
+ moon_info : :class:`pylunar.MoonInfo`, optional
76
76
  Instance of the Lunar information class.
77
77
  limit : int, optional
78
78
  Restrict the number of features read to the given value.
@@ -266,7 +266,7 @@ class MoonInfo:
266
266
 
267
267
  Parameters
268
268
  ----------
269
- feature : :class:`.LunarFeature`
269
+ feature : :class:`pylunar.LunarFeature`
270
270
  The lunar feature instance to check.
271
271
 
272
272
  Returns
@@ -291,7 +291,7 @@ class MoonInfo:
291
291
 
292
292
  Parameters
293
293
  ----------
294
- feature : :class:`.LunarFeature`
294
+ feature : :class:`pylunar.LunarFeature`
295
295
  The lunar feature instance to check.
296
296
 
297
297
  Returns
@@ -556,6 +556,29 @@ class MoonInfo:
556
556
 
557
557
  return sorted_times
558
558
 
559
+ def solar_altitude(self, feature: LunarFeature) -> float:
560
+ """Find the altitude of the sun over a given feature.
561
+
562
+ Sunrise is near zero degrees, noon is near 90 degrees and sunset is
563
+ near 180 degrees.
564
+
565
+ Parameters
566
+ ----------
567
+ feature : :class:`pylunar.LunarFeature`
568
+ Feature to calculate solar altitude.
569
+
570
+ Returns
571
+ -------
572
+ float
573
+ Solar altitude over feature in degrees.
574
+ """
575
+ rad_ss_lat = math.radians(self.subsolar_lat())
576
+ rad_feature_lat = math.radians(feature.latitude)
577
+ term1 = math.sin(rad_ss_lat) * math.sin(rad_feature_lat)
578
+ term2a = math.cos(rad_ss_lat) * math.cos(rad_feature_lat)
579
+ term2b = math.sin(math.radians(self.colong() + feature.longitude))
580
+ return math.degrees(math.asin(term1 + term2a * term2b))
581
+
559
582
  def subsolar_lat(self) -> float:
560
583
  """Latitude in degress on the moon where the sun is overhead.
561
584
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylunar
3
- Version: 0.7.3
3
+ Version: 0.8.0
4
4
  Summary: Information for completing the Astronomical League's Lunar and Lunar II observing programs.
5
5
  Author-email: Michael Reuter <mareuternh@gmail.com>
6
6
  Project-URL: Documentation, http://pylunar.readthedocs.io
@@ -18,21 +18,23 @@ Classifier: Programming Language :: Python :: 3.12
18
18
  Description-Content-Type: text/x-rst
19
19
  License-File: LICENSE
20
20
  License-File: AUTHORS.rst
21
- Requires-Dist: ephem==4.1.5
21
+ Requires-Dist: ephem==4.1.6
22
22
  Requires-Dist: importlib-resources==6.4.5; python_version < "3.10"
23
23
  Requires-Dist: typing-extensions==4.12.2; python_version < "3.10"
24
24
  Requires-Dist: pytz==2024.2
25
25
  Provides-Extra: dev
26
26
  Requires-Dist: pylunar[build,docs,lint,test]; extra == "dev"
27
- Requires-Dist: tox==4.20.0; extra == "dev"
27
+ Requires-Dist: scriv==1.5.1; extra == "dev"
28
+ Requires-Dist: tox==4.23.2; extra == "dev"
28
29
  Provides-Extra: test
29
- Requires-Dist: coverage[toml]==7.6.1; extra == "test"
30
+ Requires-Dist: coverage[toml]==7.6.1; python_version < "3.9" and extra == "test"
31
+ Requires-Dist: coverage[toml]==7.6.4; python_version >= "3.9" and extra == "test"
30
32
  Requires-Dist: pytest==8.3.3; extra == "test"
31
33
  Provides-Extra: lint
32
34
  Requires-Dist: pre-commit==3.5.0; python_version < "3.9" and extra == "lint"
33
35
  Requires-Dist: pre-commit==3.8.0; python_version >= "3.9" and extra == "lint"
34
36
  Provides-Extra: build
35
- Requires-Dist: build==1.2.2; extra == "build"
37
+ Requires-Dist: build==1.2.2.post1; extra == "build"
36
38
  Requires-Dist: twine==5.1.1; extra == "build"
37
39
  Provides-Extra: docs
38
40
  Requires-Dist: sphinx~=7.1; extra == "docs"
@@ -20,6 +20,7 @@ docs/make.bat
20
20
  docs/usage.rst
21
21
  scripts/startup.py
22
22
  src/pylunar/__init__.py
23
+ src/pylunar/altitude_dict.py
23
24
  src/pylunar/helpers.py
24
25
  src/pylunar/lunar_feature.py
25
26
  src/pylunar/lunar_feature_container.py
@@ -32,6 +33,7 @@ src/pylunar.egg-info/requires.txt
32
33
  src/pylunar.egg-info/top_level.txt
33
34
  src/pylunar/data/lunar.db
34
35
  tests/__init__.py
36
+ tests/test_altitude_dict.py
35
37
  tests/test_helpers.py
36
38
  tests/test_lunar_feature.py
37
39
  tests/test_lunar_feature_container.py
@@ -1,4 +1,4 @@
1
- ephem==4.1.5
1
+ ephem==4.1.6
2
2
  pytz==2024.2
3
3
 
4
4
  [:python_version < "3.10"]
@@ -6,12 +6,13 @@ importlib-resources==6.4.5
6
6
  typing-extensions==4.12.2
7
7
 
8
8
  [build]
9
- build==1.2.2
9
+ build==1.2.2.post1
10
10
  twine==5.1.1
11
11
 
12
12
  [dev]
13
13
  pylunar[build,docs,lint,test]
14
- tox==4.20.0
14
+ scriv==1.5.1
15
+ tox==4.23.2
15
16
 
16
17
  [docs]
17
18
  sphinx~=7.1
@@ -26,5 +27,10 @@ pre-commit==3.5.0
26
27
  pre-commit==3.8.0
27
28
 
28
29
  [test]
29
- coverage[toml]==7.6.1
30
30
  pytest==8.3.3
31
+
32
+ [test:python_version < "3.9"]
33
+ coverage[toml]==7.6.1
34
+
35
+ [test:python_version >= "3.9"]
36
+ coverage[toml]==7.6.4
@@ -0,0 +1,31 @@
1
+ # This file is part of pylunar.
2
+ #
3
+ # Developed by Michael Reuter.
4
+ #
5
+ # See the LICENSE file at the top-level directory of this distribution
6
+ # for details of code ownership.
7
+ #
8
+ # Use of this source code is governed by a 3-clause BSD-style
9
+ # license that can be found in the LICENSE file.
10
+
11
+ """Tests for AltitudeDict class."""
12
+
13
+ from pylunar import AltitudeDict, MoonInfo
14
+
15
+
16
+ class TestAltitudeDict:
17
+ def setup_class(self) -> None:
18
+ self.ad = AltitudeDict()
19
+
20
+ def test_basic_information_after_creation(self) -> None:
21
+ assert len(self.ad) == 0
22
+
23
+ def test_information_after_load(self) -> None:
24
+ location = ((35, 58, 10), (-84, 19, 0))
25
+ mi = MoonInfo(location[0], location[1])
26
+ mi.update((2013, 10, 12, 18, 0, 0))
27
+
28
+ self.ad.load(mi)
29
+ assert len(self.ad) == 4
30
+ assert list(self.ad.keys()) == ["Byrgius A", "Proclus", "Rupes Recta", "Tycho"]
31
+ assert self.ad["Rupes Recta"] == 1.3038753306292297
@@ -251,3 +251,20 @@ class TestMoonInfo:
251
251
  assert self.mi.is_libration_ok(feature1) is False
252
252
  assert self.mi.is_libration_ok(feature2) is False
253
253
  assert self.mi.is_libration_ok(feature3) is True
254
+
255
+ def test_solar_altitude(self) -> None:
256
+ self.mi.update((1992, 4, 12, 0, 0, 0))
257
+ feature = LunarFeature(
258
+ "Copernicus",
259
+ 96.0699,
260
+ 9.62094521642403,
261
+ -20.078620508253,
262
+ 3.1684722900391,
263
+ 3.21326828003004,
264
+ "Crater",
265
+ "Copernicus",
266
+ "LAC-58",
267
+ "Lunar",
268
+ "Binocular",
269
+ )
270
+ assert self.mi.solar_altitude(feature) == 1.9649120982751562
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
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
File without changes
File without changes