Skip to content

Generalize handling of optically bright planets#415

Open
jeanconn wants to merge 7 commits into
masterfrom
obo
Open

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

Conversation

@jeanconn

@jeanconn jeanconn commented May 13, 2026

Copy link
Copy Markdown
Contributor

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 and include complementary testing (added Venus scenario tests)

  • Show that this is not an issue for speed

master

(ska3-latest) flame:proseco jean$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
(ska3-latest) flame:proseco jean$ ipython
Python 3.13.11 | packaged by conda-forge | (main, Dec  6 2025, 11:28:54) [Clang 19.1.7 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 9.9.0 -- An enhanced Interactive Python. Type '?' for help.
Tip: Use `F2` or %edit with no arguments to open an empty editor with a temporary file.

In [1]: import proseco.tests.timing

In [2]: proseco.tests.timing.time_get_aca_catalog(n_samples=1000)
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Got 1000 catalogs in 0.141 secs (mean)

This branch

(ska3-latest) flame:proseco jean$ env PYTHONPATH=/Users/jean/git/chandra_aca ipython
Python 3.13.11 | packaged by conda-forge | (main, Dec  6 2025, 11:28:54) [Clang 19.1.7 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 9.9.0 -- An enhanced Interactive Python. Type '?' for help.
Tip: You can change the editing mode of IPython to behave more like vi, or emacs.

In [1]: import proseco.tests.timing

In [2]: proseco.tests.timing.time_get_aca_catalog(n_samples=1000)
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Got 1000 catalogs in 0.140 secs (mean)

@jeanconn jeanconn changed the title Obo Generalize handling of optically bright planets May 13, 2026
@jeanconn
jeanconn marked this pull request as ready for review July 16, 2026 19:30
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