本文整理汇总了Python中apexpy.Apex._geo2qd方法的典型用法代码示例。如果您正苦于以下问题:Python Apex._geo2qd方法的具体用法?Python Apex._geo2qd怎么用?Python Apex._geo2qd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apexpy.Apex
的用法示例。
在下文中一共展示了Apex._geo2qd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test__geo2qd_longitude
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _geo2qd [as 别名]
def test__geo2qd_longitude():
A = Apex(date=2000, refh=300)
assert_allclose(A._geo2qd(60, 180, 100), fa.apxg2q(60, 180, 100, 0)[:2])
assert_allclose(A._geo2qd(60, -180, 100), fa.apxg2q(60, -180, 100, 0)[:2])
assert_allclose(A._geo2qd(60, -180, 100), A._geo2qd(60, 180, 100))
for i in range(-5, 5):
for lat in [0, 30, 60, 90]:
assert_allclose(A._geo2qd(lat, 15+i*360, 100), fa.apxg2q(lat, 15, 100, 0)[:2])
示例2: test__geo2qd_array
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _geo2qd [as 别名]
def test__geo2qd_array():
A = Apex(date=2000, refh=300)
lats, lons = A._geo2qd([[0, 30], [60, 90]], 15, [[100, 200], [300, 400]])
lat1, lon1 = fa.apxg2q(0, 15, 100, 0)[:2]
lat2, lon2 = fa.apxg2q(30, 15, 200, 0)[:2]
lat3, lon3 = fa.apxg2q(60, 15, 300, 0)[:2]
lat4, lon4 = fa.apxg2q(90, 15, 400, 0)[:2]
assert_allclose(lats.astype(float), np.array([[lat1, lat2], [lat3, lat4]], dtype=float))
assert_allclose(lons.astype(float), np.array([[lon1, lon2], [lon3, lon4]], dtype=float))
示例3: test__geo2qd_scalar
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _geo2qd [as 别名]
def test__geo2qd_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._geo2qd(lat, lon, 100), fa.apxg2q(lat, lon, 100, 0)[:2])
示例4: test_geo2qd
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import _geo2qd [as 别名]
def test_geo2qd():
A = Apex(date=2000, refh=300)
lat, lon = A.geo2qd(60, 15, 100)
assert_allclose((lat, lon), A._geo2qd(60, 15, 100))
assert type(lat) != np.ndarray
assert type(lon) != np.ndarray