Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method "is_moonlit" #1002

Open
Borlaff opened this issue Sep 20, 2024 · 1 comment
Open

Add method "is_moonlit" #1002

Borlaff opened this issue Sep 20, 2024 · 1 comment

Comments

@Borlaff
Copy link

Borlaff commented Sep 20, 2024

Hi!

I am working in a project using extensively SkyField and I would like to find out not only if a certain position is illuminated by the sun (as the is_sunlit method does very efficiently) but also it would be critical to know if the position is illuminated by the Moon (regardless of the Moon phase). Is there any possibility to do this in skyfield in an elegant way, like is_sunlit does?

Thank you,
Alex

@Borlaff
Copy link
Author

Borlaff commented Oct 1, 2024

Update:

I added and tested the solution in the following fork:

https://github.com/Borlaff/python-skyfield

Borlaff@be4d267

In that fork, ICRF(object) contains the is_moonlit method, which is a direct copy of is_sunlit.

Perhaps in the future it should become a more general method, that accepts any celestial object as "illuminating" source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant