| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: PyMeeus |
| 3 |
Version: 0.5.12 |
| 4 |
Summary: Python implementation of Jean Meeus astronomical routines |
| 5 |
Home-page: https://github.com/architest/pymeeus |
| 6 |
Author: Dagoberto Salazar |
| 7 |
Author-email: [email protected] |
| 8 |
License: LGPLv3 |
| 9 |
Download-URL: https://github.com/architest/pymeeus |
| 10 |
Keywords: Meeus astronomy module library |
| 11 |
Platform: UNKNOWN |
| 12 |
Classifier: Development Status :: 4 - Beta |
| 13 |
Classifier: Environment :: Console |
| 14 |
Classifier: Intended Audience :: Developers |
| 15 |
Classifier: Intended Audience :: Education |
| 16 |
Classifier: Intended Audience :: Science/Research |
| 17 |
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) |
| 18 |
Classifier: Operating System :: OS Independent |
| 19 |
Classifier: Programming Language :: Python :: 2.7 |
| 20 |
Classifier: Programming Language :: Python :: 3.6 |
| 21 |
Classifier: Topic :: Scientific/Engineering :: Astronomy |
| 22 |
License-File: LICENSE.txt |
| 23 |
License-File: COPYING.LESSER |
| 24 |
|
| 25 |
PyMeeus |
| 26 |
======= |
| 27 |
|
| 28 |
**Library of astronomical algorithms in Python**. |
| 29 |
|
| 30 |
PyMeeus is a Python implementation of the astronomical algorithms |
| 31 |
described in the classical book 'Astronomical Algorithms, 2nd Edition, |
| 32 |
Willmann-Bell Inc. (1998)' by Jean Meeus. |
| 33 |
|
| 34 |
There are great astronomical libraries out there. For instance, if |
| 35 |
you're looking for high precision and speed you should take a look at |
| 36 |
`libnova <http://libnova.sourceforge.net/>`__. For a set of python |
| 37 |
modules aimed at professional astronomers, you should look at |
| 38 |
`Astropy <http://www.astropy.org/>`__. On the other hand, the advantages |
| 39 |
of PyMeeus are its simplicity, ease of use, ease of reading, ease of |
| 40 |
installation (it has the minimum amount of dependencies) and abundant |
| 41 |
documentation. |
| 42 |
|
| 43 |
Installation |
| 44 |
------------ |
| 45 |
|
| 46 |
The easiest way of installing PyMeeus is using pip: |
| 47 |
|
| 48 |
.. code:: sh |
| 49 |
|
| 50 |
pip install pymeeus |
| 51 |
|
| 52 |
Or, for a per-user installation: |
| 53 |
|
| 54 |
.. code:: sh |
| 55 |
|
| 56 |
pip install --user pymeeus |
| 57 |
|
| 58 |
If you prefer Python3, you can use: |
| 59 |
|
| 60 |
.. code:: sh |
| 61 |
|
| 62 |
pip3 install --user pymeeus |
| 63 |
|
| 64 |
If you have PyMeeus already installed, but want to upgrade to the latest |
| 65 |
version: |
| 66 |
|
| 67 |
.. code:: sh |
| 68 |
|
| 69 |
pip3 install -U pymeeus |
| 70 |
|
| 71 |
Properly Using PyMeeus |
| 72 |
---------------------- |
| 73 |
|
| 74 |
It is very common to try to run PyMeeus like this: |
| 75 |
|
| 76 |
.. code:: sh |
| 77 |
|
| 78 |
import pymeeus |
| 79 |
|
| 80 |
mydate = pymeeus.Epoch(1992, 10, 13.0) |
| 81 |
|
| 82 |
But if you do that, you'll get an error like this: |
| 83 |
|
| 84 |
.. code:: sh |
| 85 |
|
| 86 |
Traceback (most recent call last): |
| 87 |
File "/home/user/test/test.py", line 3, in <module> |
| 88 |
epoch = pymeeus.Epoch(1992, 10, 13.0) |
| 89 |
AttributeError: module 'pymeeus' has no attribute 'Epoch' |
| 90 |
|
| 91 |
This issue points to a misunderstanding that is very common in the |
| 92 |
Python world. The keyword ``import`` is used to import **MODULES**\ ... |
| 93 |
but PyMeeus is **NOT** a module: It is a **LIBRARY** composed of |
| 94 |
**MULTIPLE** modules (``Angle``, ``Epoch``, ``Coordinates``, etc). As of |
| 95 |
today, the library Pymeeus has 19 different modules (if you look into |
| 96 |
the directory where ``pip`` stores the library, you'll find one ".py" |
| 97 |
file per module). |
| 98 |
|
| 99 |
Therefore if you want to use, for example, the module ``Angle`` you |
| 100 |
should use: |
| 101 |
|
| 102 |
.. code:: sh |
| 103 |
|
| 104 |
import pymeeus.Angle |
| 105 |
|
| 106 |
I.e., your *module* is ``pymeeus.Angle``, and not just ``Angle``. |
| 107 |
|
| 108 |
But there is more! When you use ``import`` to fetch a module, you must |
| 109 |
then use the *dot* notation to access the components of the module |
| 110 |
(classes, functions, etc). For instance: |
| 111 |
|
| 112 |
.. code:: sh |
| 113 |
|
| 114 |
import pymeeus.Angle |
| 115 |
|
| 116 |
i = pymeeus.Angle.Angle(11.94524) |
| 117 |
|
| 118 |
In this case, you are telling the Python interpreter that you want to |
| 119 |
use the class ``Angle`` (with parameter '11.94524') from the module |
| 120 |
``Angle`` belonging to the library ``pymeeus``. |
| 121 |
|
| 122 |
There is, however, a more practical (and common) way to handle modules |
| 123 |
using the statement ``from <MODULE> import <COMPONENT>``. For instance: |
| 124 |
|
| 125 |
.. code:: sh |
| 126 |
|
| 127 |
from pymeeus.Angle import Angle |
| 128 |
from pymeeus.Epoch import Epoch, JDE2000 |
| 129 |
from math import sin, cos, tan, acos, atan2, sqrt, radians, log10 |
| 130 |
|
| 131 |
This way is preferred because, among other reasons, only the required |
| 132 |
components are loaded into memory instead of the whole module. Also, now |
| 133 |
the component is directly added to your execution environment, which |
| 134 |
means that you no longer need to use the *dot* notation. |
| 135 |
|
| 136 |
Therefore, the script at the beginning would become: |
| 137 |
|
| 138 |
.. code:: sh |
| 139 |
|
| 140 |
from pymeeus.Epoch import Epoch |
| 141 |
|
| 142 |
mydate = Epoch(1992, 10, 13.0) |
| 143 |
|
| 144 |
Meta |
| 145 |
---- |
| 146 |
|
| 147 |
Author: Dagoberto Salazar |
| 148 |
|
| 149 |
Distributed under the GNU Lesser General Public License v3 (LGPLv3). See |
| 150 |
``LICENSE.txt`` and ``COPYING.LESSER`` for more information. |
| 151 |
|
| 152 |
Documentation: https://pymeeus.readthedocs.io/en/latest/ |
| 153 |
|
| 154 |
GitHub: https://github.com/architest/pymeeus |
| 155 |
|
| 156 |
If you have Sphinx installed, you can generate your own, latest |
| 157 |
documentation going to directory 'docs' and issuing: |
| 158 |
|
| 159 |
.. code:: sh |
| 160 |
|
| 161 |
make html |
| 162 |
|
| 163 |
Then the HTML documentation pages can be found in 'build/html'. |
| 164 |
|
| 165 |
Contributing |
| 166 |
------------ |
| 167 |
|
| 168 |
The preferred method to contribute is through forking and pull requests: |
| 169 |
|
| 170 |
1. Fork it (https://github.com/architest/pymeeus/fork) |
| 171 |
2. Create your feature branch (``git checkout -b feature/fooBar``) |
| 172 |
3. Commit your changes (``git commit -am 'Add some fooBar'``) |
| 173 |
4. Push to the branch (``git push origin feature/fooBar``) |
| 174 |
5. Create a new Pull Request |
| 175 |
|
| 176 |
Please bear in mind that PyMeeus follows the PEP8 style guide for Python |
| 177 |
code `(PEP8) <https://www.python.org/dev/peps/pep-0008/?>`__. We suggest |
| 178 |
you install and use a linter like |
| 179 |
`Flake8 <http://flake8.pycqa.org/en/latest/>`__ before contributing. |
| 180 |
|
| 181 |
Additionally, PyMeeus makes heavy use of automatic tests. As a general |
| 182 |
rule, every function or method added must have a corresponding test in |
| 183 |
the proper place in ``tests`` directory. |
| 184 |
|
| 185 |
Finally, documentation is also a big thing here. Add proper and abundant |
| 186 |
documentation to your new code. This also includes in-line comments!!!. |
| 187 |
|
| 188 |
Contributors |
| 189 |
------------ |
| 190 |
|
| 191 |
- `Neil Freeman <https://github.com/fitnr>`__ - Fixed undefined |
| 192 |
variable in Epoch.tt2ut |
| 193 |
- `molsen234 <https://github.com/molsen234>`__ - Fixed bug when using |
| 194 |
fractional seconds, minutes, hours or days |
| 195 |
- `Sebastian Veigl <https://github.com/sebastian1306>`__ - Added |
| 196 |
functionality for Jupiter's moons |
| 197 |
- Sophie Scholz - Added functionality for Jupiter's moons |
| 198 |
- Vittorio Serra - Added functionality for Jupiter's moons |
| 199 |
- Michael Lutz - Added functionality for Jupiter's moons |
| 200 |
- `Ben Dilday <https://github.com/bdilday>`__ - Added ``__hash__()`` |
| 201 |
method to class Epoch |
| 202 |
- `Zivoslav <https://github.com/zivoslav>`__ - Bug report of winter |
| 203 |
solstice |
| 204 |
- `Devid <https://github.com/sevdog>`__, `Hugo van |
| 205 |
Kemenade <https://github.com/hugovk>`__ - Test suggestions |
| 206 |
|
| 207 |
What's new |
| 208 |
---------- |
| 209 |
|
| 210 |
- 0.5.12 |
| 211 |
|
| 212 |
- Fixed a bug in the computation of the winter solstice. Added new |
| 213 |
tests and information about proper use of the library. |
| 214 |
|
| 215 |
- 0.5.11 |
| 216 |
|
| 217 |
- Added parameter ``local`` to the ``Epoch`` class constructor and |
| 218 |
the methods ``get_date()`` and ``get_full_date()``. |
| 219 |
|
| 220 |
- 0.5.10 |
| 221 |
|
| 222 |
- Added methods ``moon_librations()`` and |
| 223 |
``moon_position_angle_axis()``. |
| 224 |
|
| 225 |
- 0.5.9 |
| 226 |
|
| 227 |
- Added method ``moon_maximum_declination()``. |
| 228 |
|
| 229 |
- 0.5.8 |
| 230 |
|
| 231 |
- Fixed several bugs in ``Epoch`` class, and added method ``doy()``. |
| 232 |
|
| 233 |
- 0.5.7 |
| 234 |
|
| 235 |
- Added method ``moon_passage_nodes()``. |
| 236 |
|
| 237 |
- 0.5.6 |
| 238 |
|
| 239 |
- Added method ``moon_perigee_apogee()``. |
| 240 |
|
| 241 |
- 0.5.5 |
| 242 |
|
| 243 |
- Added method ``moon_phase()``. |
| 244 |
|
| 245 |
- 0.5.4 |
| 246 |
|
| 247 |
- Added methods ``illuminated_fraction_disk()`` and |
| 248 |
``position_bright_limb()`` to ``Moon`` class. |
| 249 |
|
| 250 |
- 0.5.3 |
| 251 |
|
| 252 |
- Fixed error in the return type of method |
| 253 |
``Sun.equation_of_time()``. |
| 254 |
|
| 255 |
- 0.5.2 |
| 256 |
|
| 257 |
- Added methods to compute the Moon's longitude of ascending node |
| 258 |
and perigee. |
| 259 |
|
| 260 |
- 0.5.1 |
| 261 |
|
| 262 |
- Changes in the organization of the documentation. |
| 263 |
|
| 264 |
- 0.5.0 |
| 265 |
|
| 266 |
- Added ``Moon`` class and ``position()`` methods. |
| 267 |
|
| 268 |
- 0.4.3 |
| 269 |
|
| 270 |
- Added method ``ring_parameters()`` to Saturn class. |
| 271 |
|
| 272 |
- 0.4.2 |
| 273 |
|
| 274 |
- Added method ``__hash__()`` to Epoch. Now Epoch objects can be |
| 275 |
used as keys in a dictionary. |
| 276 |
|
| 277 |
- 0.4.1 |
| 278 |
|
| 279 |
- Added funtionality to compute the positions of Jupiter's Galilean |
| 280 |
moons. |
| 281 |
|
| 282 |
- 0.4.0 |
| 283 |
|
| 284 |
- Added methods to compute Saturn's ring inclination and longitude |
| 285 |
of ascending node. |
| 286 |
|
| 287 |
- 0.3.13 |
| 288 |
|
| 289 |
- Additional encoding changes. |
| 290 |
|
| 291 |
- 0.3.12 |
| 292 |
|
| 293 |
- Deleted ``encoding`` keyword from setup.py, which was giving |
| 294 |
problems. |
| 295 |
|
| 296 |
- 0.3.11 |
| 297 |
|
| 298 |
- Added encoding specification to setup.py. |
| 299 |
|
| 300 |
- 0.3.10 |
| 301 |
|
| 302 |
- Fixed characters with the wrong encoding. |
| 303 |
|
| 304 |
- 0.3.9 |
| 305 |
|
| 306 |
- Relaxed requirements, added contributor molsen234, and fixed |
| 307 |
format problems showed by flake8. |
| 308 |
|
| 309 |
- 0.3.8 |
| 310 |
|
| 311 |
- Fixed undefined variable in ``Epoch.tt2ut``. |
| 312 |
|
| 313 |
- 0.3.7 |
| 314 |
|
| 315 |
- Fix bug when using fractional seconds, minutes, hours or days, |
| 316 |
plus documentation improvements. |
| 317 |
|
| 318 |
- 0.3.6 |
| 319 |
|
| 320 |
- Add method to compute rising and setting times of the Sun. |
| 321 |
|
| 322 |
- 0.3.5 |
| 323 |
|
| 324 |
- Add method ``magnitude()`` to planet classes. |
| 325 |
|
| 326 |
- 0.3.4 |
| 327 |
|
| 328 |
- Add method to compute the parallax correction to Earth class. |
| 329 |
|
| 330 |
- 0.3.3 |
| 331 |
|
| 332 |
- Add methods to compute the passage through the nodes. |
| 333 |
|
| 334 |
- 0.3.2 |
| 335 |
|
| 336 |
- Add methods to compute the perihelion and aphelion of all planets. |
| 337 |
|
| 338 |
- 0.3.1 |
| 339 |
|
| 340 |
- Fix errors in the elongation computation, add tests and examples |
| 341 |
of use of methods ``geocentric_position()``, and tests and |
| 342 |
examples for ``Pluto`` class. |
| 343 |
|
| 344 |
- 0.3.0 |
| 345 |
|
| 346 |
- Added ``Pluto`` class. |
| 347 |
|
| 348 |
|