ApJdataFrames
McClureTitle
: THE EVOLUTIONARY STATE OF THE PRE-MAIN SEQUENCE POPULATION IN OPHIUCHUS: A LARGE INFRARED SPECTROGRAPH SURVEY
Authors
: McClure et al.
Data is from this paper:
http://iopscience.iop.org/0067-0049/188/1/75/
In [1]:
import warnings
warnings.filterwarnings("ignore")
In [2]:
from astropy.io import ascii
In [3]:
import pandas as pd
In [4]:
tbl1 = pd.read_csv("http://iopscience.iop.org/0067-0049/188/1/75/suppdata/apjs330182t1_ascii.txt",
sep="\t", na_values=" ... ", skiprows=[0,1,2], skipfooter=1, usecols=range(9))
tbl1.head()
Out[4]:
In [5]:
tbl2 = pd.read_csv("http://iopscience.iop.org/0067-0049/188/1/75/suppdata/apjs330182t2_ascii.txt",
sep="\t", na_values=" ... ", skiprows=[0,1,2,4], skipfooter=4)
del tbl2["Unnamed: 13"]
tbl2.head()
Out[5]:
In [7]:
tbl1_2_merge = pd.merge(tbl1[["Name", "R.A. (J2000)", "Decl. (J2000)"]], tbl2, how="outer")
tbl1_2_merge.tail()
Out[7]:
In [15]:
lowAv = nonBinary = tbl1_2_merge['A_V'] < 10.0
nonBinary = tbl1_2_merge['Mult.'] != tbl1_2_merge['Mult.']
classIII = tbl1_2_merge['Class'] == 'III'
wtts = tbl1_2_merge['TT Type'] == 'WTTS'
diskless = tbl1_2_merge['State'] == 'Photosphere'
In [17]:
for val in [lowAv, nonBinary, classIII, wtts, diskless]:
print(val.sum())
In [20]:
sample = nonBinary & diskless
sample.sum()
Out[20]:
In [23]:
tbl1_2_merge.to_csv('../data/McClure2010/tbl1_2_merge_all.csv', index=False)
In [13]:
tbl1_2_merge.columns
Out[13]:
In [14]:
tbl1_2_merge[wtts]
Out[14]:
In [9]:
! mkdir ../data/McClure2010
In [10]:
tbl1_2_merge.to_csv("../data/McClure2010/tbl1_2_merge.csv", index=False, sep='\t')
The end