本文整理汇总了Python中apexpy.Apex._basevec方法的典型用法代码示例。如果您正苦于以下问题:Python Apex._basevec方法的具体用法?Python Apex._basevec怎么用?Python Apex._basevec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apexpy.Apex
的用法示例。
在下文中一共展示了Apex._basevec方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test__basevec_longitude
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _basevec [as 别名]
def test__basevec_longitude():
A = Apex(date=2000, refh=300)
assert_allclose(A._basevec(60, 180, 100), fa.apxg2q(60, 180, 100, 1)[2:4])
assert_allclose(A._basevec(60, -180, 100), fa.apxg2q(60, -180, 100, 1)[2:4])
assert_allclose(A._basevec(60, -180, 100), A._basevec(60, 180, 100))
for i in range(-5, 5):
for lat in [0, 30, 60, 90]:
assert_allclose(A._basevec(lat, 15+i*360, 100), fa.apxg2q(lat, 15, 100, 1)[2:4])
示例2: test_basevectors_qd_array
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _basevec [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__basevec_array
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _basevec [as 别名]
def test__basevec_array():
A = Apex(date=2000, refh=300)
f1s, f2s = A._basevec([[0, 30], [60, 90]], 15, [[100, 200], [300, 400]])
f11, f21 = fa.apxg2q(0, 15, 100, 1)[2:4]
f12, f22 = fa.apxg2q(30, 15, 200, 1)[2:4]
f13, f23 = fa.apxg2q(60, 15, 300, 1)[2:4]
f14, f24 = fa.apxg2q(90, 15, 400, 1)[2:4]
assert_allclose(f1s[0, 0], f11)
assert_allclose(f1s[0, 1], f12)
assert_allclose(f1s[1, 0], f13)
assert_allclose(f1s[1, 1], f14)
assert_allclose(f2s[0, 0], f21)
assert_allclose(f2s[0, 1], f22)
assert_allclose(f2s[1, 0], f23)
assert_allclose(f2s[1, 1], f24)
示例4: test_basevectors_qd_scalar_qd
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _basevec [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))
示例5: test_basevectors_qd_scalar_geo
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _basevec [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))
示例6: test__basevec_scalar
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _basevec [as 别名]
def test__basevec_scalar():
A = Apex(date=2000, refh=300)
for lat in [0, 30, 60, 89]:
for lon in [-179, -90, 0, 90, 180]:
assert_allclose(A._basevec(lat, lon, 100), fa.apxg2q(lat, lon, 100, 1)[2:4])