Problem with twilight_evening_nautical() at specific date and observatory
- Dominant language
- Python
- Stars
- 225
- Forks
- 121
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
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]
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with Observer.at_site("lasilla"), Time("2022-11-03"), and twilight_evening_nautical(date, which="next"), then compare November 2 and 4 and the "paranal" site. Trace the twilight calculation from that observer entry point; done means Lasilla returns a finite evening nautical twilight time on November 3 and the regression is covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100