Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Mar 4, 2024
1 parent 93249e5 commit 81ece5e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions proseco/acq.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,7 @@ def select_best_p_acqs(self, cand_acqs, min_p_acq, acq_indices, box_sizes):

# If this box size could overlap with the box of an already selected star
# then skip it.
if (("PROSECO_ACQ_OVERLAP_PENALTY" in os.environ)
& (os.environ["PROSECO_ACQ_OVERLAP_PENALTY"] == "True")):
if (os.environ.get("PROSECO_ACQ_OVERLAP_PENALTY") == "True"):
has_overlap = False
for other_idx, halfw2 in zip(acq_indices, box_sizes):
other_acq = cand_acqs[other_idx]
Expand Down Expand Up @@ -929,8 +928,7 @@ def calc_p_safe(self, verbose=False):

# Check for overlapping boxes and if so, reduce the probability of
# acquiring the star.
if (("PROSECO_ACQ_OVERLAP_PENALTY" in os.environ)
& (os.environ["PROSECO_ACQ_OVERLAP_PENALTY"] == "True")):
if (os.environ.get("PROSECO_ACQ_OVERLAP_PENALTY") == "True"):
penalties = self.get_overlap_penalties()
if np.count_nonzero(penalties):
self.log("Overlapping boxes detected, applying penalty", level=1)
Expand Down

0 comments on commit 81ece5e

Please sign in to comment.