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