In [1]:
cd ..
In [10]:
import sfh_tests
from TPAGBparams import snap_src
import ResolvedStellarPops as rsp
%pylab tk
In [27]:
reload(sfh_tests)
Out[27]:
In [42]:
targets = ['ddo71', 'kdg73', 'ngc2976']
In [57]:
fig, (axs) = plt.subplots(ncols=2, nrows=3, figsize=(16, 16))
for (ax1, ax2), target in zip(axs, targets):
match_sfh_src = snap_src + '/data/sfh_parsec/hmc_v1/'
match_sfh_file, = rsp.fileIO.get_files(match_sfh_src, '%s*sfh' % target.lower())
new_match_src = snap_src + '/data/sfh_parsec/'
new_match_file, = rsp.fileIO.get_files(new_match_src, '%s*sfh' % target.lower())
sfh = sfh_tests.StarFormationHistories(match_sfh_file, 'match-grid')
sfh_new = sfh_tests.StarFormationHistories(new_match_file, 'match-grid')
sfh.plot_sfh('sfr', yscale='log', ax=ax1, errorbar_kw = {'label': 'v1'})
sfh_new.plot_sfh('sfr', yscale='log', ax=ax1, errorbar_kw = {'color': 'blue', 'label': 'v2'})
sfh.plot_sfh('sfr', ax=ax2, errorbar_kw = {'label': 'v1'})
sfh_new.plot_sfh('sfr', ax=ax2, errorbar_kw = {'color': 'blue', 'label': 'v2'})
[ax.legend(loc=0, frameon=False) for ax in ax1, ax2]
ax2.set_title('$%s$' % target, fontsize=20)
In [49]:
In [47]: