xpcs_timepixel_old_version.py 文件源码

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

项目:chxanalys 作者: yugangzhang 项目源码 文件源码
def histogram_xyt( x, y, t, binstep=100, detx=256, dety=256  ):
    '''x: coordinate-x
       y: coordinate-y
       t: photon hit time

       bin t in binstep (in t unit) period

    '''    
    L= np.max( (t-t[0])//binstep ) + 1
    arr = np.ravel_multi_index( [x, y, (t-t[0])//binstep ], [detx, dety,L ]    )
    M,N = arr.max(),arr.min()
    da = np.zeros( [detx, dety, L ]  )
    da.flat[np.arange(N,  M  ) ] = np.bincount( arr- N  )
    return da

######################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号