Calculating the date of solar and lunar eclipse with python.
Published in
Feb 18, 2021
How to calculate the date of solar eclipse in python?
This time we will not use modules like ephem instead we will use PanclusGz.
If you don’t know about panclus then please visit https://libraries.io/pypi/panclus
Now Panclus is the another good library in python for calculating the dates of solar and lunar eclipse.
Panclus or PanclusGz is the best module or library or say package in python to calculate the date of solar eclipse in a very short lines of code.
Installation of panclus
pip install panclus
Code
import PanclusGz
from PanclusGz import Gz as gz
print(gz.date_solar_eclipse())# For lunar eclipse
gz.date_lunar_eclipse()
Note: Full panclus library was made/developed by Ayush Moghe