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

Replace create_s_region with stcal's compute_s_region_keyword. #1493

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

mairanteodoro
Copy link
Collaborator

@mairanteodoro mairanteodoro commented Nov 4, 2024

Resolves RCAL-948

Partially resolves #1466

This PR updates romancal to reduce duplicate code by using stcal's compute_s_region_keyword().

Regression test

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

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.19%. Comparing base (1e8474c) to head (5b417f9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1493      +/-   ##
==========================================
- Coverage   76.20%   76.19%   -0.01%     
==========================================
  Files         115      115              
  Lines        7628     7626       -2     
==========================================
- Hits         5813     5811       -2     
  Misses       1815     1815              

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

@mairanteodoro mairanteodoro added this to the 25Q1_B16 milestone Nov 5, 2024
@mairanteodoro mairanteodoro marked this pull request as ready for review November 5, 2024 15:19
@mairanteodoro mairanteodoro requested a review from a team as a code owner November 5, 2024 15:19
@mairanteodoro
Copy link
Collaborator Author

Tagging @emolter since I can't find him on the list of reviewers.

Copy link
Contributor

@emolter emolter left a comment

Choose a reason for hiding this comment

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

LGTM

@schlafly
Copy link
Collaborator

schlafly commented Nov 6, 2024

Judging by the regtest changes, it looks like stcal's variant uses less precision. It looks like this is still ~3 uas, so I have trouble imagining we care about this accuracy for s_region. But is it known or expected that we changed the precision here?

@emolter
Copy link
Contributor

emolter commented Nov 6, 2024

Judging by the regtest changes, it looks like stcal's variant uses less precision. It looks like this is still ~3 uas, so I have trouble imagining we care about this accuracy for s_region. But is it known or expected that we changed the precision here?

See https://github.com/spacetelescope/stcal/blob/cb96233b3bf00dbd003c5652bd8c6b928857266b/src/stcal/alignment/util.py#L868
In the stcal version (ported from JWST) there's a constraint to 9 decimal places

@schlafly
Copy link
Collaborator

schlafly commented Nov 6, 2024

Thanks, okay. Then I'll treat this as expected and reasonable and approve, thanks!

@mairanteodoro mairanteodoro merged commit c068147 into spacetelescope:main Nov 6, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create_s_region, add_s_region, and create_footprint duplicate stcal functions
3 participants