astropy / astroplan

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

PriorityScheduler: Update _get_filled_indices() to avoid 'block already occupied' ValueError #550

Open michaelbaisch opened 1 year ago

michaelbaisch commented 1 year ago

Previously, for blocks with a duration equal to the time_resolution, _get_filled_indices() was unable to identify overlapping slots. This was due to the comparison of start times not accounting for these specific cases.

This has been addressed by adjusting the start_time comparison to be slightly earlier (0.5 seconds). This change enables the correct identification of filled time slots for blocks with minimal duration, thus preventing the 'block already occupied' error.

Fixes #368