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

Minor fix for apply_shifts and demo.m #17

Merged
merged 3 commits into from
May 17, 2018

Conversation

ingiehong
Copy link

Hi Eftychios, thanks again for the great work!
I find that in apply_shifts, I need an additional line setting up Xq/Yq/Zq when using 'fft'.
Another occasional problem I encountered when using NoRMCorre was that with images that have significant numbers of negative value pixels, the fft registration would produce global phase differences of pi or -pi, and in result, invert the images in terms of pixel intensity. A simple fix to this (I haven't fully explored whether this is a bug or an inevitable result of fft-based registration) is to ensure all pixels are non-negative at start. You had commented this out some time ago, I simply reinstated it. Hope this helps.
Cheers!
-Ingie

@epnev
Copy link
Contributor

epnev commented May 17, 2018

Thanks for this. I'm surprised about the negative values. Another option that I used to have inside the motion correction functions was to subtract and then add back the minimum value to ensure that no problems arise. I'll think about putting it back.

@epnev epnev merged commit ee6c90c into flatironinstitute:master May 17, 2018
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