Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
added dm.test_dfs() for DFS availability
parent
c8a74c70
dev
main
wangxia-main-patch-87026
zhaobowei-main-patch-61353
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
csst_common/data_manager.py
+11
-2
csst_common/data_manager.py
with
11 additions
and
2 deletions
+11
-2
csst_common/data_manager.py
+
11
-
2
View file @
9c6afc09
...
@@ -460,11 +460,20 @@ class CsstMsDataManager:
...
@@ -460,11 +460,20 @@ class CsstMsDataManager:
try
:
try
:
tbl
=
gaia_query_from_dfs
(
tbl
=
gaia_query_from_dfs
(
ra
=
ra
,
dec
=
dec
,
radius
=
radius
,
min_mag
=
min_mag
,
max_mag
=
max_mag
,
obstime
=
obstime
,
limit
=
limit
)
ra
=
ra
,
dec
=
dec
,
radius
=
radius
,
min_mag
=
min_mag
,
max_mag
=
max_mag
,
obstime
=
obstime
,
limit
=
limit
)
assert
len
(
tbl
)
>
0
return
tbl
return
tbl
except
Exception
as
e
:
except
:
print
(
"Error occurred during the query!"
)
return
None
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
):
def
__repr__
(
self
):
lines
=
""
lines
=
""
lines
+=
"<CsstMsDataManager>
\n
"
lines
+=
"<CsstMsDataManager>
\n
"
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets