Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin chandra_models version to 3.48 for all tests #381

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion proseco/acq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion proseco/report_acq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion proseco/report_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 6 additions & 0 deletions proseco/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pytest


@pytest.fixture(autouse=True)
def use_fixed_chandra_models(monkeypatch):
monkeypatch.setenv("CHANDRA_MODELS_DEFAULT_VERSION", "3.48")
2 changes: 1 addition & 1 deletion proseco/tests/test_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down