Skip to content

Conversation

@WilliamJamieson
Copy link
Collaborator

@WilliamJamieson WilliamJamieson commented Sep 30, 2025

Closes #709

As noted in the closed issue it makes more sense for these schemas to explicitly define entries for each of the optical elements via a definition rather than using a patternProperties argument. This PR is based off #630 to incorporate those changes cleanly into this.

RDM PR: spacetelescope/roman_datamodels#577

Tasks

  • Update or add relevant rad tests.
  • Update relevant docstrings and / or docs/ page.
  • Does this PR change any schema files?
    • Schema changes were discussed at RAD Review Board meeting.
  • Does this PR change any API used downstream? (If not, label with no-changelog-entry-needed.)
News fragment change types:
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.19%. Comparing base (58eb8dd) to head (bbf3348).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
- Coverage   97.76%   89.19%   -8.57%     
==========================================
  Files           8       14       +6     
  Lines         759     1037     +278     
==========================================
+ Hits          742      925     +183     
- Misses         17      112      +95     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

$ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/wfi_img_photom-1.3.0#/definitions/empty_phot_table_entry
NOT_CONFIGURED:
$ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/wfi_img_photom-1.3.0#/definitions/empty_phot_table_entry
required:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have confirmation from RTB that every new reference file will contain all of these items (same for the other new required added in this PR)?

data:
type: object
patternProperties:
"^(F062|F087|F106|F129|F146|F158|F184|F213|GRISM|PRISM|DARK)$":
Copy link
Collaborator

Choose a reason for hiding this comment

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

I find this format easier to follow.

If there is a want to make some of these required we can update the builder in rdm to handle this as there's nothing else preventing us from adding required here (it's supported by asdf and jsonschema).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not. But that is my opinion.

Currently all the published reference files have all of these in place so I see no reason not to require them.

@schlafly
Copy link
Collaborator

I'll defer to you about what structure makes the most sense. Re what should be required and what shouldn't...

  • AB/Vega: this makes conceptual sense for the normal imaging bands. We can construct definitions that make sense for grism / prism. For dark it's hard to imagine a useful definition. The pipeline doesn't use these today but may need them for the imaging bands, and we don't foresee it ever needing them for grism / prism / dark.
  • apcorr: basically the same situation as for ab/vega. The pipeline does use these as part of computing source catalogs. That should never happen on grism / prism / dark data in operations.
  • phot: here RTB has started populating grism / prism / grism_0 bandpasses. This is more of an effort to centralize & version filter information than it is to aid operations; we don't expect to use these. I don't know what to do with dark here; I guess all zeros makes sense conceptually, or maybe something that incorporates some stray light (???) but it doesn't seem to me that we would use it.

I think we could treat some of these things as "it's nice to have these for some kind of tests that things exist for all of the optical elements", but I don't think we should requires these scientifically. Requiring grism / prism / grism_0 in phot could serve as a check that RTB continues to populate these in the future; the community could come to depend on them. But we don't use them and the pipeline should run without them.

@WilliamJamieson WilliamJamieson force-pushed the explicit_pattern_properties branch from e9fc715 to bbf3348 Compare October 16, 2025 13:52
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.

Make the pattern properties in Ref Files explicit.

3 participants