ApJdataFrames
Alves_de_Oliveira_2012Title
: Spectroscopy of brown dwarf candidates in IC 348 and the determination of its substellar IMF down to planetary masses
Authors
: C. Alves Alves de Oliveira, E Moraux, Jerome Bouvier, G Duchêne, H Bouy, T Maschberger, and P Hudelot
Data is from this paper:
http://www.aanda.org/articles/aa/full_html/2012/03/aa18230-11/aa18230-11.html
In [1]:
%pylab inline
import seaborn as sns
In [2]:
import warnings
warnings.filterwarnings("ignore")
In [3]:
import pandas as pd
pd.options.display.max_columns = 150
A&A offers no method to directly download a .txt file, so I have to copy the table to a clipboard to read it in. Since the reading from the keyboard method is not automatically repeatable, let's save this to as tab-separated data file, locally. Use tabs because there are commas in the content.
http://www.aanda.org.ezproxy.lib.utexas.edu/articles/aa/full_html/2012/03/aa18230-11/T4.html
names = ["CFHTWIR-Oph","RA","Dec","J (mag)","H (mag)","Ks (mag)","SpT","AV (mag)","T (K)","Properties"]
tbl4 = pd.read_clipboard(sep='\t', names = names)
tbl4.to_csv('../data/Alves_de_Oliveira2012/tbl4.csv', sep = '\t', index=False)
In [4]:
tbl4 = pd.read_csv("../data/Alves_de_Oliveira2012/tbl4.csv", sep = '\t')
tbl4.head()
Out[4]:
Once again, having to use the clipboard.
names = ["Identifier","RA","Dec","SpT","AV (mag)","References",
"J (mag)","H (mag)","Ks (mag)","[3.6] (mag)","[4.5] (mag)","[5.6] (mag)","[8.0] (mag)","[24] (mag)"]
tbl5 = pd.read_clipboard(sep = '\t', names = names)
tbl5.to_csv("../data/Alves_de_Oliveira2012/tbl5.csv", sep = "\t", index=False)
In [5]:
tbl5 = pd.read_csv("../data/Alves_de_Oliveira2012/tbl5.csv", sep = "\t")
In [6]:
tbl5.head()
Out[6]:
The tables are horizontally sub-divided into groups of similar properties (e.g. spectral type, spectral slope). One strategy to circumvent these dead rows is to label the group members according to the sub-division headings.
Also, notice that the value and error are separated by a \pm, which is fine for Latex, but a pain-in-the-ass for actually extracting and plotting values. I have a function that separates these columns, it should be run here.
The End.