In [1]:
%matplotlib inline
%config InlineBackend.figure_format='retina'
import matplotlib.pyplot as plt
In [2]:
import os
print os.getenv('DRAINEDATA', '/Users/jsick/draine_data')
In [3]:
from androcmd.phatpipeline import LewisBrickDust
dust23 = LewisBrickDust()
dust23.brick = 23 # hack since it's not part of a full pipeline
dust23.build_extinction()
dust5 = LewisBrickDust()
dust5.brick = 5 # hack since it's not part of a full pipeline
dust5.build_extinction()
bands = ['F275W', 'F336W', 'F475W', 'F814W', 'F110W', 'F160W']
In [11]:
fig = plt.figure(figsize=(8, 6))
ax = fig.add_subplot(2, 1, 1)
ax2 = fig.add_subplot(2, 1, 2)
handles = []
labels = []
handles.append(ax.hist(dust23.young_av.samples, bins=20, edgecolor='None', facecolor='DodgerBlue'))
labels.append('V')
ax2.hist(dust5.young_av.samples, bins=20, edgecolor='None', facecolor='DodgerBlue')
for i, band in enumerate(bands):
h = ax.hist(dust23.young_av.samples * dust23.rel_extinction[i],
bins=20, histtype='step', facecolor='None')
handles.append(h)
labels.append(band)
ax2.hist(dust5.young_av.samples * dust5.rel_extinction[i],
bins=20, histtype='step', facecolor='None')
ax.text(0.1, 0.9, 'Brick 23', transform=ax.transAxes)
ax.set_xlabel(r'$A_X$')
ax.set_ylabel(r'$N$ samples')
ax.set_xlim(0.0, 1.5)
ax.text(0.1, 0.9, 'Brick 5', transform=ax2.transAxes)
ax2.set_xlabel(r'$A_X$')
ax2.set_ylabel(r'$N$ samples')
ax2.set_xlim(0.0, 1.5)
#fig.legend(handles, labels)
fig.show()
In [ ]: