Skip to content

Generalize handling of optically bright planets.#229

Draft
jeanconn wants to merge 18 commits into
masterfrom
obo
Draft

Generalize handling of optically bright planets.#229
jeanconn wants to merge 18 commits into
masterfrom
obo

Conversation

@jeanconn
Copy link
Copy Markdown
Contributor

@jeanconn jeanconn commented May 13, 2026

Description

This PR removes Jupiter-specific checking and generalizes the code to handle the optically bright planets. Much of the new code to work generically with the optically bright planets data and planet functions upstream in chandra_aca and proseco.

This PR requires

sot/chandra_aca#203
and
sot/proseco#415


New logic for bright planet checks:

It asks the bright-object helper for candidate bright planets over the observation interval using a 3-sample time grid at the start, midpoint, and end. Candidate filtering is two-stage:

  • Fast Earth-centered angular separation prefilter: drop the planet if separation is greater than 2.25° at all 3 samples.
  • Slower Chandra-centered angular separation filter: drop the planet if separation is greater than 2.0° at all 3 samples.
  • For planets that survive those filters, Sparkles uses the returned CCD position table directly instead of recomputing it.

From there the logic is:

  • If the planet is within range but the returned CCD table is empty, it is treated as off CCD. If the planet is not in the no-action magnitude state, Sparkles emits a critical message and stops for that planet.
  • If the planet is on CCD, Sparkles looks up the magnitude action level for the observation and applies the corresponding checks.
  • If the planet is too bright, Sparkles emits a critical message.
  • If the planet is on CCD but not in the target name, Sparkles emits a warning for the mitigation states and an info message for the no-action state.
  • Sparkles now always emits a generic info summary for any on-CCD planet, including the magnitude range for the active action level.
  • Sparkles always runs the acquisition and tracking spoiler checks for on-CCD planets.
  • Sparkles runs the distribution checks only for the partial-mitigation and full-mitigation states.

Interface impacts

Testing

Unit tests

  • No unit tests
  • Mac
  • Linux
  • Windows

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

No functional testing.

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