Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
.. _ephem: http://pypi.python.org/pypi/ephem/ .. _pyephem: http://pypi.python.org/pypi/pyephem/ .. _XEphem: http://www.clearskyinstitute.com/xephem/ .. _Quick Reference: http://rhodesmill.org/pyephem/quick .. _Tutorial: http://rhodesmill.org/pyephem/tutorial .. _PyEphem web site: http://rhodesmill.org/pyephem/
PyEphem provides an ephem
Python package
for performing high-precision astronomy computations.
The underlying numeric routines are coded in C
and are the same ones that drive the popular XEphem
_ astronomy application,
whose author, Elwood Charles Downey,
generously gave permission for their use in PyEphem.
The name ephem is short for the word ephemeris,
which is the traditional term for a table
giving the position of a planet, asteroid, or comet for a series of dates.
The PyEphem web site
_ offers documentation
and also links to the project bug tracker, user support forum,
and source code repository.
If you have a C compiler and the
pip Python installer tool <https://pip.pypa.io/en/latest/installing.html>
_
on your system,
then installing PyEphem should be as easy as::
pip install ephem
There are also Windows installers in the downloads section below.
The design of PyEphem emphasizes convenience and ease of use. Both celestial bodies and the observer's location on Earth are represented by Python objects, while dates and angles automatically print themselves in standard astronomical formats::
import ephem mars = ephem.Mars() mars.compute('2008/1/1') print(mars.ra) 5:59:27.35 print(mars.dec) 26:56:27.4
The documentation includes both a Quick Reference
_ and a Tutorial
,
which are included in text files within the module itself
as well as being available on the PyEphem web site
.
The features provided by PyEphem include:
Find where a planet, comet, or asteroid is in the sky.
Determine where in the sky an object appears for a particular observer.
Compute when a body will rise, transit overhead, and set from a particular location.
Parse and use orbital data in either the traditional XEphem file format, or the standard TLE format used for tracking Earth-orbiting satellites.
Determine the dates of the equinoxes and solstices.
Compute the dates of the various phases of the Moon.
Convert from the Greenwich Time (more precisely, Ephemeris Time) which PyEphem uses to the local time of the user.
Convert positions between the equatorial, ecliptic, and galactic coordinate systems.
Determine on which page of the Uranometria or the Millennium Star Atlas a particular star should appear.
Return the Julian Date corresponding to any calendar date.
If you are interested in learning about how PyEphem works or in exploring its source code, check out this repository from GitHub. It is hosted at:
https://github.com/brandon-rhodes/pyephem
If you lack expertise with version control, you can instead simply download a static copy of the most recent source code using this link:
https://github.com/brandon-rhodes/pyephem/archive/master.zip
To run its source code in place, create a virtual environment <http://docs.python-guide.org/en/latest/dev/virtualenvs/>
_, activate
it, change directory to the root of the PyEphem source code, and run::
python setup.py build_ext -i
You can then run the PyEphem test suite to see whether all of its features are working correctly on your operating system and platform::
python -m unittest discover ephem
PyEphem’s documentation is organized as a standard Sphinx <http://www.sphinx-doc.org/en/master/>
_ document project. You can
build the documentation either with the Sphinx command line::
sphinx-build -b html pyephem/ephem/doc/ ./my_documentation_directory/
— or, more typically, by invoking one of the targets in the documentation’s Makefile::
make -C ephem/doc html
FAQs
Compute positions of the planets and stars
We found that ephem demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.