A library that computes the ephemerides.
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

86 linhas
1.9 KiB

  1. #!/usr/bin/env python3
  2. # Kosmorrolib - The Library To Compute Your Ephemerides
  3. # Copyright (C) 2021 Jérôme Deuchnord <jerome@deuchnord.fr>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU Affero General Public License as
  7. # published by the Free Software Foundation, either version 3 of the
  8. # License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU Affero General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. from enum import Enum
  18. class MoonPhaseType(Enum):
  19. """An enumeration of moon phases."""
  20. NEW_MOON = 1
  21. WAXING_CRESCENT = 2
  22. FIRST_QUARTER = 3
  23. WAXING_GIBBOUS = 4
  24. FULL_MOON = 5
  25. WANING_GIBBOUS = 6
  26. LAST_QUARTER = 7
  27. WANING_CRESCENT = 8
  28. class SeasonType(Enum):
  29. MARCH_EQUINOX = 0
  30. JUNE_SOLSTICE = 1
  31. SEPTEMBER_EQUINOX = 2
  32. DECEMBER_SOLSTICE = 3
  33. class EventType(Enum):
  34. """An enumeration for the supported event types."""
  35. OPPOSITION = 1
  36. CONJUNCTION = 2
  37. OCCULTATION = 3
  38. MAXIMAL_ELONGATION = 4
  39. MOON_PERIGEE = 5
  40. MOON_APOGEE = 6
  41. SEASON_CHANGE = 7
  42. LUNAR_ECLIPSE = 8
  43. class LunarEclipseType(Enum):
  44. """An enumeration of lunar eclipse types"""
  45. PENUMBRAL = 0
  46. PARTIAL = 1
  47. TOTAL = 2
  48. class ObjectType(Enum):
  49. """An enumeration of object types"""
  50. STAR = 0
  51. PLANET = 1
  52. DWARF_PLANET = 11
  53. SATELLITE = 2
  54. class ObjectIdentifier(Enum):
  55. """An enumeration of identifiers for objects"""
  56. SUN = 0
  57. EARTH = 1
  58. MOON = 11
  59. MERCURY = 2
  60. VENUS = 3
  61. MARS = 4
  62. JUPITER = 5
  63. SATURN = 6
  64. URANUS = 7
  65. NEPTUNE = 8
  66. PLUTO = 9