Skip to content

Commit

Permalink
Respect include_ids_guide in combination optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Apr 24, 2024
1 parent 6b252a7 commit d140c06
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,18 @@ def index_combinations(n, m):
choose_m = min(len(stage_cands), self.n_guide)

n_tries = 0
for n_tries, comb in enumerate(
index_combinations(len(stage_cands), choose_m), start=1
):
for comb in index_combinations(len(stage_cands), choose_m):
cands = stage_cands[
list(comb)
] # (note that [(1,2)] is not the same as list((1,2))

# If there are any include_ids, then the selected stars must include them.
# If not, skip this combination.
if self.include_ids and not set(self.include_ids).issubset(cands["id"]):
continue

n_tries += 1

n_pass, n_tests = run_select_checks(
cands
) # This function knows how many tests get run
Expand Down

0 comments on commit d140c06

Please sign in to comment.