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


Python DatabaseEntry._from_query_result_block方法代码示例

本文整理汇总了Python中sunpy.database.tables.DatabaseEntry._from_query_result_block方法的典型用法代码示例。如果您正苦于以下问题:Python DatabaseEntry._from_query_result_block方法的具体用法?Python DatabaseEntry._from_query_result_block怎么用?Python DatabaseEntry._from_query_result_block使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sunpy.database.tables.DatabaseEntry的用法示例。


在下文中一共展示了DatabaseEntry._from_query_result_block方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_entry_from_qr_block_with_missing_physobs

# 需要导入模块: from sunpy.database.tables import DatabaseEntry [as 别名]
# 或者: from sunpy.database.tables.DatabaseEntry import _from_query_result_block [as 别名]
def test_entry_from_qr_block_with_missing_physobs(qr_block_with_missing_physobs):
    entry = DatabaseEntry._from_query_result_block(qr_block_with_missing_physobs)
    expected_entry = DatabaseEntry(
        source='STEREO_A', provider='SSC',
        fileid='swaves/2013/swaves_average_20130805_a_hfr.dat',
        observation_time_start=datetime(2013, 8, 5),
        observation_time_end=datetime(2013, 8, 6), instrument='SWAVES',
        size=3601.08, wavemin=2398339664000.0, wavemax=18737028625.0)
    assert entry == expected_entry
开发者ID:ChrisIAm101,项目名称:sunpy,代码行数:11,代码来源:test_tables.py

示例2: test_entry_from_qr_block

# 需要导入模块: from sunpy.database.tables import DatabaseEntry [as 别名]
# 或者: from sunpy.database.tables.DatabaseEntry import _from_query_result_block [as 别名]
def test_entry_from_qr_block(query_result):
    entry = DatabaseEntry._from_query_result_block(query_result[0])
    expected_entry = DatabaseEntry(
        source='SOHO', provider='SDAC', physobs='intensity',
        fileid='/archive/soho/private/data/processed/eit/lz/2001/01/efz20010101.010014',
        observation_time_start=datetime(2001, 1, 1, 1, 0, 14),
        observation_time_end=datetime(2001, 1, 1, 1, 0, 21),
        instrument='EIT', size=2059.0, wavemin=17.1, wavemax=17.1)
    assert entry == expected_entry
开发者ID:ChrisIAm101,项目名称:sunpy,代码行数:11,代码来源:test_tables.py

示例3: test_entry_from_qr_block_kev

# 需要导入模块: from sunpy.database.tables import DatabaseEntry [as 别名]
# 或者: from sunpy.database.tables.DatabaseEntry import _from_query_result_block [as 别名]
def test_entry_from_qr_block_kev(qr_block_with_kev_unit):
    # See issue #766.
    entry = DatabaseEntry._from_query_result_block(qr_block_with_kev_unit)
    assert entry.source == 'RHESSI'
    assert entry.provider == 'LSSP'
    assert entry.fileid == '/hessidata/2011/09/20/hsi_20110920_010920'
    assert entry.observation_time_start == datetime(2011, 9, 20, 1, 9, 20)
    assert entry.observation_time_end == datetime(2011, 9, 20, 2, 27, 40)
    assert entry.instrument == 'RHESSI'
    assert entry.size == -1
    assert round(entry.wavemin, 3) == 0.413
    assert round(entry.wavemax, 7) == 0.0000729
开发者ID:ChrisIAm101,项目名称:sunpy,代码行数:14,代码来源:test_tables.py

示例4: test_entry_from_qr_block_kev

# 需要导入模块: from sunpy.database.tables import DatabaseEntry [as 别名]
# 或者: from sunpy.database.tables.DatabaseEntry import _from_query_result_block [as 别名]
def test_entry_from_qr_block_kev(qr_block_with_kev_unit):
    # See issue #766.
    entry = DatabaseEntry._from_query_result_block(qr_block_with_kev_unit)
    assert entry.source == 'RHESSI'
    assert entry.provider == 'LSSP'
    # TODO: Flaky test that needs a fix
    assert entry.fileid in ['/hessidata/2011/09/19/hsi_20110919_233340',
                            '/hessidata/2011/09/20/hsi_20110920_010920']
    assert entry.observation_time_start in [datetime(2011, 9, 20, 1, 9, 20),
                                            datetime(2011, 9, 19, 23, 33, 40)]
    assert entry.observation_time_end in [datetime(2011, 9, 20, 2, 27, 40),
                                          datetime(2011, 9, 20, 1, 9, 20)]
    assert entry.instrument == 'RHESSI'
    assert round(entry.wavemin, 3) == 0.413
    assert round(entry.wavemax, 7) == 0.0000729
开发者ID:Cadair,项目名称:sunpy,代码行数:17,代码来源:test_tables.py


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