Harden raster/drift behavior and expand unit test coverage#1
Open
yszhang95 wants to merge 22 commits intoWireCell:masterfrom
Open
Harden raster/drift behavior and expand unit test coverage#1yszhang95 wants to merge 22 commits intoWireCell:masterfrom
yszhang95 wants to merge 22 commits intoWireCell:masterfrom
Conversation
Rename misleading private Raster helper to reflect the tail-time convention, and update the related test/docs references. Follow-up to 7a76267 (updated docstring for drifter; made plot of head+tail).
…tside the boundary, and external charges leak inside.
Refactor Added unit tests. Updated docstrings. Fixed potential bugs in depos.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new version tag is released with this PR.
This PR updates the drift and rasterization stack on top of
benchmark_playground, with the main code changes centered insrc/tred/graph.py,src/tred/raster/depos.py, andsrc/tred/raster/steps.py. The branch tightensdtypehandling across rasterization, fixes dtype-sensitive grid/index boundary behavior, and clarifies thetail/headdrift-timeconvention shared by
DrifterandRaster. It also improves depos coverage in1D and N-D paths, including zero-width and finite-width behavior, and makes
the raster compute dtype explicit and consistent.
A large part of the branch is test hardening and documentation.
tests/drift/was expanded and cleaned up arounddrift.pyandDrifter;tests/effq/was reworked to replace stale integral expectations with charge-recovery and backend-facing assertions; andtests/raster/is now explicitly documented as visualization-oriented smoke coverage around theDrifter/Rasterinteraction rather than strict numerical unit coverage. The READMEand test notes were also updated, along with
pyproject.tomldependencyorganization, to better reflect how the suites should be run.
Highlights
rasterization, and Raster.
boundaries.
current tail-time convention.
behavior.
Verification
Ran:
Result:
The warnings are
DeprecationWarningsfrom NumPy array conversion intests/effq/test_effq.py, not test failures.