You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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