Before we start:
Premise:
Astroquery class:
Cost:
Benefits:
A note for the installation:
# Import the packages
import astropy.units as u
from astropy.coordinates import SkyCoord
from astroquery.gaia import Gaia
coord = SkyCoord(ra=280, dec=-60, unit=(u.degree, u.degree), frame='icrs')
radius = 30*u.arcsec
r = Gaia.query_object(coordinate=coord, radius=radius)
# Let's check the output
print(r.keys())
r.pprint()
Look at X1_Gaia-pm.py and try to fill the gaps!
import numpy as np
from astroquery.eso import Eso
# Connect to the archive
eso = Eso()
eso.ROW_LIMIT=-1
eso.login("fvogt")
# What can be queried ?
eso.list_instruments()
# eso.query_instrument('muse', help=True)
table_muse = eso.query_instrument('muse', column_filters={'dp_cat':'SCIENCE',
'dp_type':'OBJECT',
#'dp_type':'SKY',
'stime':'2019-04-01',
'etime':'2019-04-17',
#'prog_type':'1',
#'pi_coi':'VOGT',
},
#columns={},
)
table_muse.pprint()
print('Number of files: %i' % (len(table_muse)))
print(table_muse.keys())
time_on_sky = np.sum(table_muse['EXPTIME [s]']) # Total time spent in that spot
print('Science time in P104: %.1f hours' % (time_on_sky/3600))
Look at X2_ESO-archive.py, and try to fill the gaps
from astroquery.simbad import Simbad
Simbad.add_votable_fields('flux(H)')
#Simbad.list_votable_fields()
result = Simbad.query_criteria('rah >15 & rah <16 & dec >-35 & dec < -29 & Hmag <15 & Hmag >10')
print(result.keys())
result['MAIN_ID', 'RA','DEC', 'FLUX_H'].pprint()