andykee / lentil

Heart-healthy physical optics
https://andykee.github.io/lentil/
Other
14 stars 6 forks source link

zernike_coordinates is not cropping to mask extent #8

Closed andykee closed 4 years ago

andykee commented 4 years ago

You would expect that a zernike mode is defined over the extent of the mask that is supplied, but that isn't exactly what's happening:

segmask = lentil.util.circle((256,256), 0.2*256, center=(0.2*256, -0.25*256))
seg_focus = lentil.zernike.zernike(segmask, 4)

image

The issue appears to be that zernike_coordinates is not taking the mask boundary in to account when computing rho/theta.

andykee commented 4 years ago

Resolved by 583ac6c