astropy / astroplan

Observation planning package for astronomers – maintainer @bmorris3
https://astroplan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
199 stars 109 forks source link

Tweaking end of observing block in Priority Scheduler #503

Closed bmorris3 closed 3 years ago

bmorris3 commented 3 years ago

Fixes #502

The priority scheduler currently requires that the inserted observing block has a duration which is an integer multiple of the time resolution, and it rounds up to the nearest integer multiple observing block duration. This can lead to cases where the observing block "overflows" beyond the end of the slot by a margin similar to the time resolution. Rounding down seems to fix this.

I'd love to see if anyone can test this change on their priority schedulers before we merge this, any testers out there? Our testing of the schedulers is simple compared to some of the use cases out there, so knowing it works on someone's production code would be great!

bmorris3 commented 3 years ago

Any experts out there know if this PR creates an inconsistency with this line?

thusser commented 3 years ago

Tested this on our tonight's schedule, and while the original version created one invalid schedule, everything seems fine with the tweak. Will continue over the next couple of days and let you know afterwards.

thusser commented 3 years ago

Okay, at least for me this seems to work well.

bmorris3 commented 3 years ago

Great thanks @thusser, merging.