Tier scheduler fixes and new detection logics#460
Merged
dsavransky merged 5 commits intomasterfrom Apr 21, 2026
Merged
Conversation
… logic additions.
for more information, see https://pre-commit.ci
`SurveySimulation.scheduleRevisit()` in the prototype assumed `self.revisit_wait` was always a scalar day quantity. On this branch, `tieredScheduler` now falls back to the prototype implementation, but its `revisit_wait` is stored as a per-target quantity array. That caused `t_rev.to_value(u.day)` to be array-valued and NumPy to raise when building `np.array([sInd, ...])`. This change makes the prototype compatible with both expected forms of `self.revisit_wait`: - scalar `Quantity` from the prototype / scalar schedulers - per-target `Quantity` arrays from schedulers like `tieredScheduler` Implementation: - if `self.revisit_wait` is array-like, select `self.revisit_wait[sInd]` - store the revisit row using a plain float day value This preserves existing prototype behavior while restoring compatibility with schedulers that use per-star revisit waits. Other relevant schedulers, i.e., coroOnlyScheduler and JSscheduler still use their own implementation of scheduleRevisit, that overrides the prototype. That is why we do not see a failure for those schedulers. JSscheduler uses the exact same logic as the prototype and uses a scalar for revisit_wait. coroOnlyScheduler uses a simplified version of the scheduleRevisit function and revisit_wait is an array that stores the time per star.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
prom_stop_dets' (boolean) allows to remove ansInd' from the revisit list upon promotion regardless of the value of 'max_successful_dets'. Can be used in the JSON containing input parameters.disable_dets' (boolean) allows to set 'max_successful_dets' to 0 forcing 'choose_next_telescope_target' to return None. Therefore it setssInd' equal to `occ_sInd' at every iteration forcing the scheduler to perform characterization observations only.