ApJdataFrames Wilking2005

Title: Optical Spectroscopy of the Surface Population of the ρ Ophiuchi Molecular Cloud: The First Wave of Star Formation
Authors: Wilking et al.

Data is from this paper:
http://iopscience.iop.org/1538-3881/130/4/1733/fulltext/


In [1]:
import warnings
warnings.filterwarnings("ignore")

In [2]:
from astropy.io import ascii

In [3]:
import pandas as pd

Table 2 - Optical Properties of Candidate T Tauri Stars


In [4]:
tbl2_vo = ascii.read("http://iopscience.iop.org/1538-3881/130/4/1733/fulltext/datafile2.txt")
tbl2_vo[0:3]


Downloading http://iopscience.iop.org/1538-3881/130/4/1733/fulltext/datafile2.txt [Done]
Out[4]:
<Table masked=True length=3>
FieldAperNameIDRAhRAmRAsDE-DEdDEmDEsCaHTiOEW-LiP-EW-HaEW-HaImagR-IP-SpTypeSpTypeA-SpTypeNote
hminsdegarcminarcsec0.1 nm0.1 nm0.1 nmmagmag
int64int64string104string112int64int64float64string8int64int64float64float64float64string32string56float64float64float64string144string64string64string112
215----162457.3-241123.41.12.09yes--2.813.711.92--M3-4M3.5--
222----16251.5-242858.11.014.19-----0.113.852.42--M5M5IIIgiant
214----162524.1-235656.41.272.54----1.515.151.7--M2-4M3dwarf?

Table 4- Association Members


In [5]:
tbl4_vo = ascii.read("http://iopscience.iop.org/1538-3881/130/4/1733/fulltext/datafile4.txt")
tbl4_vo[0:4]


Downloading http://iopscience.iop.org/1538-3881/130/4/1733/fulltext/datafile4.txt [Done]
Out[5]:
<Table masked=True length=4>
FieldAperNameAVf_AVIMagLogTLogLf_LogLl_MassMassl_LogALogANote
magmag[K][solLum]solMass[Myr]
int64int64string64float64string8float64float64float64string8string8float64string8float64string88
215--2.6--6.263.512-0.76----0.19--6.09li,ext
214--2.1--8.033.525-1.5----0.27--7.28ext
210--0.8--8.133.477-1.38----0.14--6.57ha
17SR 220.0--7.03.488-0.98----0.15--6.18ha,x

Join the tables


In [6]:
tbl2 = tbl2_vo.to_pandas()
del tbl2["Name"]
tbl2.rename(columns={'Note':"Flag"}, inplace=True)
tbl4 = tbl4_vo.to_pandas()

In [7]:
wilking2005 = pd.merge(tbl2, tbl4, how="right", on=["Field", "Aper"])

In [8]:
wilking2005


Out[8]:
Field Aper ID RAh RAm RAs DE- DEd DEm DEs ... f_AV IMag LogT LogL f_LogL l_Mass Mass l_LogA LogA Note
0 2 15 NaN 16 24 57.3 - 24 11 23.4 ... NaN 6.26 3.512 -0.76 NaN NaN 0.19 NaN 6.09 li,ext
1 2 14 NaN 16 25 24.1 - 23 56 56.4 ... NaN 8.03 3.525 -1.50 NaN NaN 0.27 NaN 7.28 ext
2 2 10 NaN 16 25 24.3 - 24 15 39.0 ... NaN 8.13 3.477 -1.38 NaN NaN 0.14 NaN 6.57 ha
3 1 7 ROXRA2 16 25 24.4 - 24 29 43.5 ... NaN 7.00 3.488 -0.98 NaN NaN 0.15 NaN 6.18 ha,x
4 3 15 ROXRA4 16 25 39.6 - 24 26 34.0 ... NaN 6.04 3.544 -0.74 NaN NaN 0.31 NaN 6.33 ha,x,ext

5 rows × 33 columns


In [14]:
wilking2005["RA"] = wilking2005.RAh.astype(str) + wilking2005.RAm.astype(str) + wilking2005.RAs.astype(str)

In [15]:
wilking2005.RA


Out[15]:
0     16.024.057.3
1     16.025.024.1
2     16.025.024.3
3     16.025.024.4
4     16.025.039.6
5     16.025.047.7
6     16.025.050.5
7     16.025.056.1
8     16.025.056.2
9     16.025.057.5
10    16.025.058.9
11    16.025.059.6
12     16.026.01.6
13     16.026.03.3
14     16.026.05.5
...
73    16.028.011.1
74    16.028.012.4
75    16.028.016.6
76    16.028.019.2
77    16.028.020.1
78    16.028.021.6
79    16.028.023.4
80    16.028.024.3
81    16.028.024.9
82    16.028.032.6
83    16.028.032.7
84    16.028.043.1
85    16.028.045.3
86    16.028.054.1
87     16.029.04.0
Name: RA, Length: 88, dtype: object

Save the data


In [9]:
! mkdir ../data/Wilking2005

In [10]:
wilking2005.to_csv("../data/Wilking2005/Wilking2005.csv", index=False, sep='\t')

The end