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

one pixel shift #147

Closed
wants to merge 6 commits into from
Closed

Conversation

shuliu2017
Copy link
Contributor

  1. Fix the one pixel offset bug.
    When padding a PSF with (odd, odd) dimension to (even, even) dimension, the center of the PSF should be placed to the center-right of the array. Otherwise the peak value could be shifted to the end of the array after applying np.fft.fftshift(e.g. Correct padding: [0,0,1,2,3,2,1,0] -> [3,2,1,0,0,0,1,2], Incorrect padding: [0,1,2,3,2,1,0,0] - > [2,1,0,0, 0,1,2,3]). This corresponds to a one pixel offset since the np.fft.fft assume the first component of the array as the origin.
  2. Add a test file for checking the pixel offset of the ZOGY D image.

@jdswinbank
Copy link
Contributor

Thank you for this, @shuliu2017! I'm closing this PR so that we can handle it on #148.

@jdswinbank jdswinbank closed this Mar 6, 2020
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.

None yet

2 participants