online_wavelet_analysis.py 文件源码

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

项目:wavelet-denoising 作者: mackaiver 项目源码 文件源码
def create_cube(self, points):
        t, alt, az = points.T

        alt = alt.astype(np.float)
        az = az.astype(np.float)

        _, x_edges, y_edges = np.histogram2d(
                    alt,
                    az,
                    bins=self.bins,
                    range=self.bin_range
        )

        slices = []
        timestamps = []
        for indeces in np.array_split(np.arange(0, len(points)), self.slices_per_cube):
            timestamps.append(t[indeces][0])
            H, _, _ = np.histogram2d(
                            alt[indeces],
                            az[indeces],
                            bins=[x_edges, y_edges],
                            range=self.bin_range)
            slices.append(H)

        slices = np.array(slices)
        timestamps = np.array(timestamps)

        return timestamps, slices
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号