当前位置: 首页>>代码示例>>Python>>正文


Python Apex.mlt2mlon方法代码示例

本文整理汇总了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)
开发者ID:cmeeren,项目名称:apexpy,代码行数:10,代码来源:test_Apex.py

示例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)
开发者ID:cmeeren,项目名称:apexpy,代码行数:10,代码来源:test_Apex.py

示例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)
开发者ID:cmeeren,项目名称:apexpy,代码行数:9,代码来源:test_Apex.py

示例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))
开发者ID:cmeeren,项目名称:apexpy,代码行数:5,代码来源:test_Apex.py

示例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)
开发者ID:cmeeren,项目名称:apexpy,代码行数:7,代码来源:test_Apex.py

示例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)
开发者ID:cmeeren,项目名称:apexpy,代码行数:5,代码来源:test_Apex.py

示例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)
开发者ID:cmeeren,项目名称:apexpy,代码行数:6,代码来源:test_Apex.py

示例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
开发者ID:cmeeren,项目名称:apexpy,代码行数:7,代码来源:test_Apex.py

示例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))
开发者ID:cmeeren,项目名称:apexpy,代码行数:6,代码来源:test_Apex.py

示例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])
开发者ID:cmeeren,项目名称:apexpy,代码行数:6,代码来源:test_Apex.py


注:本文中的apexpy.Apex.mlt2mlon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。