diff --git a/proseco/acq.py b/proseco/acq.py index e632fccf..703da856 100644 --- a/proseco/acq.py +++ b/proseco/acq.py @@ -1398,7 +1398,6 @@ def calc_p_on_ccd(row, col, box_size): (row, max_ccd_row, box_size.row), (col, max_ccd_col, box_size.col), ): - # Pixel boundaries are symmetric so just take abs(row/col) rc1 = abs(rc) + half_width diff --git a/proseco/guide.py b/proseco/guide.py index 020c539f..13f3b5ce 100644 --- a/proseco/guide.py +++ b/proseco/guide.py @@ -348,13 +348,11 @@ def exclude_overlaps(self, stage_cands): self.log("Checking for guide star overlap in stage-selected stars") nok = np.zeros(len(stage_cands)).astype(bool) for idx, star in enumerate(stage_cands): - # If the star was manually-selected, don't bother checking to possibly exclude it. if star["id"] in self.include_ids: continue for jdx, other_star in enumerate(stage_cands): - # The stage_cands are supplied in the order of preference (currently by mag) # Check and exclude a guide star only if it would spoil a lower index (better) star. if idx <= jdx: diff --git a/proseco/report_acq.py b/proseco/report_acq.py index 8aba39a5..20367ce4 100644 --- a/proseco/report_acq.py +++ b/proseco/report_acq.py @@ -161,7 +161,6 @@ def make_cand_acqs_report(acqs, cand_acqs, events, context, obsdir): # Now plot figure filename = obsdir / "candidate_stars.png" if not filename.exists(): - # Pull a fast-one and mark the final selected ACQ stars as BOT so they # get a circle in the plot. This might be confusing and need fixing # later, but for now it is an easy way to show the winning candidates. diff --git a/proseco/report_guide.py b/proseco/report_guide.py index 47c56084..27dd3d3d 100644 --- a/proseco/report_guide.py +++ b/proseco/report_guide.py @@ -130,7 +130,6 @@ def make_report(obsid, rootdir="."): def make_cand_report(guides, cand_guides, context, obsdir): - n_stages = np.max(cand_guides["stage"]) context["cand_guides"] = [] for ii, guide in enumerate(cand_guides): diff --git a/proseco/tests/conftest.py b/proseco/tests/conftest.py new file mode 100644 index 00000000..7050be13 --- /dev/null +++ b/proseco/tests/conftest.py @@ -0,0 +1,6 @@ +import pytest + + +@pytest.fixture(autouse=True) +def use_fixed_chandra_models(monkeypatch): + monkeypatch.setenv("CHANDRA_MODELS_DEFAULT_VERSION", "3.48") diff --git a/proseco/tests/test_guide.py b/proseco/tests/test_guide.py index a5876f06..b2843be4 100644 --- a/proseco/tests/test_guide.py +++ b/proseco/tests/test_guide.py @@ -674,7 +674,7 @@ def test_get_ax_range(): """ ns = [0, 0.71, 495.3, -200.2] extents = [4.0, 5.6, 4.8, 9.0] - for (n, extent) in itertools.product(ns, extents): + for n, extent in itertools.product(ns, extents): minus, plus = get_ax_range(n, extent) # Confirm range divisable by 2 assert (plus - minus) % 2 == 0