Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api
Commits
d6139d80
Commit
d6139d80
authored
Apr 17, 2024
by
Wei Shoulin
Browse files
C9
parent
924f36aa
Pipeline
#4165
passed with stage
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_dfs_api/common/catalog.py
View file @
d6139d80
...
...
@@ -26,7 +26,7 @@ class CatalogApi(object):
raise
Exception
(
"catalog_name is not allowed"
)
if
not
columns
:
raise
Exception
(
"columns is empty"
)
return
self
.
catalog_query
(
ra
=
ra
,
return
self
.
stub
.
catalog_query
(
ra
=
ra
,
dec
=
dec
,
radius
=
radius
,
catalog_name
=
catalog_name
,
...
...
tests/common/test_common_catalog.py
View file @
d6139d80
...
...
@@ -10,6 +10,7 @@ class CommonCatalogTestCase(unittest.TestCase):
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
,
...
...
@@ -19,7 +20,7 @@ class CommonCatalogTestCase(unittest.TestCase):
min_mag
=-
1
,
max_mag
=-
1
,
obstime
=
-
1
,
limit
=
0
limit
=
1
0
)
print
(
result
)
if
result
.
success
:
...
...
@@ -44,10 +45,5 @@ class CommonCatalogTestCase(unittest.TestCase):
limit
=
20
)
print
(
result
)
if
result
.
success
:
dt
=
self
.
api
.
to_table
(
result
)
dt
.
pprint
()
# df = dt.to_pandas()
# print(df.head())
print
(
'used:'
,
time
.
time
()
-
t
)
print
(
'return:'
,
len
(
result
.
data
))
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment