% pubpixel edge detection
[wx wy] = ndgrid([-160:159]);
thet = pi/3;
wwx = wx*cos(thet)+wy*sin(thet);
wwy = -wx*sin(thet)+wy*cos(thet);
X = sinc(wwx./5.2).*sinc(wwy./3.3);
xmini = real(fftshift(fft2(fftshift(X(129:192,129:192)))));
xfull = real(fftshift(fft2(fftshift(X))));

