示例#1
0
def online_query(draw, instrument=online_instruments()):
    query = draw(instrument)

    if isinstance(query, a.Instrument) and query.value == 'eve':
        query &= a.Level(0)
    if isinstance(query, a.Instrument) and query.value == 'norh':
        query &= a.Wavelength(17 * u.GHz)

    return query
示例#2
0
文件: test_fido.py 项目: Cadair/sunpy
def online_query(draw, instrument=online_instruments()):
    query = draw(instrument)

    if isinstance(query, a.Instrument) and query.value == 'eve':
        query &= a.Level(0)
    if isinstance(query, a.Instrument) and query.value == 'norh':
        query &= a.Wavelength(17*u.GHz)

    return query
示例#3
0
def online_query(draw, instrument=online_instruments(), time=time_attr()):
    query = draw(instrument)
    # If we have AttrAnd then we don't have RHESSI
    if isinstance(query, a.Instrument) and query.value == 'rhessi':
        # Build a time attr which does not span a month.
        year = draw(st.integers(min_value=2003, max_value=2017))
        month = draw(st.integers(min_value=1, max_value=12))
        days = draw(st.integers(min_value=1, max_value=28))
        query = query & a.Time("{}-{}-01".format(year, month, days),
                               "{}-{}-{}".format(year, month, days))
    return query
示例#4
0
文件: test_fido.py 项目: bwgref/sunpy
def online_query(draw, instrument=online_instruments(), time=time_attr()):
    query = draw(instrument)
    # If we have AttrAnd then we don't have RHESSI
    if isinstance(query, a.Instrument) and query.value == 'rhessi':
        # Build a time attr which does not span a month.
        year = draw(st.integers(min_value=2003, max_value=2017))
        month = draw(st.integers(min_value=1, max_value=12))
        days = draw(st.integers(min_value=1, max_value=28))
        query = query & a.Time("{}-{}-01".format(year, month, days),
                               "{}-{}-{}".format(year, month, days))
    return query