Repository navigation
Fixes for 2plane2chan tests while running on non-Linux operating systems - #1278
Open
joannercsheppard wants to merge 1 commit into
Open
joannercsheppard wants to merge 1 commit into
joannercsheppard wants to merge 1 commit into
Conversation
…or discrepancies in ROIs found in different operating systems
This branch has not been deployed
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.
While running tests for PR #1255 2plane2chan test_detection_output_2plane2chan fails on Windows due to discrepancies between the ROI shapes. On further inspection, this test does not use temporal_smoothing (the bug #1255 is fixing), and also fails on main. This PR makes detection regression tests tolerant of cross-platform differences.
Detection is not bit-identical across platforms (BLAS / float32 summation order), so pixels near the ROI threshold can flip. On macOS and Windows, one ROI in test_detection_output_2plane2chan loses 4 edge pixels, which also changes its neighbour's cell mask, and the exact np.allclose comparison fails on the shape mismatch (178 vs 176 pixels).
Both detection tests (for 1plane1chan and 2plane2chan) now use DetectionTestUtils.check_output, which requires:
cell mask, neuropil mask)