Skip to content

Generalize handling of optically bright planets#415

Draft
jeanconn wants to merge 3 commits into
masterfrom
obo
Draft

Generalize handling of optically bright planets#415
jeanconn wants to merge 3 commits into
masterfrom
obo

Conversation

@jeanconn
Copy link
Copy Markdown
Contributor

@jeanconn jeanconn commented May 13, 2026

Description

Generalize handling of optically bright planets.

Instead of checking whether the target name contains “Jupiter,” proseco now evaluates the actual pointing and observation interval using chandra_aca.planets to find nearby bright planets, then applies bright-object checks as needed.

Requires

sot/chandra_aca#203

Key Changes

  • Added proseco.bright_object shared helpers for:
    • nearby bright-planet detection
    • spoiler checks based on planet CCD positions
    • guide star distribution checks to satisfy the guideline
    • selecting acquisition stars in the presence of a planet on the CCD
  • Replaced ACACatalogTable.jupiter with ACACatalogTable.planets.
  • Updated catalog logic to use any relevant bright planet (not just Jupiter):
    • acq.py: inject synthetic acquisition spoilers for on-CCD bright planets
    • guide.py: reject spoiled candidates and do distribution checks
    • fid.py: reject fid lights spoiled by any on-CCD bright planet
  • Removed Jupiter-only modules:
    • proseco/jupiter.py
    • proseco/characteristics_jupiter.py

Interface Impacts

  • Jupiter-specific internal APIs are removed in favor of generic planets + bright-object helpers.
  • Downstream logic should use the shared bright-object path instead of Jupiter-only helpers.

Testing

sot/chandra_aca#203

Unit tests

  • Mac
(ska3-latest) flame:proseco jean$ export PYTHONPATH=/Users/jean/git/obo/chandra_aca
(ska3-latest) flame:proseco jean$ pytest
============================================================== test session starts ==============================================================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/jean/git
configfile: pytest.ini
plugins: anyio-4.12.1, timeout-2.4.0
collected 249 items                                                                                                                             

proseco/tests/test_acq.py .....................................                                                                           [ 14%]
proseco/tests/test_catalog.py ..........................................                                                                  [ 31%]
proseco/tests/test_core.py ............................                                                                                   [ 42%]
proseco/tests/test_diff.py ......                                                                                                         [ 45%]
proseco/tests/test_fid.py ...............                                                                                                 [ 51%]
proseco/tests/test_guide.py ............................................................                                                  [ 75%]
proseco/tests/test_guide_fid_optimization.py ............                                                                                 [ 80%]
proseco/tests/test_jupiter.py ...........................................                                                                 [ 97%]
proseco/tests/test_mon_full_cat.py ......                                                                                                 [100%]

======================================================== 249 passed in 74.25s (0:01:14) =========================================================
(ska3-latest) flame:proseco jean$ git rev-parse HEAD
a28d6342f78f979900fbd6b1b083b52d75fdb228

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

  • Jupiter and guide regression tests were updated.
  • Sparkles tests pass against the updated behavior.

@jeanconn jeanconn changed the title Obo Generalize handling of optically bright planets May 13, 2026
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.

1 participant