bragg_CDI_skewed_crystal3Dplot.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:CoherentXrayImaging 作者: susannahammarberg 项目源码 文件源码
def skew_3Dcrystal(crystal, theta):    
    #dx_filter = 1            
    crystal_skewed = np.zeros(( int(np.floor((crystal.shape[0]/np.cos(theta)))) + 50 , crystal.shape[1], crystal.shape[2] ), dtype=np.complex64)


    theta = 10*np.pi/180

    for i in range(0,crystal.shape[0]-6):
        for j in range(0,crystal.shape[1]-6):
            for k in range(0, crystal.shape[2]-6):

                zs = ceil(j / (1 + np.tan(theta)**2) + i*np.tan(theta)/ ( 1 + np.tan(theta)**2)  )
                ys = i
                xs = k
                crystal_skewed[zs,ys,xs] = crystal[i,j,k]
                #np.disp(crystal[i,j,k])
                #if crystal[i,j,k]


    crystal_filter2D_skewed = 1
    return (crystal_skewed,  crystal_filter2D_skewed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号