test_helper_functions.py 文件源码

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

项目:satpy 作者: pytroll 项目源码 文件源码
def test_get_geostationary_angle_extent(self):
        """Get max geostationary angles."""
        geos_area = mock.MagicMock()
        geos_area.proj_dict = {'a': 6378169.00,
                               'b': 6356583.80,
                               'h': 35785831.00}

        expected = (0.15185342867090912, 0.15133555510297725)

        np.testing.assert_allclose(expected,
                                   hf.get_geostationary_angle_extent(geos_area))

        geos_area.proj_dict = {'a': 1000.0,
                               'b': 1000.0,
                               'h': np.sqrt(2) * 1000.0 - 1000.0}

        expected = (np.deg2rad(45), np.deg2rad(45))

        np.testing.assert_allclose(expected,
                                   hf.get_geostationary_angle_extent(geos_area))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号