Paste #288

Welcome To LodgeIt

Welcome to the LodgeIt pastebin. In order to use the notification feature a 31 day cookie with an unique ID was created for you. The lodgeit database does not store any information about you, it's just used for an advanced pastebin experience :-). Read more on the about lodgeit page. Have fun :-)

hide this notification

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import numpy as np
import matplotlib.pyplot as plt
from literature_attenuation import *
import astropy.units as u


fig = plt.figure()
ax = fig.add_subplot(111)

wav = np.linspace(3,4,1000) #log angstrom
wav = 10.**(wav)*u.angstrom
x = (1./wav.to(u.micron)).value

tau_conroy = conroy(wav.value)
tau_calzetti = calzetti(wav.value)
tau_smc = smc(wav.value)
tau_lmc = lmc(wav.value)
tau_mw = cardelli(wav.value)

ax.plot(x,tau_mw,color='black',lw=3,label='Milky Way Average')
ax.plot(x,tau_lmc,color='firebrick',lw=3,label='LMC Average')
ax.plot(x,tau_smc,color='dodgerblue',lw=3,label='SMC Average')

plt.legend(fontsize=14)


ax.set_xlabel(r'1/$\mu$m',fontsize=14)
ax.set_ylabel(r'$\tau$',fontsize=14)

fig.savefig('local_group.png',dpi=300)