rhodricusack / diffeomorph

6 stars 12 forks source link

2 potential issues with the diffeomorph calculation #1

Closed heuristicwondering closed 5 years ago

heuristicwondering commented 5 years ago

Hi! I've been looking at your Time to wave good-bye to phase scrambling paper and I've noticed a couple potential issues with your calculation of the diffeomorphed coordinates on lines 141 and 142 but wanted to check my understanding before submitting a pull request.

First, according to formula (2) in your paper (which is missing a cosine maybe?) it seems that there are different random amplitude scalings (ai) chosen for each flow field calculation ( fi ). The value for ai used in both lines 141 and 142 are the same, should a also have a page subscript in the same way that your pi values do?

Second, you seem to be doing matrix multiplication on the matrices, but from my reading of the logic, is it perhaps an elementwise multiplication that's needed?

Thanks for any clarifications on this!

heuristicwondering commented 5 years ago

After communication with Dr. Cusack, it became clear that because the underlying matrices are meshgrids, and given the order they are multiplied in, matrix multiplication will only scale the flow field by the size of the (upsampled) image and not alter the direction of shifts. This along with the small difference in tied amplitudes does not create a noticeable difference in image warping.

Closing this issue.