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

Add tests for dynamic_mask and remove usage of numpy.where #185

Merged
merged 4 commits into from
Aug 1, 2023

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Jul 25, 2023

This PR adds some basic unit tests for dynamic_mask and improves performance by removing use of np.where calls on binary masks and instead uses the masks directly (local testing shows the new code takes ~30% the time).

Regtest run with these changes show no errors:
https://plwishmaster.stsci.edu:8081/blue/organizations/jenkins/RT%2FJWST-Developers-Pull-Requests/detail/JWST-Developers-Pull-Requests/812/pipeline/123

Checklist

  • added entry in CHANGES.rst (either in Bug Fixes or Changes to API)
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03% ⚠️

Comparison is base (308f828) 64.04% compared to head (746546c) 64.01%.
Report is 1 commits behind head on master.

❗ Current head 746546c differs from pull request most recent head 1abd64e. Consider uploading reports for the commit 1abd64e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
- Coverage   64.04%   64.01%   -0.03%     
==========================================
  Files         101      101              
  Lines        5562     5558       -4     
==========================================
- Hits         3562     3558       -4     
  Misses       2000     2000              
Files Changed Coverage Δ
src/stdatamodels/dynamicdq.py 100.00% <100.00%> (ø)

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

@braingram braingram marked this pull request as ready for review July 26, 2023 13:29
@braingram braingram requested a review from a team as a code owner July 26, 2023 13:29
@braingram braingram merged commit f893049 into spacetelescope:master Aug 1, 2023
14 checks passed
@braingram braingram deleted the dynamicdq branch August 1, 2023 12:39
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.

2 participants