cone_search.py first iteration
This commit is contained in:
parent
ad2495acdf
commit
39035caf13
@ -1,3 +1,20 @@
|
||||
# cone_search.py
|
||||
# send an api request with the coordinates and search radius to the GaiaDBInterface server to fetch the GAIA sources
|
||||
# gaiaapiclient/cone_search.py
|
||||
# send an api request with the coordinates and search radius in decimal degrees
|
||||
# to the GaiaDBInterface server to fetch the GAIA sources
|
||||
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
def query(ra, dec, radius):
|
||||
url = "http://localhost:8000/gaiadb/cone_search"
|
||||
params = {
|
||||
'ra' : ra,
|
||||
'dec' : dec,
|
||||
'radius' : radius
|
||||
}
|
||||
response = requests.get(url, params=params)
|
||||
response.raise_for_status
|
||||
data = response.json()
|
||||
return data
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user