{"id":15009283,"url":"https://github.com/architest/pymeeus","last_synced_at":"2025-04-05T08:09:45.843Z","repository":{"id":47272120,"uuid":"139071003","full_name":"architest/pymeeus","owner":"architest","description":"Library of astronomical algorithms in Python","archived":false,"fork":false,"pushed_at":"2024-04-07T02:29:41.000Z","size":1559,"stargazers_count":59,"open_issues_count":5,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-30T01:56:54.603Z","etag":null,"topics":["astronomy","earth","meeus","planets","python2","python27","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/architest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.LESSER","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-28T21:42:22.000Z","updated_at":"2024-10-23T07:07:24.000Z","dependencies_parsed_at":"2023-10-11T12:51:37.625Z","dependency_job_id":"2e05da42-556c-4092-ac60-ec34f747d445","html_url":"https://github.com/architest/pymeeus","commit_stats":{"total_commits":603,"total_committers":6,"mean_commits":100.5,"dds":"0.013266998341625258","last_synced_commit":"7196dff018bf457cdbfb0834db66ec9f39065209"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architest%2Fpymeeus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architest%2Fpymeeus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architest%2Fpymeeus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architest%2Fpymeeus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/architest","download_url":"https://codeload.github.com/architest/pymeeus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astronomy","earth","meeus","planets","python2","python27","python3"],"created_at":"2024-09-24T19:24:14.328Z","updated_at":"2025-04-05T08:09:45.804Z","avatar_url":"https://github.com/architest.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyMeeus\n\u003e **Library of astronomical algorithms in Python**.\n\nPyMeeus is a Python implementation of the astronomical algorithms described in\nthe classical book 'Astronomical Algorithms, 2nd Edition, Willmann-Bell Inc.\n(1998)' by Jean Meeus.\n\nThere are great astronomical libraries out there. For instance, if you're\nlooking for high precision and speed you should take a look at\n[libnova](http://libnova.sourceforge.net/). For a set of python modules aimed\nat professional astronomers, you should look at [Astropy](http://www.astropy.org/).\nOn the other hand, the advantages of PyMeeus are its simplicity, ease of use,\nease of reading, ease of installation (it has the minimum amount of\ndependencies) and abundant documentation.\n\n## Installation\n\nThe easiest way of installing PyMeeus is using pip:\n\n```sh\npip install pymeeus\n```\n\nOr, for a per-user installation:\n\n```sh\npip install --user pymeeus\n```\n\nIf you prefer Python3, you can use:\n\n```sh\npip3 install --user pymeeus\n```\n\nIf you have PyMeeus already installed, but want to upgrade to the latest version:\n\n```sh\npip3 install -U pymeeus\n```\n\n## Properly Using PyMeeus\n\nIt is very common to try to run PyMeeus like this:\n\n\n```sh\nimport pymeeus\n\nmydate = pymeeus.Epoch(1992, 10, 13.0)\n```\n\nBut if you do that, you'll get an error like this:\n\n```sh\nTraceback (most recent call last):\n  File \"/home/user/test/test.py\", line 3, in \u003cmodule\u003e\n    epoch = pymeeus.Epoch(1992, 10, 13.0)\nAttributeError: module 'pymeeus' has no attribute 'Epoch'\n```\n\nThis issue points to a misunderstanding that is very common in the Python world. The keyword ``import`` is used to import **MODULES**... but PyMeeus is **_NOT_** a module: It is a **LIBRARY** composed of **MULTIPLE** modules (``Angle``, ``Epoch``, ``Coordinates``, etc). As of today, the library Pymeeus has 19 different modules (if you look into the directory where ``pip`` stores the library, you'll find one \".py\" file per module).\n\nTherefore if you want to use, for example, the module ``Angle`` you should use:\n\n```sh\nimport pymeeus.Angle\n```\n\nI.e., your _module_ is ``pymeeus.Angle``, and not just ``Angle``.\n\nBut there is more! When you use ``import`` to fetch a module, you must then use the _dot_ notation to access the components of the module (classes, functions, etc). For instance:\n\n```sh\nimport pymeeus.Angle\n\ni = pymeeus.Angle.Angle(11.94524)\n```\n\nIn this case, you are telling the Python interpreter that you want to use the class ``Angle`` (with parameter '11.94524') from the module ``Angle`` belonging to the library ``pymeeus``.\n\nThere is, however, a more practical (and common) way to handle modules using the statement ``from \u003cMODULE\u003e import \u003cCOMPONENT\u003e``. For instance:\n\n```sh\nfrom pymeeus.Angle import Angle\nfrom pymeeus.Epoch import Epoch, JDE2000\nfrom math import sin, cos, tan, acos, atan2, sqrt, radians, log10\n```\n\nThis way is preferred because, among other reasons, only the required components are loaded into memory instead of the whole module. Also, now the component is directly added to your execution environment, which means that you no longer need to use the _dot_ notation.\n\nTherefore, the script at the beginning would become:\n\n```sh\nfrom pymeeus.Epoch import Epoch\n\nmydate = Epoch(1992, 10, 13.0)\n```\n\n## Meta\n\nAuthor: Dagoberto Salazar\n\nDistributed under the GNU Lesser General Public License v3 (LGPLv3). See\n``LICENSE.txt`` and ``COPYING.LESSER`` for more information.\n\nDocumentation: [https://pymeeus.readthedocs.io/en/latest/](https://pymeeus.readthedocs.io/en/latest/)\n\nGitHub: [https://github.com/architest/pymeeus](https://github.com/architest/pymeeus)\n\nIf you have Sphinx installed, you can generate your own, latest documentation going to directory 'docs' and issuing:\n\n```sh\nmake html\n```\n\nThen the HTML documentation pages can be found in 'build/html'.\n\n## Contributing\n\nThe preferred method to contribute is through forking and pull requests:\n\n1. Fork it (\u003chttps://github.com/architest/pymeeus/fork\u003e)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\nPlease bear in mind that PyMeeus follows the PEP8 style guide for Python code\n[(PEP8)](https://www.python.org/dev/peps/pep-0008/?). We suggest you install\nand use a linter like [Flake8](http://flake8.pycqa.org/en/latest/) before\ncontributing.\n\nAdditionally, PyMeeus makes heavy use of automatic tests. As a general rule,\nevery function or method added must have a corresponding test in the proper\nplace in `tests` directory.\n\nFinally, documentation is also a big thing here. Add proper and abundant\ndocumentation to your new code. This also includes in-line comments!!!.\n\n## Contributors\n\n* [Neil Freeman](https://github.com/fitnr) - Fixed undefined variable in Epoch.tt2ut\n* [molsen234](https://github.com/molsen234) - Fixed bug when using fractional seconds, minutes, hours or days\n* [Sebastian Veigl](https://github.com/sebastian1306) - Added functionality for Jupiter's moons\n* Sophie Scholz - Added functionality for Jupiter's moons\n* Vittorio Serra - Added functionality for Jupiter's moons\n* Michael Lutz - Added functionality for Jupiter's moons\n* [Ben Dilday](https://github.com/bdilday) - Added `__hash__()` method to class Epoch\n* [Zivoslav](https://github.com/zivoslav) - Bug report of winter solstice\n* [Devid](https://github.com/sevdog), [Hugo van Kemenade](https://github.com/hugovk) - Test suggestions\n\n## What's new\n\n* 0.5.12\n    * Fixed a bug in the computation of the winter solstice. Added new tests and information about proper use of the library.\n* 0.5.11\n    * Added parameter `local` to the `Epoch` class constructor and the methods `get_date()` and `get_full_date()`.\n* 0.5.10\n    * Added methods ``moon_librations()`` and ``moon_position_angle_axis()``.\n* 0.5.9\n    * Added method ``moon_maximum_declination()``.\n* 0.5.8\n    * Fixed several bugs in ``Epoch`` class, and added method ``doy()``.\n* 0.5.7\n    * Added method ``moon_passage_nodes()``.\n* 0.5.6\n    * Added method ``moon_perigee_apogee()``.\n* 0.5.5\n    * Added method ``moon_phase()``.\n* 0.5.4\n    * Added methods ``illuminated_fraction_disk()`` and ``position_bright_limb()`` to ``Moon`` class.\n* 0.5.3\n    * Fixed error in the return type of method `Sun.equation_of_time()`.\n* 0.5.2\n    * Added methods to compute the Moon's longitude of ascending node and perigee.\n* 0.5.1\n    * Changes in the organization of the documentation.\n* 0.5.0\n    * Added `Moon` class and `position()` methods.\n* 0.4.3\n    * Added method `ring_parameters()` to Saturn class.\n* 0.4.2\n    * Added method `__hash__()` to Epoch. Now Epoch objects can be used as keys in a dictionary.\n* 0.4.1\n    * Added funtionality to compute the positions of Jupiter's Galilean moons.\n* 0.4.0\n    * Added methods to compute Saturn's ring inclination and longitude of ascending node.\n* 0.3.13\n    * Additional encoding changes.\n* 0.3.12\n    * Deleted `encoding` keyword from setup.py, which was giving problems.\n* 0.3.11\n    * Added encoding specification to setup.py.\n* 0.3.10\n    * Fixed characters with the wrong encoding.\n* 0.3.9\n    * Relaxed requirements, added contributor molsen234, and fixed format problems showed by flake8.\n* 0.3.8\n    * Fixed undefined variable in `Epoch.tt2ut`.\n* 0.3.7\n    * Fix bug when using fractional seconds, minutes, hours or days, plus documentation improvements.\n* 0.3.6\n    * Add method to compute rising and setting times of the Sun.\n* 0.3.5\n    * Add method `magnitude()` to planet classes.\n* 0.3.4\n    * Add method to compute the parallax correction to Earth class.\n* 0.3.3\n    * Add methods to compute the passage through the nodes.\n* 0.3.2\n    * Add methods to compute the perihelion and aphelion of all planets.\n* 0.3.1\n    * Fix errors in the elongation computation, add tests and examples of use of methods `geocentric_position()`, and tests and examples for `Pluto` class.\n* 0.3.0\n    * Added `Pluto` class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitest%2Fpymeeus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchitest%2Fpymeeus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitest%2Fpymeeus/lists"}