Skip to content

Run Jupiter checks#223

Merged
jeanconn merged 12 commits intomasterfrom
jupiter
Sep 17, 2025
Merged

Run Jupiter checks#223
jeanconn merged 12 commits intomasterfrom
jupiter

Conversation

@jeanconn
Copy link
Copy Markdown
Contributor

@jeanconn jeanconn commented Sep 10, 2025

Description

Run Jupiter checks.

This PR adds three new sparkles checks:

  • check_jupiter_acq_spoilers
  • check_jupiter_track_spoilers
  • check_jupiter_distribution

And a "wrapper" check

  • check_run_jupiter_checks

check_jupiter_acq_spoilers: This confirms that no acquisition search box contains the columns within 15 pixels of the Jupiter position at acquisition. (TBD - add maneuver error to check?)

check_jupiter_track_spoilers: This confirms that no fid light or guide star is within 15 pixels in column of Jupiter during the duration of the observation.

check_jupiter_distribution: This confirms that there are always at least two guide stars on the "side" of the CCD opposite Jupiter.

check_run_jupiter_checks: This runs the above three checks if Jupiter is on the CCD and adds an info message that the Jupiter checks have run. If Jupiter is not on the CCD during the observation but is in the target name, this adds a critical warning (not 100% an ACA issue, but if Jupiter was supposed to be there, something is wrong with the attitude).

For speed, the Jupiter checks are only run if Jupiter is in the target name. These methods use proseco.jupiter code as applicable.

Requires

proseco: Consider jupiter in selection

the proseco PR requires the cheta stk PR sot/cheta#257 so both need to be available for unit testing sparkles.

Interface impacts

Testing

Unit tests

  • Mac
(ska3-latest) flame:sparkles jean$ python -c "import cheta; print(cheta.__version__); import proseco; print(proseco.__version__);"
4.64.1.dev14+g90860f2
5.16.3.dev45+g4c3d548
(ska3-latest) flame:sparkles jean$ git rev-parse HEAD
2bab011118877741da76661e00f6d7899aeac5ec
(ska3-latest) flame:sparkles jean$ pytest
==================================================================================== test session starts ====================================================================================
platform darwin -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /Users/jean/git
configfile: pytest.ini
plugins: socket-0.7.0, anyio-4.7.0, timeout-2.3.1
collected 128 items                                                                                                                                                                         

sparkles/tests/test_checks.py ..................................................................................................                                                      [ 76%]
sparkles/tests/test_find_er_catalog.py .....                                                                                                                                          [ 80%]
sparkles/tests/test_review.py .....................                                                                                                                                   [ 96%]
sparkles/tests/test_yoshi.py ....                                                                                                                                                     [100%]

===================================================================================== warnings summary ======================================================================================
sparkles/sparkles/tests/test_review.py::test_jupiter_not_present
sparkles/sparkles/tests/test_review.py::test_jupiter_not_present
  /Users/jean/miniforge3/envs/ska3-latest/lib/python3.12/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.
    parser = parser(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================= 128 passed, 2 warnings in 36.12

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

New unit tests.

As a test of both proseco and sparkles, I ran a test for "what if we needed to observe Jupiter every day" captured in this output:

for -3C - https://icxc.cfa.harvard.edu/aspect/test_review_outputs/sparkles/pr223/
for -10C - https://icxc.cfa.harvard.edu/aspect/test_review_outputs/sparkles/pr223/minus10/

@jeanconn jeanconn changed the title WIP: Run Jupiter checks Run Jupiter checks Sep 15, 2025
@jeanconn jeanconn requested a review from Copilot September 15, 2025 12:45

This comment was marked as resolved.

@jeanconn jeanconn marked this pull request as ready for review September 15, 2025 13:02
Comment thread sparkles/core.py Outdated
Comment thread sparkles/checks.py
Copy link
Copy Markdown
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @jeanconn needs to review my commits independently.

Comment thread sparkles/tests/test_checks.py
@jeanconn jeanconn merged commit 8106640 into master Sep 17, 2025
2 checks passed
@jeanconn jeanconn deleted the jupiter branch September 17, 2025 20:30
@javierggt javierggt mentioned this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants