本文整理汇总了Python中sunpy.database.tables.entries_from_query_result函数的典型用法代码示例。如果您正苦于以下问题:Python entries_from_query_result函数的具体用法?Python entries_from_query_result怎么用?Python entries_from_query_result使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了entries_from_query_result函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_entry_from_query_results_with_none_wave_and_default_unit
def test_entry_from_query_results_with_none_wave_and_default_unit(
qr_with_none_waves):
entries = list(entries_from_query_result(qr_with_none_waves, 'nm'))
assert len(entries) == 4
assert entries == [
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/HK/121222_1.H01',
observation_time_start=datetime(2012, 12, 23, 23, 59, 3),
observation_time_end=datetime(2012, 12, 24, 23, 59, 2),
instrument='VIRGO', size=155.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/LOI/121224_1.L01',
observation_time_end=datetime(2012, 12, 24, 23, 59, 2),
observation_time_start=datetime(2012, 12, 23, 23, 59, 3),
instrument='VIRGO', size=329.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/SPM/121222_1.S02',
observation_time_start=datetime(2012, 12, 23, 23, 59, 3),
observation_time_end=datetime(2012, 12, 24, 23, 59, 2),
instrument='VIRGO', size=87.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/DIARAD/121222_1.D01',
observation_time_start=datetime(2012, 12, 24, 0, 1, 58),
observation_time_end=datetime(2012, 12, 25, 0, 1, 57),
instrument='VIRGO', size=14.0, wavemin=None,
wavemax=None)]
开发者ID:bwgref,项目名称:sunpy,代码行数:33,代码来源:test_tables.py
示例2: vso_session
def vso_session():
client = vso.VSOClient()
qr = client.query(vso.attrs.Time((2011, 9, 20, 1), (2011, 9, 20, 2)), vso.attrs.Instrument("RHESSI"))
entries = tables.entries_from_query_result(qr)
database = Database("sqlite:///:memory:")
for entry in entries:
database.add(entry)
database.commit()
return database.session
开发者ID:ericmjonas,项目名称:sunpy,代码行数:9,代码来源:test_attrs.py
示例3: test_entries_from_query_result
def test_entries_from_query_result(query_result):
entries = list(entries_from_query_result(query_result))
assert len(entries) == 122
snd_entry = entries[1]
expected_entry = DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/eit/lz/2001/01/efz20010101.070014',
observation_time_start=datetime(2001, 1, 1, 7, 0, 14),
observation_time_end=datetime(2001, 1, 1, 7, 0, 21),
instrument='EIT', size=2059.0, wavemin=17.1, wavemax=17.1)
assert snd_entry == expected_entry
开发者ID:ChrisIAm101,项目名称:sunpy,代码行数:11,代码来源:test_tables.py
示例4: vso_session
def vso_session():
client = vso.VSOClient()
qr = client.query(
vso.attrs.Time('20110608T235955', '2011-06-09'),
vso.attrs.Instrument('aia'))
entries = tables.entries_from_query_result(qr)
database = Database('sqlite:///:memory:')
for entry in entries:
database.add(entry)
database.commit()
return database.session
开发者ID:examon,项目名称:sunpy,代码行数:11,代码来源:test_attrs.py
示例5: add_from_vso_query_result
def add_from_vso_query_result(self, query_result,
ignore_already_added=False):
"""Generate database entries from a VSO query result and add all the
generated entries to this database.
Parameters
----------
query_result : sunpy.net.vso.vso.QueryResponse
A VSO query response that was returned by the ``query`` method of a
:class:`sunpy.net.vso.VSOClient` object.
ignore_already_added : bool
See :meth:`sunpy.database.Database.add`.
"""
self.add_many(
tables.entries_from_query_result(
query_result, self.default_waveunit),
ignore_already_added)
开发者ID:Punyaslok,项目名称:sunpy,代码行数:19,代码来源:database.py
示例6: test_entry_from_query_results_with_none_wave
def test_entry_from_query_results_with_none_wave(qr_with_none_waves):
# does not raise WaveunitNotFoundError because neither wavemin nor wavemax
# are given
list(entries_from_query_result(qr_with_none_waves))
开发者ID:ChrisIAm101,项目名称:sunpy,代码行数:4,代码来源:test_tables.py
示例7: test_entry_from_query_results_with_none_wave_and_default_unit
def test_entry_from_query_results_with_none_wave_and_default_unit(
qr_with_none_waves):
entries = list(entries_from_query_result(qr_with_none_waves, 'nm'))
assert len(entries) == 10
expected = [
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/HK/121222_1.H01',
observation_time_start=datetime(2012, 12, 23, 23, 59, 3),
observation_time_end=datetime(2012, 12, 24, 23, 59, 2),
instrument='VIRGO', size=155.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/LOI/121224_1.L01',
observation_time_end=datetime(2012, 12, 24, 23, 59, 2),
observation_time_start=datetime(2012, 12, 23, 23, 59, 3),
instrument='VIRGO', size=329.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/SPM/121222_1.S02',
observation_time_start=datetime(2012, 12, 23, 23, 59, 3),
observation_time_end=datetime(2012, 12, 24, 23, 59, 2),
instrument='VIRGO', size=87.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/level1/1212/DIARAD/121222_1.D01',
observation_time_start=datetime(2012, 12, 24, 0, 1, 58),
observation_time_end=datetime(2012, 12, 25, 0, 1, 57),
instrument='VIRGO', size=14.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/sph/VIRGO_D4.2_SPH_960411_120914.tar.gz',
observation_time_start=datetime(1996, 4, 11, 0, 0),
observation_time_end=datetime(2012, 9, 14, 0, 0),
instrument='VIRGO', size=512000.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/spm/SPM_blue_intensity_series.tar.gz',
observation_time_start=datetime(1996, 4, 11, 0, 0),
observation_time_end=datetime(2014, 3, 30, 23, 59),
instrument='VIRGO', size=32652.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/spm/SPM_green_intensity_series.tar.gz',
observation_time_start=datetime(1996, 4, 11, 0, 0),
observation_time_end=datetime(2014, 3, 30, 23, 59),
instrument='VIRGO', size=32652.0, wavemin=None,
wavemax=None),
DatabaseEntry(
source='SOHO', provider='SDAC', physobs='intensity',
fileid='/archive/soho/private/data/processed/virgo/spm/SPM_red_intensity_series.tar.gz',
observation_time_start=datetime(1996, 4, 11, 0, 0),
observation_time_end=datetime(2014, 3, 30, 23, 59),
instrument='VIRGO', size=32652.0, wavemin=None,
wavemax=None)]
for e in expected:
assert e in entries
开发者ID:Cadair,项目名称:sunpy,代码行数:64,代码来源:test_tables.py
注:本文中的sunpy.database.tables.entries_from_query_result函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论