Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCAL-993 RCAL-992 - fix skycell asn schema, stop double json encoding skycell_wcs_info #1592

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Jan 27, 2025

Resolves RCAL-993
Resolves RCAL-992

Closes #1589
Closes #1590

This PR:

  • fixes the association schema to check the skycell_wcs_info property
  • remove the double json encoding of skycell_wcs_info

Note that this preserves the possibility that skycell_wcs_info can be the string "none" since that exists in association files in artifactory. Perhaps omitting skycell_wcs_info when there is no info is a less clunky solution but that could be explored in a follow-up PR.

Regtests all pass: https://github.com/spacetelescope/RegressionTests/actions/runs/12993930376

Tasks

  • request a review from someone specific, to avoid making the maintainers review every PR
  • add a build milestone, i.e. 24Q4_B15 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly
news fragment change types...
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change
  • changes/<PR#>.docs.rst
  • changes/<PR#>.stpipe.rst
  • changes/<PR#>.associations.rst
  • changes/<PR#>.scripts.rst
  • changes/<PR#>.mosaic_pipeline.rst
  • changes/<PR#>.patch_match.rst

steps

  • changes/<PR#>.dq_init.rst
  • changes/<PR#>.saturation.rst
  • changes/<PR#>.refpix.rst
  • changes/<PR#>.linearity.rst
  • changes/<PR#>.dark_current.rst
  • changes/<PR#>.jump_detection.rst
  • changes/<PR#>.ramp_fitting.rst
  • changes/<PR#>.assign_wcs.rst
  • changes/<PR#>.flatfield.rst
  • changes/<PR#>.photom.rst
  • changes/<PR#>.flux.rst
  • changes/<PR#>.source_detection.rst
  • changes/<PR#>.tweakreg.rst
  • changes/<PR#>.skymatch.rst
  • changes/<PR#>.outlier_detection.rst
  • changes/<PR#>.resample.rst
  • changes/<PR#>.source_catalog.rst

@braingram braingram marked this pull request as ready for review January 27, 2025 18:37
@braingram braingram requested review from a team as code owners January 27, 2025 18:37
@braingram braingram changed the title Skycell asn RCAL-993 RCAL-992 - fix skycell asn schema, stop double json encoding skycell_wcs_info Jan 27, 2025
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 78.16%. Comparing base (8422362) to head (ba7fe03).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
romancal/associations/skycell_asn.py 0.00% 6 Missing ⚠️
romancal/pipeline/mosaic_pipeline.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1592   +/-   ##
=======================================
  Coverage   78.15%   78.16%           
=======================================
  Files         116      116           
  Lines        7646     7643    -3     
=======================================
- Hits         5976     5974    -2     
+ Misses       1670     1669    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ddavis-stsci ddavis-stsci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to point me to where the tests and associations that you've generated are

@braingram
Copy link
Collaborator Author

You need to point me to where the tests and associations that you've generated are

The garbled contents can be seen with any association generated with skycell_asn. Would you like me to generate one for you?

@braingram
Copy link
Collaborator Author

To provide another example (beyond the one in the linked issue #1589) the output from test_skycell_generation.py contains:

    "skycell_wcs_info": "{\"name\": \"r274dp63x31y80\", \"pixel_scale\": 0.10000000149011612, \"ra_projection_center\": 274.2857142857143, \"dec_projection_center\": 63.0, \"x0_projection\": 67715.5, \"y0_projection\": -106920.5, \"ra_center\": 269.79530941742723, \"dec_center\": 65.95122676282939, \"nx\": 3564, \"ny\": 3564, \"orientat\": 355.99432373046875, \"orientat_projection_center\": 0.0}",

Containing the garbled output from the double json encoding.

@braingram
Copy link
Collaborator Author

braingram commented Jan 30, 2025

I pushed a commit 9857276 that extends the test_skycell_generation.py test to:

  • run one of the skycell_asn generated associations through the mosaic pipeline
  • check that the output is for a skycell

I restarted the regtests and they all pass.

Copy link
Collaborator

@ddavis-stsci ddavis-stsci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ddavis-stsci ddavis-stsci merged commit cdcfe78 into spacetelescope:main Jan 31, 2025
29 of 30 checks passed
@braingram braingram deleted the skycell_asn branch January 31, 2025 13:31
stscieisenhamer pushed a commit to stscieisenhamer/romancal that referenced this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants