Skip to main content

Creates the daily pages of a Nautical Almanac using Skyfield and Ephem

Project description

This is the PyPI edition of SFalmanac-Py3. Version numbering started from 1.0 as the previous well-tested versions that are on github since 2015 were never published in PyPI.

     smileyUT1 is the timescale now employed in the almanacsmiley

SFalmanac is a Python 3 script that creates the daily pages of the Nautical Almanac. The generated tables are needed for celestial navigation with a sextant. Although you are strongly advised to purchase the official Nautical Almanac, this program will reproduce the tables with no warranty or guarantee of accuracy.

Two astronomical libraries are employed: Skyfield and Ephem. Ephem is only used for calculating planet magnitudes (as these are not available yet in Skyfield).

SFalmanac uses the Hipparcos catalog as its star database. If a current version Skyfield (>= 1.31) is used, you have two options (which one, you specify manually by editing config.py):

  • if “useIERS = False”, the built-in UT1 tables in the installed version of Skyfield will be employed.

  • if “useIERS = True”, for optimal accuracy (especially for all GHA data), Earth orientation data from IERS (International Earth Rotation and Reference Systems Service) is downloaded and then used until it ‘expires’. It expires after a chosen number of days (also specifiable in config.py). Note that IERS specifies the range of Earth Orientation Parameter (EOP) data currently as “from 2nd January 1973 to 15th May 2022”. Refer to the IERS web site for current information.

If your Skyfield version is somewhat older (<= 1.30), Skyfield will have downloaded the older files it then used: deltat.data, deltat.preds and Leap_Second.dat, which are slightly less accurate than the IERS EOP data (which is updated weekly).

Software Requirements


Nearly all of the astronomical computation is done by the free Skyfield library.
Typesetting is done typically by MiKTeX or TeX Live.
These need to be installed:

Installation

Install a TeX/LaTeX program on your operating system so that ‘pdflatex’ is available.

Ensure that the pip Python installer tool is installed. Then ensure that old versions of PyEphem, Ephem and Skyalmanac are not installed before installing SkyAlmanac from PyPI:

python -m pip uninstall pyephem ephem sfalmanac
python -m pip install sfalmanac

Installing SFalmanac ensures that Ephem, Skyfield and Pandas (and their dependencies) are also installed. If previous versions of SFalmanac were installed, consider upgrading Skyfield and Pandas:

python -m pip install --upgrade skyfield pandas

Thereafter run it with:

python -m sfalmanac

On a POSIX system (Linux or Mac OS), use python3 instead of python in the commands above.

This PyPI edition also supports installing and running in a venv virtual environment. Finally check or change the settings in config.py. It’s location is printed immediately whenever Skyalmanac runs.

Guidelines for Linux & Mac OS

Quote from Chris Johnson:

It’s best to not use the system-provided Python directly. Leave that one alone since the OS can change it in undesired ways.

The best practice is to configure your own Python version(s) and manage them on a per-project basis using venv (for Python 3). This eliminates all dependency on the system-provided Python version, and also isolates each project from other projects on the machine.

Each project can have a different Python point version if needed, and gets its own site_packages directory so pip-installed libraries can also have different versions by project. This approach is a major problem-avoider.

Troubleshooting

If using MiKTeX 21 or higher, executing ‘option 5’ (Increments and Corrections) will probably fail with:

! TeX capacity exceeded, sorry [main memory size=3000000].

To resolve this problem (assuming MiKTeX has been installed for all users), open a Command Prompt as Administrator and enter:

initexmf --admin --edit-config-file=pdflatex

This opens pdflatex.ini in Notepad. Add the following line:

extra_mem_top = 1000000

and save the file. Problem solved. For more details look here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sfalmanac-1.1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sfalmanac-1.1-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file sfalmanac-1.1.tar.gz.

File metadata

  • Download URL: sfalmanac-1.1.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for sfalmanac-1.1.tar.gz
Algorithm Hash digest
SHA256 91ce37263b3d4e8952ebf1516ce5e35210b5008e91b703c3ea56c158e1dfecb1
MD5 70bf396620a63b4549e7d02638f90296
BLAKE2b-256 af5cde8eff82036b9ef5f21449950e81dfaec77d0502796bc32ba5b7ce9f066b

See more details on using hashes here.

File details

Details for the file sfalmanac-1.1-py3-none-any.whl.

File metadata

  • Download URL: sfalmanac-1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for sfalmanac-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bafef13b9d7f9d36cb97656353e50175b9ceec91714aaefc8147fab9070618a8
MD5 ee0f9cf2411a7bca0a24e72c8c04a0cf
BLAKE2b-256 51d5b7134b56684ee581c86a63577c7e4a1289da499616576584615d36598326

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page