import unittest import time from csst_dfs_api.common.catalog import CatalogApi class CommonCatalogTestCase(unittest.TestCase): def setUp(self): self.api = CatalogApi() def test_gaia3_query(self): t= time.time() #90,24.5,0.21 => 6033 records result = self.api.catalog_query( ra=90, dec=24.5, radius=0.21, columns = ('ref_epoch','ra','ra_error','dec','dec_error','parallax','parallax_error','pmra','pmra_error','pmdec','pmdec_error','phot_g_mean_mag','source_id'), catalog_name='gaia3', min_mag=-1, max_mag=-1, obstime = -1, limit = 10 ) print(result) print('used:', time.time()-t) print('return:', len(result.data)) def test_sim_query(self): t= time.time() result = self.api.catalog_query( ra=243, dec=40, radius=1, columns = ('id','ra','dec','av','pmdec','phot_g_mean_mag'), catalog_name='sim', min_mag=-1, max_mag=-1, obstime = -1, limit = 20 ) print(result) print('used:', time.time()-t) print('return:', len(result.data))