def test_vso_attribute_parse(): """Make sure that Parsing of VSO attributes from HEK queries is accurate""" h = hek.HEKClient() hek_query = h.search(hekTime, hekEvent) vso_query = hek2vso.vso_attribute_parse(hek_query[0]) # Checking Time # TODO # Checking Observatory assert vso_query[1].value == hek_query[0]['obs_observatory'] # Checking Instrument assert vso_query[2].value == hek_query[0]['obs_instrument'] # Checking Wavelength assert vso_query[3].min == hek_query[0]['obs_meanwavel'] * u.Unit(hek_query[0]['obs_wavelunit']) assert vso_query[3].max == hek_query[0]['obs_meanwavel'] * u.Unit( hek_query[0]['obs_wavelunit']) assert vso_query[3].unit == u.Unit('Angstrom')
def test_vso_attribute_parse(): """Make sure that Parsing of VSO attributes from HEK queries is accurate""" h = hek.HEKClient() hek_query = h.query(hekTime, hekEvent) vso_query = hek2vso.vso_attribute_parse(hek_query[0]) # Cheking Time # TODO # Checking Observatory assert vso_query[1].value == hek_query[0]['obs_observatory'] # Checking Instrument assert vso_query[2].value == hek_query[0]['obs_instrument'] # Checking Wavelength assert vso_query[3].min == hek_query[0]['obs_meanwavel'] * u.Unit( hek_query[0]['obs_wavelunit']) assert vso_query[3].max == hek_query[0]['obs_meanwavel'] * u.Unit( hek_query[0]['obs_wavelunit']) assert vso_query[3].unit == u.Unit('Angstrom')
def test_vso_attribute_parse(hek_client): """Make sure that Parsing of VSO attributes from HEK queries is accurate""" h = hek_client hek_query = h.search(hekTime, hekEvent) vso_query = hek2vso.vso_attribute_parse(hek_query[0]) # Checking Time assert vso_query[0].start == parse_time(hek_query[0]["event_starttime"]) assert vso_query[0].end == parse_time(hek_query[0]["event_endtime"]) # Checking Observatory assert vso_query[1].value == hek_query[0]["obs_observatory"] # Checking Instrument assert vso_query[2].value == hek_query[0]["obs_instrument"] # Checking Wavelength assert vso_query[3].min == hek_query[0]["obs_meanwavel"] * u.Unit( hek_query[0]["obs_wavelunit"]) assert vso_query[3].max == hek_query[0]["obs_meanwavel"] * u.Unit( hek_query[0]["obs_wavelunit"]) assert vso_query[3].unit == u.Unit("Angstrom")
def test_vso_attribute_parse(hek_client): """Make sure that Parsing of VSO attributes from HEK queries is accurate""" h = hek_client hek_query = h.search(hekTime, hekEvent) vso_query = hek2vso.vso_attribute_parse(hek_query[0]) # Checking Time assert vso_query[0].start == parse_time(hek_query[0]["event_starttime"]) assert vso_query[0].end == parse_time(hek_query[0]["event_endtime"]) # Checking Observatory assert vso_query[1].value == hek_query[0]["obs_observatory"] # Checking Instrument assert vso_query[2].value == hek_query[0]["obs_instrument"] # Checking Wavelength assert vso_query[3].min == hek_query[0]["obs_meanwavel"] * u.Unit( hek_query[0]["obs_wavelunit"] ) assert vso_query[3].max == hek_query[0]["obs_meanwavel"] * u.Unit( hek_query[0]["obs_wavelunit"] ) assert vso_query[3].unit == u.Unit("Angstrom")