本文整理汇总了Python中apexpy.Apex.basevectors_qd方法的典型用法代码示例。如果您正苦于以下问题:Python Apex.basevectors_qd方法的具体用法?Python Apex.basevectors_qd怎么用?Python Apex.basevectors_qd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apexpy.Apex
的用法示例。
在下文中一共展示了Apex.basevectors_qd方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_basevectors_qd_vectorization
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import basevectors_qd [as 别名]
def test_basevectors_qd_vectorization():
A = Apex(date=2000, refh=300)
ret = A.basevectors_qd([60, 60, 60, 60], 15, 100, coords='geo')
for r in ret:
assert r.shape == (2, 4)
ret = A.basevectors_qd(60, [15, 15, 15, 15], 100, coords='geo')
for r in ret:
assert r.shape == (2, 4)
ret = A.basevectors_qd(60, 15, [100, 100, 100, 100], coords='geo')
for r in ret:
assert r.shape == (2, 4)
示例2: test_basevectors_qd_array
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import basevectors_qd [as 别名]
def test_basevectors_qd_array():
A = Apex(date=2000, refh=300)
f1, f2 = A.basevectors_qd([0, 30], 15, 100, coords='geo')
f1_lat0, f2_lat0 = A._basevec(0, 15, 100)
f1_lat30, f2_lat30 = A._basevec(30, 15, 100)
assert_allclose(f1[:, 0], f1_lat0)
assert_allclose(f2[:, 0], f2_lat0)
assert_allclose(f1[:, 1], f1_lat30)
assert_allclose(f2[:, 1], f2_lat30)
示例3: test_basevectors_qd_scalar_qd
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import basevectors_qd [as 别名]
def test_basevectors_qd_scalar_qd():
A = Apex(date=2000, refh=300)
glat, glon, _ = A.qd2geo(60, 15, 100, precision=1e-2)
assert_allclose(A.basevectors_qd(60, 15, 100, coords='qd', precision=1e-2), A._basevec(glat, glon, 100))
示例4: test_basevectors_qd_scalar_shape
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import basevectors_qd [as 别名]
def test_basevectors_qd_scalar_shape():
A = Apex(date=2000, refh=300)
ret = A.basevectors_qd(60, 15, 100)
for r in ret:
assert r.shape == (2,)
示例5: test_basevectors_qd_scalar_geo
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import basevectors_qd [as 别名]
def test_basevectors_qd_scalar_geo():
A = Apex(date=2000, refh=300)
assert_allclose(A.basevectors_qd(60, 15, 100, coords='geo'), A._basevec(60, 15, 100))