Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Apr 12, 2024
1 parent 591d95a commit 4124186
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
7 changes: 3 additions & 4 deletions proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ def process_monitors_pre(self):
dr = int(4 + np.ceil(self.dither.row if is_track else 0))
dc = int(4 + np.ceil(self.dither.col if is_track else 0))
row, col = int(monitor["row"]) + 512, int(monitor["col"]) + 512
self.dark[row - dr : row + dr, col - dc : col + dc] = (
ACA.bad_pixel_dark_current
)
self.dark[
row - dr : row + dr, col - dc : col + dc
] = ACA.bad_pixel_dark_current

# Reduce n_guide for each MON. On input the n_guide arg is the
# number of GUI + MON, but for guide selection we need to make the
Expand Down Expand Up @@ -391,7 +391,6 @@ def select_catalog(self, stage_cands):
self.log("All guide stars are force-included")
return stage_cands[forced]


# This subtracts the number of unique force-included stars as they are not
# part of the combination selection process.
choose_m = min(len(stage_cands), self.n_guide) - n_forced
Expand Down
14 changes: 6 additions & 8 deletions proseco/tests/test_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,18 +618,15 @@ def test_guides_include_close():
stars = StarsTable.empty()

stars.add_fake_constellation(
mag=[7.0, 7.0, 7.0, 7.0, 7.0],
id=[25, 26, 27, 28, 29],
size=2000,
n_stars=5)
mag=[7.0, 7.0, 7.0, 7.0, 7.0], id=[25, 26, 27, 28, 29], size=2000, n_stars=5
)

stars.add_fake_star(mag=11.0, yang=100, zang=100, id=21)
stars.add_fake_star(mag=11.0, yang=-100, zang=-100, id=22)
stars.add_fake_star(mag=11.0, yang=100, zang=-100, id=23)
stars.add_fake_star(mag=11.0, yang=-100, zang=100, id=24)

cat1 = get_guide_catalog(**mod_std_info(n_guide=5),
stars=stars)
cat1 = get_guide_catalog(**mod_std_info(n_guide=5), stars=stars)

# Run the cluster checks and confirm all 3 pass
cat1_pass, _ = run_select_checks(cat1)
Expand All @@ -640,8 +637,9 @@ def test_guides_include_close():

# Force include the faint 4 stars that are also close together
include_ids = [21, 22, 23, 24]
cat2 = get_guide_catalog(**mod_std_info(n_guide=5),
stars=stars, include_ids_guide=include_ids)
cat2 = get_guide_catalog(
**mod_std_info(n_guide=5), stars=stars, include_ids_guide=include_ids
)

# Run the cluster checks and confirm all 3 fail
cat2_pass, _ = run_select_checks(cat2)
Expand Down

0 comments on commit 4124186

Please sign in to comment.