本文整理汇总了Python中apexpy.Apex.map_to_height方法的典型用法代码示例。如果您正苦于以下问题:Python Apex.map_to_height方法的具体用法?Python Apex.map_to_height怎么用?Python Apex.map_to_height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apexpy.Apex
的用法示例。
在下文中一共展示了Apex.map_to_height方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_map_to_height_ApexHeightError
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import map_to_height [as 别名]
def test_map_to_height_ApexHeightError():
A = Apex(date=2000, refh=300)
with pytest.raises(ApexHeightError):
A.map_to_height(0, 15, 100, 10000)
示例2: test_map_to_height_vectorization
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import map_to_height [as 别名]
def test_map_to_height_vectorization():
A = Apex(date=2000, refh=300)
assert_allclose(A.map_to_height([60, 60], 15, 100, 100), ([60]*2, [15]*2, [3.4150946248701075e-6]*2), rtol=1e-5)
assert_allclose(A.map_to_height(60, [15, 15], 100, 100), ([60]*2, [15]*2, [3.4150946248701075e-6]*2), rtol=1e-5)
assert_allclose(A.map_to_height(60, 15, [100, 100], 100), ([60]*2, [15]*2, [3.4150946248701075e-6]*2), rtol=1e-5)
assert_allclose(A.map_to_height(60, 15, 100, [100, 100]), ([60]*2, [15]*2, [3.4150946248701075e-6]*2), rtol=1e-5)
示例3: test_map_to_height_same_height
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import map_to_height [as 别名]
def test_map_to_height_same_height():
A = Apex(date=2000, refh=300)
assert_allclose(A.map_to_height(60, 15, 100, 100, conjugate=False, precision=1e-10), (60, 15, 3.4150946248701075e-6), rtol=1e-5)
示例4: test_map_to_height_conjugate
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import map_to_height [as 别名]
def test_map_to_height_conjugate():
A = Apex(date=2000, refh=300)
assert_allclose(A.map_to_height(60, 15, 100, 10000, conjugate=True, precision=1e-10), (-25.424892425537109, 27.310417175292969, 1.2074182222931995e-6))
assert_allclose(A.map_to_height(30, 170, 100, 500, conjugate=True, precision=1e-2), (-13.76642894744873, 164.24259948730469, 0.00056820799363777041))
示例5: test_map_to_height
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import map_to_height [as 别名]
def test_map_to_height():
A = Apex(date=2000, refh=300)
assert_allclose(A.map_to_height(60, 15, 100, 10000, conjugate=False, precision=1e-10), (31.841459274291992, 17.916629791259766, 0))
assert_allclose(A.map_to_height(30, 170, 100, 500, conjugate=False, precision=1e-2), (25.727252960205078, 169.60546875, 0.00017655163537710905))