Skip to content

Commit

Permalink
Chasing perfection
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jul 29, 2020
1 parent d1f3fed commit 4ecd4f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sparkles/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,8 @@ def plot(self, ax=None, **kwargs):
idxs = self.get_candidate_better_stars()
stars = self.stars[idxs]
for star in stars:
already_checked = ((star['id'] in self.acqs.cand_acqs['id']) and
(star['id'] in self.guides.cand_guides['id']))
already_checked = ((star['id'] in self.acqs.cand_acqs['id'])
and (star['id'] in self.guides.cand_guides['id']))
selected = (star['id'] in set(self.acqs['id']) | set(self.guides['id']))
if (not already_checked and not selected):
circle = Circle((star['row'], star['col']), radius=20,
Expand Down
4 changes: 2 additions & 2 deletions sparkles/roll_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def get_candidate_better_stars(self):
# region (mentioned above) between an inner square and outer circle.
rc_pad = 40
stars = self.stars
in_fov = ((np.abs(stars['row']) < CCD['row_max'] - rc_pad) &
(np.abs(stars['col']) < CCD['col_max'] - rc_pad))
in_fov = ((np.abs(stars['row']) < CCD['row_max'] - rc_pad)
& (np.abs(stars['col']) < CCD['col_max'] - rc_pad))
radius2 = stars['row'] ** 2 + stars['col'] ** 2
sp_ok = ~in_fov & (radius2 < 2 * (512 + rc_pad) ** 2)

Expand Down

0 comments on commit 4ecd4f3

Please sign in to comment.