In [1]:
import splat
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
splat.initiateStandards()
In [3]:
import glob
import pandas as pd
from astropy.io import ascii
In [4]:
import astropy.units as u
In [5]:
df=ascii.read('/users/caganze/desktop/df_scn_y0.txt').to_pandas()
df2=ascii.read('/users/caganze/desktop/df_schn_y1.txt').to_pandas()
In [6]:
#Y0–WISE J173835.53+273259.0 (HST/WFC3; Cushing et al. 2011), and Y1–WISE J035000.32–565830.2 (HST/WFC3; Kirkpatrick et al. 2012).
In [7]:
yo_std=df[df['Star']=='WISE1738+2732']
y1_std=df2[df2['Star']=='WISE0350-5658']
In [8]:
import splat
In [9]:
flux_unit=u.erg/u.s/u.cm/u.cm/u.micron
In [10]:
y0_spex=splat.Spectrum(wave=yo_std.Wave*u.micron, flux=yo_std.Flux*flux_unit, noise=yo_std.e_Flux*flux_unit,
instrument='WFC3-G141',
name='WISE1738+2732',
jmag=19.470,jmag_error=0.08,
hmag=20.24, hmag_error=0.08)
y1_spex=splat.Spectrum(wave=y1_std.Wave*u.micron, flux=y1_std.Flux*flux_unit, noise=y1_std.e_Flux*flux_unit,
instrument='WFC3-G141',
name='WISE0350-5658', jmag=22.09,jmag_error=0.1,
hmag=22.51, hmag_error=0.2)
In [11]:
data=pd.DataFrame({'name': ['WISE1738+2732', 'WISE0350-5658'], 'spec':[y0_spex, y1_spex], 'spt':['Y0.0', 'Y1.0']})
In [12]:
data.to_pickle('/users/caganze/y_standards.pkl')
In [13]:
import pandas as pd
In [14]:
ydwarfs_data=pd.read_pickle('/users/caganze/y_standards.pkl')
In [ ]: