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-pipeline
csst_common
Commits
9c6afc09
Commit
9c6afc09
authored
Oct 28, 2022
by
BO ZHANG
🏀
Browse files
added dm.test_dfs() for DFS availability
parent
c8a74c70
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
9c6afc09
...
...
@@ -460,11 +460,20 @@ class CsstMsDataManager:
try
:
tbl
=
gaia_query_from_dfs
(
ra
=
ra
,
dec
=
dec
,
radius
=
radius
,
min_mag
=
min_mag
,
max_mag
=
max_mag
,
obstime
=
obstime
,
limit
=
limit
)
assert
len
(
tbl
)
>
0
return
tbl
except
Exception
as
e
:
except
:
print
(
"Error occurred during the query!"
)
return
None
def
test_dfs
(
self
):
""" Test if DFS works. """
try
:
tbl
=
gaia_query_from_dfs
(
radius
=
0.001
)
assert
len
(
tbl
)
==
0
return
True
except
:
return
False
def
__repr__
(
self
):
lines
=
""
lines
+=
"<CsstMsDataManager>
\n
"
...
...
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