SELECT TOP 100000 * FROM public.gaia_source WHERE CONTAINS(POINT('ICRS',public.gaia_source.ra,public.gaia_source.dec),CIRCLE('ICRS',64.1171208,28.1266139,1.0))=1
In [1]:
! gunzip -d ../data/result.vot_01.gz
Apparently not in gzip format, despite the file extension
In [2]:
#! head -n 200 ../data/result.vot_01.gz
In [3]:
import pandas as pd
import numpy as np
import seaborn as sns
%config InlineBackend.figure_format = 'retina'
%matplotlib inline
In [4]:
import matplotlib.pyplot as plt
In [5]:
from astropy.io import votable
In [6]:
votable.is_votable('../data/result.vot_01.gz')
Out[6]:
In [7]:
out = votable.parse_single_table('../data/result.vot_01.gz')
In [8]:
out2 = out.to_table()
In [9]:
out3 = out2.to_pandas()
In [10]:
out2[0:5]
Out[10]:
In [11]:
plt.plot(out3.ra, out3.dec, '.', alpha=0.1)
Out[11]:
In [12]:
out3.columns
Out[12]:
In [13]:
out3.shape
Out[13]:
In [14]:
vec = out3.parallax == out3.parallax
vec.sum(), len(vec)
Out[14]:
In [15]:
sns.distplot(out3.parallax[vec])
Out[15]:
In [16]:
sns.distplot(out3.phot_g_mean_mag, kde=False)#, bins=np.arange(0,2E7, 10), kde=False)
plt.yscale('log')
In [17]:
out3.head()
Out[17]:
In [18]:
! du -hs ../data/result.vot_02.gz
In [20]:
tab2_raw = votable.parse_single_table('../data/result.vot_02.gz')
In [21]:
tab2_apy = tab2_raw.to_table()
In [25]:
tab2_apy
Out[25]:
In [22]:
tab2 = tab2_apy.to_pandas()
In [23]:
tab2
Out[23]:
In [ ]: