def skew_image():
image_skewed = np.zeros((image.shape[0], ceil((image.shape[1]/np.cos(theta)))+ 50 ))
for i in range(0,image.shape[0]):
for j in range(0,image.shape[1]):
xs = ceil(j / (1 + np.tan(theta)**2) + i*np.tan(theta)/ ( 1 + np.tan(theta)**2) )
#np.disp(xs)
ys = i
image_skewed[ys,xs] = image[i,j]
fft_image_skewed = fft.fftshift(fft.fft2(image_skewed))
return image_skewed, fft_image_skewed
# image in reciprocal space
#fft_image = fft.fftshift(fft.fft2(image))
# Create crystal: skewed and unskewed. 2D and 3D.
# create FFTs of these. Filter out one peak.
################################################
test_3dgauss_and_3d_plotting.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录