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

Prevent normcorre from failing if shifts are too large relative to patch size #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ehennestad
Copy link

@ehennestad ehennestad commented May 29, 2022

We have occasional failures when running NoRMCorre on very sparse data or data with occasional very large movements. The error happens in the remove_boundaries function, and this is a proposed workaround to prevent normcorre from aborting.

Sometimes the big movements are only present in a subset of frames and its better to have the corrected result with some frames being suboptimal than spending time debugging and trying to find a better grid size.

I added a warning whenever the shifts are to large relative to the grid_size, but this might mess up the command line, so maybe it should only be displayed once (i.e use a persistent variable to skip showing warning multiple times) or be connected to the verbosity levels.

ehennestad and others added 4 commits March 6, 2019 13:05
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.

1 participant