def test_dataproduct_type(self): results = search(CADC_SIA_URL, data_type='image', maxrec=5) assert len(results) == 5 for rr in results: assert rr.dataproduct_type == 'image'
def test_collection(self): results = search(CADC_SIA_URL, collection='CFHT', maxrec=5) assert len(results) == 5 for rr in results: assert rr.obs_collection == 'CFHT'
def test_instrument(self): results = search(CADC_SIA_URL, instrument='SCUBA-2', maxrec=5) assert len(results) == 5 for rr in results: assert rr.instrument_name == 'SCUBA-2'
def test_timeres(self): results = search(CADC_SIA_URL, timeres=(1, 2), maxrec=5) assert len(results) == 5 for rr in results: assert 1 * u.second <= rr.t_resolution <= 2 * u.second
def test_facility(self): results = search(CADC_SIA_URL, facility='JCMT', maxrec=5) assert len(results) == 5 for rr in results: assert rr.facility_name == 'JCMT'
def test_spatial_res(self): results = search(CADC_SIA_URL, spatial_resolution=(1, 2), maxrec=5) assert len(results) == 5 for rr in results: assert 1 * u.arcsec <= rr.s_resolution <= 2 * u.arcsec
def test_exptime(self): results = search(CADC_SIA_URL, exptime=(1, 2), maxrec=5) assert len(results) == 5 for rr in results: assert 1 * u.second <= rr.t_exptime <= 2 * u.second
def test_fov(self): results = search(CADC_SIA_URL, field_of_view=(10, 20), maxrec=5) assert len(results) == 5
def test_pol(self): results = search(CADC_SIA_URL, pol=['YY', 'U'], maxrec=5) assert len(results) == 5 for rr in results: assert 'YY' in rr.pol_states or 'U' in rr.pol_states
def test_time(self): results = search(CADC_SIA_URL, time=('2002-01-01T00:00:00.00', '2002-01-02T00:00:00.00'), maxrec=5) assert len(results) == 5
def test_band(self): results = search(CADC_SIA_URL, band=(0.0002, 0.0003), maxrec=5) # TODO - correctness assert len(results) == 5
def test_search(): results = search('https://example.com/sia', pos=(33.3 * u.deg, 4.2 * u.deg, 0.0166 * u.deg)) result = results[0] _test_result(result)