ApJdataFrames Muzic2015

Title: SUBSTELLAR OBJECTS IN NEARBY YOUNG CLUSTERS (SONYC) IX: THE PLANETARY-MASS DOMAIN OF CHAMAELEON-I AND UPDATED MASS FUNCTION IN LUPUS-3
Authors: Muzic et al.

Data is from this paper:
http://iopscience.iop.org/article/10.1088/0004-637X/810/2/159/meta


In [1]:
%pylab inline

import seaborn as sns
sns.set_context("notebook", font_scale=1.5)

#import warnings
#warnings.filterwarnings("ignore")


Populating the interactive namespace from numpy and matplotlib

In [2]:
import pandas as pd

Table 2 - Photometric Candidates Included in the Spectroscopic Follow-up with Sofi

Awful mutliple line formatting. Whyyyy?

Data Cleaning:
You have to do a regex search and replace using \n{8}\t as the search match, and replace with nothing. Once that is complete, trim the footer and then save the file.


In [3]:
#tbl2 = pd.read_csv("http://iopscience.iop.org/0004-637X/810/2/159/suppdata/apj517985t2_ascii.txt",
#                   sep='\t|\n{8}', skiprows=11, skipfooter=3, engine='python', na_values="cdots")
#tbl2

In [4]:
names = ['id','alpha(J2000)','delta(J2000)','Date','Slit','I','J','K','Comments']
tbl2 = pd.read_csv('../data/Muzic2015/muzic2015_tbl2.txt', 
                   sep='\t', na_values='cdots', names=names, header=1, index_col=False)
tbl2


Out[4]:
id alpha(J2000) delta(J2000) Date Slit I J K Comments
0 1 11 05 21.36 -77 46 33.0 2014 Apr 19 1 21.92 17.37 14.65 NaN
1 2 11 06 18.62 -77 35 17.4 2014 Apr 18 1 22.43 16.70 13.22 NaN
2 3 11 06 28.04 -77 35 54.7 2014 Apr 13 1 21.68 16.50 13.31 NaN
3 4 11 08 20.20 -77 45 48.6 2014 Apr 13 1 21.50 18.09 15.86 NaN
4 5 11 08 23.59 -77 31 29.5 2014 Apr 14 2 22.26 18.65 16.49 NaN
5 6 11 08 30.31 -77 31 38.6 2014 Apr 14 2 22.50 17.92 16.05 confirmed member
6 7 11 08 30.77 -77 45 50.5 2014 Apr 13 1 21.34 17.77 15.59 NaN
7 8 11 08 33.92 -77 46 33.4 2014 Apr 13 1 21.49 18.54 16.68 NaN
8 9 11 08 50.38 -77 45 53.0 2014 Apr 13 1 21.26 17.90 16.01 NaN
9 10 11 09 11.62 -77 19 26.1 2014 Apr 18 1 21.74 16.56 13.20 NaN
10 11 11 09 28.57 -76 33 28.1 2014 Apr 14 1 21.95 16.74 11.93 confirmed member
11 12 11 09 32.26 -76 34 39.3 2014 Apr 19 2 22.76 18.52 15.74 NaN
12 13 11 09 35.44 -77 17 27.1 2014 Apr 18 1 21.68 16.73 13.60 NaN
13 14 11 09 37.38 -76 41 05.7 2014 Apr 17 1 22.71 17.92 15.18 NaN
14 15 11 09 51.82 -76 42 18.2 2014 Apr 19 1 22.97 17.93 14.57 NaN
15 16 16 08 03.96 -39 10 28.9 2014 Apr 18 1 19.39 16.28 14.21 NaN
16 17 16 08 25.87 -39 10 08.0 2014 Apr 17 1 18.13 15.26 13.03 NaN
17 18 16 08 30.04 -39 10 01.4 2014 Apr 17 1 15.51 12.69 10.82 NaN
18 19 16 08 33.04 -38 52 22.7 2014 Apr 18 1 15.34 12.98 11.74 confirmed member
19 20 16 09 42.66 -39 03 20.7 2014 Apr 18 1 18.68 15.54 13.29 NaN
20 21 16 09 43.74 -39 07 11.9 2014 Apr 17 1 18.96 15.74 13.23 NaN
21 22 16 09 47.20 -39 08 42.4 2014 Apr 19 1 18.92 15.91 13.82 NaN
22 23 16 09 52.68 -39 06 40.4 2014 Apr 17 1 17.13 14.45 12.52 NaN
23 24 16 10 01.33 -39 06 45.1 2014 Apr 17 1 15.38 12.32 10.52 confirmed member
24 25 16 10 05.97 -39 08 06.2 2014 Apr 18 1 18.40 15.54 13.29 NaN
25 26 16 10 06.01 -39 04 23.7 2014 Apr 17 1 16.90 12.30 9.59 giant?
26 27 16 10 11.71 -39 09 19.8 2014 Apr 17 1 17.81 14.84 12.96 NaN
27 28 16 10 13.74 -39 02 34.8 2014 Apr 17 1 17.21 13.49 10.86 giant?
28 29 16 10 14.59 -39 02 31.4 2014 Apr 17 1 19.41 15.89 13.58 NaN
29 30 16 10 17.86 -39 03 47.1 2014 Apr 17 1 16.26 13.73 11.93 NaN
30 31 16 10 30.82 -39 04 04.4 2014 Apr 18 1 17.29 14.66 12.81 NaN
31 32 16 10 33.59 -39 08 21.4 2014 Apr 17 1 17.56 14.84 12.54 NaN
32 33 16 11 46.57 -39 06 04.7 2014 Apr 17 1 15.39 13.19 11.23 member?
33 34 16 12 04.95 -39 06 25.6 2014 Apr 17 1 15.40 13.12 11.51 giant or member

The $I-$band data is Cousins $I$ for Cha, and DENIS $i$ for Lupus.


In [5]:
tbl2.to_csv("../data/Muzic2015/tbl2.csv", index=False)

Plots


In [7]:
I_J = tbl2.I - tbl2.J

In [9]:
sns.distplot(I_J, axlabel='$I-J$')


Out[9]:
<matplotlib.axes._subplots.AxesSubplot at 0x111fb07d0>