ApJdataFrames
Cottaar_2014Title
: IN-SYNC I: Homogeneous Stellar Parameters from High-resolution APOGEE Spectra for Thousands of Pre-main Sequence Stars
Authors
: Michiel Cottaar, Kevin R Covey, Michael R Meyer, David L Nidever, Keivan G. Stassun, Jonathan B Foster, Jonathan C Tan, S Drew Chojnowski, Nicola da Rio, Kevin M Flaherty, Peter M Frinchaboy, Michael Skrutskie, Steven R Majewski, John C Wilson, and Gail Zasowski
Data is from this paper:
http://iopscience.iop.org/article/10.1088/0004-637X/794/2/125/meta
In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
pd.options.display.max_columns = 150
In [2]:
import astropy
In [3]:
from astropy.io import fits
hdulist1 = fits.open('../data/Cottaar2014/per_epoch.fit')
hdulist2 = fits.open('../data/Cottaar2014/per_star.fit')
In [4]:
table1 = hdulist1[1]
In [5]:
table1.columns
Out[5]:
In [6]:
table1.data.shape
Out[6]:
In [7]:
table1.size
Out[7]:
In [8]:
table1
Out[8]:
In [9]:
from astropy.table import Table
In [10]:
tt = Table(data=table1.data)
tt.write('../data/Cottaar2014/per_epoch.csv', format='csv')
dat = pd.read_csv('../data/Cottaar2014/per_epoch.csv')
In [11]:
dat.head()
Out[11]:
In [12]:
dat.columns
Out[12]:
In [13]:
sns.set_context('talk', font_scale=1.0)
In [14]:
%config InlineBackend.figure_format = 'svg'
In [15]:
dat.columns
Out[15]:
In [16]:
cmap = sns.cubehelix_palette(light=1, as_cmap=True)
In [17]:
plt.figure(figsize=[10, 6])
sc = plt.scatter(dat['Teff'], dat['log(g)'], c=dat['R_H'], vmin=0, vmax=2, s=35, cmap=cmap, alpha=0.5)
plt.colorbar(sc)
plt.xlabel('$T_{eff}$')
plt.ylabel('$\log{g}$')
plt.title('Cottaar et al. 2014 APOGEE/INSYNC data')
plt.xlim(7000, 2500)
plt.ylim(5.5, 2.7)
Out[17]:
In [18]:
import numpy as np
In [19]:
plt.figure(figsize=[6, 4])
plt.hist(dat['R_H'], bins=np.arange(0, 3, 0.15));
plt.xlabel('$R-H$')
plt.ylabel('$N$')
Out[19]:
Find a source with specific properties.
In [20]:
Tfi = (dat.Teff > 4000) & (dat.Teff < 4200)
lgi = (dat['log(g)'] > 3.5) & (dat['log(g)'] < 4.0)
gi = Tfi & lgi
In [21]:
dat.shape
Out[21]:
In [22]:
gi.sum()
Out[22]:
In [23]:
dat['2MASS'][gi]
Out[23]:
In [24]:
table2 = hdulist2[1]
In [25]:
table2.columns
Out[25]:
In [26]:
table2.data.shape
Out[26]:
In [27]:
t2 = Table(data=table2.data)
t2.write('../data/Cottaar2014/per_star.csv', format='csv')
data = pd.read_csv('../data/Cottaar2014/per_star.csv')
In [28]:
data.head()
Out[28]:
In [29]:
data.Cluster.unique()
Out[29]:
In [30]:
data.columns
Out[30]:
In [31]:
ic = data.Cluster == 'IC 348'
pl = data.Cluster == 'Pleiades'
Read in the Chabrier and Baraffe models
In [32]:
bcah = pd.read_csv('../data/BCAH2002/BCAH2002_isochrones.csv', sep = '\t')
groups =bcah.groupby(by='Age')
In [ ]:
In [33]:
plt.figure(figsize=[10, 6])
plt.scatter(data['Teff'][ic], data['log(g)'][ic], label='IC 348', c='r')
plt.scatter(data['Teff'][pl], data['log(g)'][pl], label='Pleiades')
plt.xlabel('$T_{eff}$')
plt.ylabel('$\log{g}$')
plt.title('Cottaar et al. 2014 APOGEE/INSYNC data')
plt.legend(loc='best')
for age, group in groups:
no_decimal = np.abs(np.mod(age, 1)) <0.001
if no_decimal:
plt.plot(group.Teff, group.logg, 'k-', alpha=0.5, label='{:0.1f} Myr'.format(age))
plt.xlim(7000, 2500)
plt.ylim(5.5, 2.7)
Out[33]:
In [34]:
data.columns
Out[34]:
In [35]:
data.shape
Out[35]:
In [48]:
sns.distplot(data['R_H'][ic], hist=False, label='IC 348')
sns.distplot(data['R_H'][pl], hist=False, label='Pleiades')
Out[48]:
In [ ]: