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

Problem with twilight_evening_nautical() at specific date and observatory #533

Open
nicochunger opened this issue Nov 16, 2022 · 2 comments

Comments

@nicochunger
Copy link

I'm using astroplan to schedule observations, and one of the many tasks is getting the nautical twilight time each night. It worked perfectly for many months, until it unexpectedly broke on the 3rd of November.

The code to reproduce the error is the following:

import astroplan
from astropy.time import Time

date = Time("2022-11-03")
lasilla = astroplan.Observer.at_site("lasilla")
evening_twilight = lasilla.twilight_evening_nautical(date, which="next")

The output:

WARNING: TargetNeverUpWarning: Target with index 0 does not cross horizon=-12.0 deg within 24 hours [astroplan.observer]
<Time object: scale='utc' format='jd' value=nan>

For some reason, it thinks the Sun never crosses the horizon on the 3rd of November.
To troubleshoot, I tried changing the dates, and it works for a day earlier (02/11) or a day later (04/11). So it's specifically with the 3rd of November, and of any year as well.
And apparently this error only appears with "lasilla" at the site of the observer. When I change it to "paranal" it does work. So I'm a bit lost on what could be causing this problem.

@nicochunger
Copy link
Author

To add, I just tested the same thing with twilight_evening_civil() and with twilight_evening_astronomical() and it works in both cases. So the problem is just with the nautical twilight

@bmorris3
Copy link
Contributor

bmorris3 commented Apr 3, 2023

Does this FAQ page answer your question? https://astroplan.readthedocs.io/en/latest/faq/precision.html

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

2 participants