Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try: # python 3 | |
| from io import BytesIO | |
| from http.client import HTTPConnection | |
| except ImportError: # python 2 | |
| from StringIO import StringIO as BytesIO | |
| from httplib import HTTPConnection | |
| from astropy.table import Table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TOP 5 source_id,ra,dec,phot_g_mean_mag,astrometric_excess_noise_sig FROM gaiadr1.gaia_source WHERE | |
| CONTAINS(POINT('ICRS',gaiadr1.gaia_source.ra,gaiadr1.gaia_source.dec),CIRCLE('ICRS',18.69290, -0.00109,0.002777777777777778))=1 | |
| or | |
| CONTAINS(POINT('ICRS',gaiadr1.gaia_source.ra,gaiadr1.gaia_source.dec),CIRCLE('ICRS',229.47509, 0.82868,0.002777777777777778))=1 | |
| or | |
| CONTAINS(POINT('ICRS',gaiadr1.gaia_source.ra,gaiadr1.gaia_source.dec),CIRCLE('ICRS',229.46491, -0.79320,0.002777777777777778))=1 | |
| or | |
| CONTAINS(POINT('ICRS',gaiadr1.gaia_source.ra,gaiadr1.gaia_source.dec),CIRCLE('ICRS',14.21622, 0.00584,0.002777777777777778))=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from scipy.spatial import cKDTree | |
| from bary import RbfInterpolator | |
| class KDTreeInterpolator(object): | |
| """ | |
| KDTreeInterpolator(points, values) | |
| Nearest-neighbours (barycentric) interpolation in N dimensions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def ezrc(fontSize=22., lineWidth=2., labelSize=None, tickmajorsize=10, | |
| tickminorsize=5, figsize=(8, 6)): | |
| """ | |
| Define params to make pretty fig for slides and papers | |
| """ | |
| from pylab import rc, rcParams | |
| if labelSize is None: | |
| labelSize = fontSize + 5 | |
| rc('figure', figsize=figsize) | |
| rc('lines', linewidth=lineWidth) |