def make_plots(): exclude = [[5,34], [1,2,35], [59], [2,8], [1,2,3,27,28,29,5], [35,36,38]] # ps.all_maps('TauV_diff_map.pdf',col=1,inputprefix='', # inputsuffix='Tdiff.txt',minval=-5,maxval=5, # binned=True,exclude=exclude, # label=r'$\frac{\tau_{V,Balm} - \tau_{V,SSP}}{\tau_{V,SSP}}$') ps.all_maps('TauV_balmer_map.pdf',col=1,inputprefix='', inputsuffix='balmerD.txt', minval=-1,maxval=6,binned=True,exclude=exclude, label=r'$\tau_{V,Balm}$') al = pa2.plot_heights_with_err(inputsuffix='balmerD.txt', col=1,errcol=2,label=r'$\tau_{V,Balm}$', ylims=[-6,13],exclude=exclude, bigorder=60) al2 = pa2.simple_plot(inputsuffix='Tdiff.txt',col=1, label=r'$\frac{\tau_{V,Balm} - \tau_{V,SSP}}{\tau_{V,SSP}}$', ylims=[-6,13],exclude=exclude) pp = PDF('TauV_balm_heights.pdf') [pp.savefig(a.figure) for a in al] pp.close() pp2 = PDF('TauV_diff_heights.pdf') [pp2.savefig(a.figure) for a in al2] pp2.close() plt.close('all') return
import numpy as np import plot_simple as ps import plot_allZ2 as pa2 import sys if len(sys.argv) == 3: exclude = [] for i in range(6): d, e = np.loadtxt('P{}_GBU.dat'.format(i+1),unpack=True) idx = (np.where(e != 0)[0]+1).tolist() exclude.append(idx) else: exclude = [[5,34], [1,2,35], [59], [2,8], [1,2,3,27,28,29], [35,36,38]] print exclude pre = sys.argv[1] ps.all_maps('{}_MLWA_map.pdf'.format(pre),col=62,inputsuffix='allz2.dat',label='Mean Light Weighted Age [Gyr]', minval=0, maxval=12.5,binned=True,exclude=exclude) ps.all_maps('{}_MMWA_map.pdf'.format(pre),col=61,inputsuffix='allz2.dat',label='Mean Mass Weighted Age [Gyr]', minval=0, maxval=12.5,binned=True,exclude=exclude) ps.all_maps('{}_MLWZ_map.pdf'.format(pre),col=64,inputsuffix='allz2.dat',label='Mean Light Weighted Metallicity [Z_sol]', minval=-1.5, maxval=0.5,binned=True,log=True,exclude=exclude) ps.all_maps('{}_V_map.pdf'.format(pre),col=65,inputsuffix='allz2.dat',label='Velocity [km/s]', minval=298, maxval=758,binned=True,cmap='bwr',exclude=exclude) ps.all_maps('{}_TauV_map.pdf'.format(pre),col=66,inputsuffix='allz2.dat',label=r'$\tau_V$', minval=0, maxval=5,binned=True,exclude=exclude) pa2.simple_batch(sys.argv[1])