コード例 #1
0
 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'
コード例 #2
0
 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'
コード例 #3
0
 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'
コード例 #4
0
 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
コード例 #5
0
 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'
コード例 #6
0
 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
コード例 #7
0
 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
コード例 #8
0
 def test_fov(self):
     results = search(CADC_SIA_URL, field_of_view=(10, 20), maxrec=5)
     assert len(results) == 5
コード例 #9
0
 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
コード例 #10
0
 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
コード例 #11
0
 def test_band(self):
     results = search(CADC_SIA_URL, band=(0.0002, 0.0003), maxrec=5)
     # TODO - correctness
     assert len(results) == 5
コード例 #12
0
ファイル: test_sia2.py プロジェクト: jiadonglee/pyvo
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)