コード例 #1
0
ファイル: test_fido.py プロジェクト: yashrsharma44/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
コード例 #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
ファイル: test_fido.py プロジェクト: DEVANSH99/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
コード例 #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