Skip to content

Fix issue 1255 - #1372

Open
S-Bhattacharya240611 wants to merge 3 commits into
rzellem:developfrom
S-Bhattacharya240611:fix-issue-1255
Open

Fix issue 1255#1372
S-Bhattacharya240611 wants to merge 3 commits into
rzellem:developfrom
S-Bhattacharya240611:fix-issue-1255

Conversation

@S-Bhattacharya240611

Copy link
Copy Markdown

This PR resolves Issue #1255 by implementing a coordinate-based fallback for the Field of View (FOV) plot.
The Problem:
When the NASAExoplanetArchive query fails (due to target omission, candidate status, or API instability), the pipeline currently fails to generate the FOV plot because of missing coordinates in pDict.
The Solution:
I have implemented a logic bridge in exotic/exotic.py that checks for user-provided RA and DEC values in userpDict (from inits.json) if the NASA Archive lookup returns empty.
Safety Features:
Utilizes .get() for safe dictionary access.
Includes a secondary check to prevent NoneType crashes if both the Archive and the user-input are missing.
Added logging to notify the user when a fallback is active.
Testing:
Verified syntax via py_compile.
Passed all 45 existing unit tests (test_ld.py and test_utils.py) using pytest on Python 3.12.
Resolves #1255

@rzellem

rzellem commented Mar 26, 2026

Copy link
Copy Markdown
Owner

Have you tested to see if this works as intended if a user does not supply an inits.json file?

@S-Bhattacharya240611

S-Bhattacharya240611 commented Mar 26, 2026

Copy link
Copy Markdown
Author

Have you tested to see if this works as intended if a user does not supply an inits.json file?

Hi Dr. Zellem , I have performed a regression test on the interactive (non-JSON) workflow to verify the fix.
During testing, I identified that planet_info() returns None for candidate planets in interactive mode, which originally caused an AttributeError in my fallback logic. I have updated the implementation to:
Safely initialize pDict as an empty dictionary if the archive returns None.
Successfully perform the RA/DEC fallback from userpDict for both JSON and manual entries.
Verified the fix by passing the full pytest suite (45/45) on Python 3.12.
This ensures the FOV plot is now robust across all input methods.And as always, thank you for the guidance!
The issue is fixed and tested

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.

2 participants