-
Notifications
You must be signed in to change notification settings - Fork 68
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
Possible parameter inversion in LearnTransform.Translation class #2005
Comments
hi @guoyang-github thanks for taking a look at this. For this (and your other helpful bug report) can you provide a permalink to the code you're describing? And in this case, can you show an example case where this produces unanticipated behavior within starfish examples or use-cases? |
hi berl, thanks for your reply.
For r: 0, Shift: [ 5.76 -22.81], Error: 0.6056388649515209 Here's another problem about the order of X, Y. According to the function's definition, Axis ordering should be consistent with the axis order of the input array for 'Shift'. So, Y = -4.34, X = -14.9 for r:3 as example. However, when I print transforms_list
tile indices: {<Axes.ROUND: 'r'>: 0} I obtained the swapped X, Y values. Refer to the code: https://github.com/spacetx/starfish/blob/master/starfish/core/image/_registration/transforms_list.py
Should the code be adjusted to:
Thanks. |
In the LearnTransform.Translation class of the newest starfish version, there's a segment of code where I think the parameters for 'reference_image' and 'moving_image' might have been swapped:
shift, error, phasediff = phase_cross_correlation(
reference_image=target_image.data,
moving_image=reference_image.data,
upsample_factor=self.upsampling
)
I suspect that based on the function's definition and typical usage patterns, the correct code should be:
shift, error, phasediff = phase_cross_correlation(
reference_image=reference_image.data,
moving_image=target_image.data,
upsample_factor=self.upsampling
)
Thanks for your attention to this matter.
The text was updated successfully, but these errors were encountered: