forked from ignotur/Random-forest-open-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathskr.py
More file actions
22 lines (15 loc) · 651 Bytes
/
skr.py
File metadata and controls
22 lines (15 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sklearn.cluster
from astroquery.gaia import Gaia
import numpy as np
from astropy.io import fits
from astropy.table import Table
ra = 272.96
dec = -18.53932068
angle_first = 4
job = Gaia.launch_job_async("SELECT ra, dec, parallax, pmra, pmdec, phot_g_mean_mag, bp_rp \
FROM gaiadr2.gaia_source WHERE 1=CONTAINS(POINT('ICRS',ra,dec), CIRCLE('ICRS',"+str(ra) +" , "+str(dec) +" , "+ str(angle_first)+" )) \
and abs(parallax_over_error) > 5 and parallax > 0.1 and phot_g_mean_mag < 18")
r = job.get_results()
#print r
#for i in ra
r.write('tst.hdf', path='./tst.hdf',format='hdf5')