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-942: Remove Units from Reference File Datamodels #1474

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

PaulHuwe
Copy link
Collaborator

Resolves RCAL-942

Closes #1472

This PR removes units from reference file datamodels.

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 Oct 24, 2024

Codecov Report

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

Project coverage is 28.59%. Comparing base (c06bdec) to head (8b86bed).

Files with missing lines Patch % Lines
romancal/photom/photom.py 0.00% 4 Missing ⚠️
romancal/ramp_fitting/ramp_fit_step.py 0.00% 4 Missing ⚠️
romancal/dark_current/dark_current_step.py 0.00% 1 Missing ⚠️
romancal/saturation/saturation.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1474      +/-   ##
==========================================
- Coverage   28.60%   28.59%   -0.02%     
==========================================
  Files         112      112              
  Lines        7576     7576              
==========================================
- Hits         2167     2166       -1     
- Misses       5409     5410       +1     

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

@schlafly
Copy link
Collaborator

That looks good. Hopefully we will hear this afternoon on the status of making new unit-free ref files.

@PaulHuwe
Copy link
Collaborator Author

As expected, there are some failing regression files that need new reference files:
https://github.com/spacetelescope/RegressionTests/actions/runs/11490929350/job/31982499454

@PaulHuwe PaulHuwe marked this pull request as ready for review October 24, 2024 13:39
@PaulHuwe PaulHuwe requested a review from a team as a code owner October 24, 2024 13:39
@PaulHuwe PaulHuwe changed the title Initial commit RCAL-942: Remove Units from Reference File Datamodels Oct 24, 2024
@PaulHuwe PaulHuwe self-assigned this Jan 16, 2025
@PaulHuwe PaulHuwe requested a review from schlafly January 16, 2025 21:27
Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

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

This looks good. I left one comment about a stray comment inline. Let's merge once regression tests are passing with the new files.

romancal/photom/tests/test_photom.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mairanteodoro mairanteodoro left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@nden
Copy link
Collaborator

nden commented Jan 20, 2025

Latest regression tests:
https://github.com/spacetelescope/RegressionTests/actions/runs/12847539098

They show that the photom schema was changed so that the conversion factors are numbers but the photom files were not updated. I think it can go either way - either change the reference files or change the code in romancal. Was their a decision about the photom files? @PaulHuwe @schlafly @rcosenti-stsci

@schlafly
Copy link
Collaborator

Our intent was to remove the units from the photom files as well (no units in files to make them more archival). That would mean that @rcosenti-stsci would need to resubmit these files. I think that the schema looks correct and so this would not require any more work on the CRDS / release end. @PaulHuwe , @nden , does that match what you're thinking?

Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

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

I looked at the changes here again and they all look good. I am toying with the idea of merging it ~now so that at least unit tests start working again, in which case @PaulHuwe would follow up with a new PR if the regression tests require more work. Any reason not to do that?

@@ -23,8 +23,8 @@ dependencies = [
"photutils >=1.13.0",
"pyparsing >=2.4.7",
"requests >=2.26",
# "roman_datamodels>=0.22.0,<0.23.0",
"roman_datamodels @ git+https://github.com/spacetelescope/roman_datamodels.git",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there an advantage to this outside of a release? Should we point this back and the git version of roman_datamodels?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be changed by as soon as a rad/rdm change is made. I'd only keep this as is if we plan on making a romancal release immediately with these changes.

@WilliamJamieson WilliamJamieson mentioned this pull request Jan 21, 2025
10 tasks
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.

Remove Units from Reference File Datamodels
5 participants