本文整理汇总了Python中apexpy.Apex.mlt2mlon方法的典型用法代码示例。如果您正苦于以下问题:Python Apex.mlt2mlon方法的具体用法?Python Apex.mlt2mlon怎么用?Python Apex.mlt2mlon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apexpy.Apex
的用法示例。
在下文中一共展示了Apex.mlt2mlon方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mlt2mlon2mlt
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon2mlt():
A = Apex(date=2000, refh=300)
date = dt.datetime(2000, 2, 3, 4, 5, 6)
assert_allclose(A.mlt2mlon(A.mlon2mlt(0, date), date), 0)
assert_allclose(A.mlt2mlon(A.mlon2mlt(90, date), date), 90)
assert_allclose(A.mlt2mlon(A.mlon2mlt(180, date), date), 180)
assert_allclose(A.mlt2mlon(A.mlon2mlt(270, date), date), 270)
assert_allclose(A.mlt2mlon(A.mlon2mlt(360, date), date), 0)
示例2: test_mlon2mlt2mlon
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlon2mlt2mlon():
A = Apex(date=2000, refh=300)
date = dt.datetime(2000, 2, 3, 4, 5, 6)
assert_allclose(A.mlon2mlt(A.mlt2mlon(0, date), date), 0)
assert_allclose(A.mlon2mlt(A.mlt2mlon(6, date), date), 6)
assert_allclose(A.mlon2mlt(A.mlt2mlon(12, date), date), 12)
assert_allclose(A.mlon2mlt(A.mlt2mlon(18, date), date), 18)
assert_allclose(A.mlon2mlt(A.mlt2mlon(24, date), date), 0)
示例3: test_mlt2mlon_range
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon_range():
A = Apex(date=2000, refh=300)
assert_allclose(A.mlt2mlon(range(0, 25, 2), dt.datetime(2000, 2, 3, 4, 5, 6)),
[14.705551, 44.705551, 74.705551, 104.705551, 134.705551,
164.705551, 194.705551, 224.705551, 254.705551, 284.705551,
314.705551, 344.705551, 14.705551],
rtol=1e-4)
示例4: test_mlt2mlon_diffdates
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon_diffdates():
A = Apex(date=2000, refh=300)
assert A.mlt2mlon(0, dt.datetime(2000, 2, 3, 4, 5, 6)) != A.mlt2mlon(0, dt.datetime(2000, 2, 3, 5, 5, 6))
示例5: test_mlt2mlon_offset
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon_offset():
A = Apex(date=2000, refh=300)
date = dt.datetime(2000, 2, 3, 4, 5, 6)
assert_allclose(A.mlt2mlon(0, date), A.mlt2mlon(1, date) - 15)
assert_allclose(A.mlt2mlon(0, date), A.mlt2mlon(10, date) - 150)
示例6: test_mlt2mlon_2Darray
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon_2Darray():
A = Apex(date=2000, refh=300)
assert_allclose(A.mlt2mlon([[0, 12], [0, 12]], dt.datetime(2000, 2, 3, 4, 5, 6)), [[14.705551, 194.705551], [14.705551, 194.705551]], rtol=1e-4)
示例7: test_mlt2mlon_ssheight
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon_ssheight():
A = Apex(date=2000, refh=300)
mlt = A.mlt2mlon(0, dt.datetime(2000, 2, 3, 4, 5, 6), ssheight=50*2000)
assert_allclose(mlt, 14.599319458007812)
示例8: test_mlt2mlon_scalar
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_mlt2mlon_scalar():
A = Apex(date=2000, refh=300)
mlt = A.mlt2mlon(0, dt.datetime(2000, 2, 3, 4, 5, 6))
assert_allclose(mlt, 14.705551147460938)
assert type(mlt) != np.ndarray
示例9: test_convert_mlt2qd
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_convert_mlt2qd():
datetime = dt.datetime(2000, 3, 9, 14, 25, 58)
A = Apex(date=2000, refh=300)
assert_allclose(A.convert(60, 15, 'mlt', 'qd', height=100, datetime=datetime, ssheight=2e5), A.apex2qd(60, A.mlt2mlon(15, datetime, ssheight=2e5), height=100))
示例10: test_convert_mlt2geo
# 需要导入模块: from apexpy import Apex [as 别名]
# 或者: from apexpy.Apex import mlt2mlon [as 别名]
def test_convert_mlt2geo():
datetime = dt.datetime(2000, 3, 9, 14, 25, 58)
A = Apex(date=2000, refh=300)
assert_allclose(A.convert(60, 15, 'mlt', 'geo', height=100, datetime=datetime, precision=1e-2, ssheight=2e5), A.apex2geo(60, A.mlt2mlon(15, datetime, ssheight=2e5), 100, precision=1e-2)[:-1])