SFalmanac is a Python 3 script that creates the daily pages of the Nautical Almanac (based on the UT timescale). 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.
NOTE: SFalmanac has now been superceeded by Skyalmanac. Currently the functionality is identical, however, if using SFalmanac, please switch to Skyalmanac as SFalmanac will not be upgraded in the future.
SFalmanac employs multiprocessing (if your processor has multiple cores) reducing the processing time. (Single-processing is also available as an option.)
Quick Overview
SFalmanac not only creates the daily pages of the Nautical Almanac - it also contains Lunar Distance tables and charts and “Increments and Corrections” tables as well as abbreviated Sun tables and Event Time tables.
This is the PyPI edition of SFalmanac-Py3 (a Changelog can be viewed here). Version numbering follows the scheme Major.Minor.Patch, whereby the Patch number represents some small correction to the intended release.
if “useIERS = False”, the built-in UT1 tables in the installed version of Skyfield will be employed.
if “useIERS = True”, for optimal accuracy (specifically 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 (specifiable in config.py). Note that IERS specifies the range of Earth Orientation Parameter (EOP) data from 2nd January 1973 and is updated weekly. Refer to the IERS web site for current information.
Software Requirements
python >= 3.4 (version 3.13 is recommended)
skyfield >= v1.49 (v1.55 is recommended; see the Skyfield Changelog)
numpy < 2.0.0 (only for Skyfield versions < 1.48)
pandas >= 1.0 (to decode the Hipparcos star catalog)
pandas >= 2.2.2 (if numpy version >= 2.0.0)
Skyfield version 1.55 or newer is recommended (versions 1.50 to 1.54 are known to have issues).
Installation on Windows 10/11; on Linux before Python 3.12; on Mac before MacOS 14
python -m pip install sfalmanac --upgrade
Installing SFalmanac ensures that Skyfield and Pandas (and their dependencies) are also installed. If previous versions of SFalmanac were installed, consider upgrading Skyfield and Pandas thus:
python -m pip install --upgrade skyfield pandas
Thereafter run it with:
python -m sfalmanac
Installation on Linux with Python 3.12 and higher; on MacOS 14 and higher
More recent versions of Python (on specific operating systems) prevent users installating a PyPI package (such as Skyfield, SFalmanac, numpy, Pandas) in the Python system-wide area. The error message is “This environment is externally managed” and this is intended to avoid a conflict between the distribution’s package manager and Python package management tools as defined in the PEP-668 documentation.
The intention is to persuade users to install PyPI packages in a virtual environment instead, which functions very well. The downside: a virtual environment is typically created in a project folder, so you may require several vitrual environments. It is NOT wise to “break the rules” and force package installation in the Python system-wide area.
To assist users new to virtual environments, I have provided an Installation guide for Linux. (Package installation for MacOS is in principle the same.)
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. 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sfalmanac-1.13.tar.gz.
File metadata
- Download URL: sfalmanac-1.13.tar.gz
- Upload date:
- Size: 32.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74964175604201a881aed985fd1356ebdfed2985ae0e47e3a00115a4d7a27a7
|
|
| MD5 |
5f54a3271329c3ff197d7965b85b5d07
|
|
| BLAKE2b-256 |
abd35e81970af5234e4f44d1099b55968349cf659b3d0ac25e4c61c544e766ce
|
File details
Details for the file sfalmanac-1.13-py3-none-any.whl.
File metadata
- Download URL: sfalmanac-1.13-py3-none-any.whl
- Upload date:
- Size: 32.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3ba7950666e4841dc8389dd9cd0de298851e00364a12a001f0c88160010b279
|
|
| MD5 |
620d0bd9bbc7c9242cf8d8af1dfa7bc7
|
|
| BLAKE2b-256 |
9eb2395591f3089c632be4628ab4adc70eb0560de3053ff19dcbcd0db1cb5ecb
|