Esempio n. 1
0
def plot_allard_phoenix(fname, band=None):
    wav, flux, bb_flux = load_Allard_Phoenix(fname)
    plt.figure(figsize=(10, 8))
    plt.plot(wav, flux, label="flux")
    plt.plot(wav, bb_flux, label="bb_flux")
    plt.legend()
    plt.title(fname)
    plt.xlabel("Wavelength")
    plt.ylabel("Flux")
from loading_phoenix import load_phoenix_aces, load_Allard_Phoenix, align2model

get_ipython().run_line_magic('matplotlib', 'inline')

# # Synthethic HD30501
# Using the models with Teff 5200, 4.5 logg, -0.0 [Fe/H]
#
# HD30501 is in vacuum so will leave the models in vacuum also.

# In[ ]:

w_aces, f_aces = load_phoenix_aces(
    "data/lte05200-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits")
aces_spec = Spectrum(xaxis=w_aces, flux=f_aces)

w_settl, f_settl, bb_settl = load_Allard_Phoenix(
    "data/lte052.0-4.5-0.0a+0.0.BT-Settl.spec.7")
settl_spec = Spectrum(xaxis=w_settl, flux=f_settl)

w_dusty, f_dusty, bb_dusty = load_Allard_Phoenix(
    "data/lte052-4.5-0.0.BT-Dusty.spec.7")
dusty_spec = Spectrum(xaxis=w_dusty, flux=f_dusty)

w_next, f_next, bb_next = load_Allard_Phoenix(
    "data/lte052-4.5-0.0a+0.0.BT-NextGen.7")
next_spec = Spectrum(xaxis=w_next, flux=f_next)

w_cond, f_cond, bb_cond = load_Allard_Phoenix(
    "data/lte052-4.5-0.0a+0.0.BT-Cond.7")
cond_spec = Spectrum(xaxis=w_cond, flux=f_cond)

# In[ ]:
Esempio n. 3
0
# of the CIFIST2011 grids above, but currently: Teff= 1200 - 7000K, logg=2.5 - 5.5,
# [M/H]= 0.0.
#

# In[3]:

# Need to unzip .xz and b2z files
CIFIST2011_2015 = "BT-Settl-abundances/CIFIST2011_2015_lte026.0-4.5-0.0a+0.0.BT-Settl.spec.7"
CIFIST2011 = "BT-Settl-abundances/CIFIST2011_2015_lte026.0-4.5-0.0a+0.0.BT-Settl.spec.7"
#GNS93 = "BT-Settl-abundances/GNS93lte026-4.5-0.0.BT-Settl.7.gz"
GNS93 = "BT-Settl-abundances/lte26.0-4.50-0.0.BT-cond-giant-2009.l128.gn.7"
AGSS09 = "BT-Settl-abundances/AGSS09lte026-4.5-0.0a+0.0.BT-Settl.7"

# In[4]:

gn93 = load_Allard_Phoenix(GNS93)

gn93r = ip_convolution(gn93[0], gn93[1], [min(gn93[0]), max(gn93[0])], R=R)

# In[ ]:

agss09 = load_Allard_Phoenix(AGSS09)
agss09r = ip_convolution(agss09[0],
                         agss09[1],
                         [min(agss09[0]), max(agss09[0])],
                         R=R)

# In[ ]:

cifist11 = load_Allard_Phoenix(CIFIST2011)
cifist11r = ip_convolution(
Esempio n. 4
0
read7 = readUnit7("data/lte043.0-2.5-0.0a+0.0.BT-Settl.spec.7")
print(read7.shape)
print(read7)
plt.figure(figsize=(10, 8))
plt.plot(read7[:, 0] / 10, 10**read7[:, 1], "--", label="read7")
plt.plot(read7[:, 0] / 10, 10**read7[:, 2], "--", label="read7 bb ")
plt.legend()
plt.xlim([700, 5000])
plt.xlabel("Wavelength(nm)")
plt.ylabel("Ergs/sec/cm**2/A")
plt.title("BT-Settle 4300-2.5-0.0")
plt.show()

# In[5]:

wav, flux, bb_flux = load_Allard_Phoenix(
    "data/lte043.0-2.5-0.0a+0.0.BT-Settl.spec.7")
read7 = readUnit7("data/lte043.0-2.5-0.0a+0.0.BT-Settl.spec.7")
plt.figure(figsize=(10, 8))
plt.plot(wav, flux, label="flux")
plt.plot(read7[0], read7[1], "--", label="read7")
plt.plot(wav, bb_flux, label="bb_flux")
plt.plot(read7[0], read7[1], "--", label="read7 bb ")
plt.legend()
plt.xlim([700, 5000])
plt.xlabel("Wavelength(nm)")
plt.ylabel("Ergs/sec/cm**2/A")
plt.title("BT-Settle 4300-2.5-0.0")
plt.show()

# In[6]:
# In[2]:

limits = [2000, 3000]

# # Synthethic Artucus
# Using the models with Teff 4300, 1.5 logg, -0.0 [Fe/H]
#
# Daniel used -0.5 Fe/H
#
# load Allard_PHOENIX reutrns wavelenght in nanometers.
# Using vac2air to convert to air, (which needs angstroms). Hence *10 / 10 fudge

# In[3]:

w_settl, f_settl, bb_settl = load_Allard_Phoenix(
    "data/lte043.0-2.5-0.0a+0.0.BT-Settl.spec.7")
settl_spec = Spectrum(xaxis=vac2air(w_settl * 10) / 10, flux=f_settl)

w_dusty_spec, f_dusty_spec, bb_dusty_spec = load_Allard_Phoenix(
    "data/lte043-2.5-0.0.BT-Dusty.spec.7")
dusty_spec = Spectrum(xaxis=vac2air(w_dusty_spec * 10) / 10, flux=f_dusty_spec)

w_next, f_next, bb_next = load_Allard_Phoenix(
    "data/lte043-2.5-0.0a+0.0.BT-NextGen.7")
next_spec = Spectrum(xaxis=vac2air(w_next * 10) / 10, flux=f_next)

w_cond, f_cond, bb_cond = load_Allard_Phoenix(
    "data/lte043-2.5-0.0a+0.0.BT-Cond.7")
cond_spec = Spectrum(xaxis=vac2air(w_cond * 10) / 10, flux=f_cond)

w_aces, f_aces = load_phoenix_aces(