-
Notifications
You must be signed in to change notification settings - Fork 0
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
Handle empty candidate list for guide and test for get_aca_catalog #94
Conversation
@@ -134,6 +134,9 @@ def run_search_stages(self): | |||
""" | |||
cand_guides = self.meta['cand_guides'] | |||
self.log("Starting search stages") | |||
if len(cand_guides) == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taldcroft I looked at adding similar tweaks to what you used in proseco.acq, but for the empty candidate list, it seemed just as reasonable to stop running the checks and return the empty table of candidates. Does this make sense?
As far as I could tell, not selecting any stars later through the search stages resulted in just the all-False mask within cand_guides, which returned a 0-list table with an 'id' column defined... which seemed all good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
With this can we close #90? |
And maybe cut 1.0.2 after this? I'm going to say this is a bug fix. |
proseco/guide.py
Outdated
@@ -134,6 +134,9 @@ def run_search_stages(self): | |||
""" | |||
cand_guides = self.meta['cand_guides'] | |||
self.log("Starting search stages") | |||
if len(cand_guides) == 0: | |||
self.log("There are no candidates to check in stages. Exiting") | |||
return cand_guides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One edit. I just should have a better comment here before returning the empty cand_guides as the empty 'selected' set. Could also bump this if statement back up one level and have a conditional on bothering to get here.
Handle empty candidate list for guide and add empty cand test for get_aca_catalog