Commit 9c6afc09 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added dm.test_dfs() for DFS availability

parent c8a74c70
......@@ -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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment