test_statistics.py 文件源码

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

项目:pswalker 作者: slaclab 项目源码 文件源码
def test_beam_statistics(RE, resize, kernel, uint_mode, thresh_mode, min_area,
                         thresh_factor, filter_kernel, image_num, cent_num,
                         image_delay, ad_data, image_data,
                         lcls_two_bounce_system):
    _, _, _, y1, y2 = lcls_two_bounce_system
    array_str = "image1.array_data"
    size_str = "image1.array_size"

    def test_plan():
        stats = yield from beam_statistics(
            [y1, y2], array_field=array_str, size_field=size_str,
            cent_num=cent_num, image_num=image_num,
            kernel=kernel, resize=resize, uint_mode=uint_mode,
            thresh_factor=thresh_factor, filter_kernel=filter_kernel,
            thresh_mode=thresh_mode, md="all", image_delay=image_delay,
            ad_data=ad_data, image_data=image_data)

        for _, det in stats.items():
            for key, val in det.items():
                if key == "md":
                    continue
                assert(not np.isnan(val) or not np.isinf(val) or not None)

    RE(run_wrapper(test_plan()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号