block.py 文件源码

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

项目:bifrost 作者: ledatelescope 项目源码 文件源码
def calculate_bin_indices(
            self, tstart, tsamp, data_size):
        """Calculate the bin that each time sample should be
            added to
        @param[in] tstart Time of the first element (s)
        @param[in] tsamp Difference between the times of
            consecutive elements (s)
        @param[in] data_size Number of elements
        @return Which bin each sample is folded into
        """
        arrival_time = tstart + tsamp * np.arange(data_size)
        phase = np.fmod(arrival_time, self.period)
        return np.floor(phase / self.period * self.bins).astype(int)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号