Skip to content

Commit

Permalink
plot scale
Browse files Browse the repository at this point in the history
  • Loading branch information
mtakahiro committed Oct 19, 2022
1 parent 715a601 commit fd24b97
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions gsf/gsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def run_gsf_template(inputs, fplt=0, tau_lim=0.001, idman=None, nthin=1, delwave
def run_gsf_all(parfile, fplt, cornerplot=True, f_Alog=True, idman=None, zman=None, f_label=True, f_symbol=True,
f_SFMS=True, f_fill=True, save_sed=True, figpdf=False, mmax=300, skip_sfh=False, f_fancyplot=False,
skip_zhist=False, tau_lim=0.001, tset_SFR_SED=0.1, f_shuffle=False, amp_shuffle=1e-2, Zini=None,
nthin=1, delwave=1, f_plot_resid=False):
nthin=1, delwave=1, f_plot_resid=False, scale=1e-19):
'''
Purpose
-------
Expand Down Expand Up @@ -234,7 +234,7 @@ def run_gsf_all(parfile, fplt, cornerplot=True, f_Alog=True, idman=None, zman=No
plot_sed(MB, fil_path=MB.DIR_FILT,
figpdf=figpdf, save_sed=save_sed, mmax=mmax,
dust_model=MB.dust_model, DIR_TMP=MB.DIR_TMP, f_label=f_label, f_fill=f_fill,
f_fancyplot=f_fancyplot, f_plot_resid=f_plot_resid)
f_fancyplot=f_fancyplot, f_plot_resid=f_plot_resid, scale=scale)

'''
if fplt == 4:
Expand Down
28 changes: 14 additions & 14 deletions gsf/plot_sed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,11 +1198,11 @@ def func_tmp(xint,eobs,fmodel):
if f_label:
fd = fits.open(MB.DIR_OUT + 'SFH_' + ID + '.fits')[0].header
if MB.f_dust:
label = 'ID: %s\n$z_\mathrm{obs.}:%.2f$\n$\log M_\mathrm{*}/M_\odot:%.2f$\n$\log M_\mathrm{dust}/M_\odot:%.2f$\n$T_\mathrm{dust}/K:%.1f$\n$\log Z_\mathrm{*}/Z_\odot:%.2f$\n$\log T_\mathrm{*}$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
label = 'ID: %s\n$z:%.2f$\n$\log M_\mathrm{*}/M_\odot:%.2f$\n$\log M_\mathrm{dust}/M_\odot:%.2f$\n$T_\mathrm{dust}/K:%.1f$\n$\log Z_\mathrm{*}/Z_\odot:%.2f$\n$\log T_\mathrm{*}$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
%(ID, zbes, float(fd['Mstel_50']), MD50, TD50, float(fd['Z_MW_50']), float(fd['T_MW_50']), float(fd['AV_50']), fin_chi2)
ylabel = ymax*0.45
else:
label = 'ID: %s\n$z_\mathrm{obs.}:%.2f$\n$\log M_\mathrm{*}/M_\odot:%.2f$\n$\log Z_\mathrm{*}/Z_\odot:%.2f$\n$\log T_\mathrm{*}$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
label = 'ID: %s\n$z:%.2f$\n$\log M_\mathrm{*}/M_\odot:%.2f$\n$\log Z_\mathrm{*}/Z_\odot:%.2f$\n$\log T_\mathrm{*}$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
%(ID, zbes, float(fd['Mstel_50']), float(fd['Z_MW_50']), float(fd['T_MW_50']), float(fd['AV_50']), fin_chi2)
ylabel = ymax*0.25

Expand Down Expand Up @@ -2457,11 +2457,11 @@ def func_tmp(xint,eobs,fmodel):
if f_label:
fd = fits.open(MB.DIR_OUT + 'SFH_' + ID + '.fits')[0].header
if f_dust:
label = 'ID: %s\n$z_\mathrm{obs.}:%.2f$\n$\log M_*/M_\odot:%.2f$\n$\log M_\mathrm{dust}/M_\odot:%.2f$\n$T_\mathrm{dust}/K:%.1f$\n$\log Z_*/Z_\odot:%.2f$\n$\log T_0$/Gyr$:%.2f$\n$\log \\tau$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
label = 'ID: %s\n$z:%.2f$\n$\log M_*/M_\odot:%.2f$\n$\log M_\mathrm{dust}/M_\odot:%.2f$\n$T_\mathrm{dust}/K:%.1f$\n$\log Z_*/Z_\odot:%.2f$\n$\log T_0$/Gyr$:%.2f$\n$\log \\tau$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
%(ID, zbes, float(fd['Mstel_50']), MD50, TD50, float(fd['Z_MW_50']), float(fd['T_MW_50']), float(fd['TAU_50']), float(fd['AV_50']), fin_chi2)
ylabel = ymax*0.45
else:
label = 'ID: %s\n$z_\mathrm{obs.}:%.2f$\n$\log M_*/M_\odot:%.2f$\n$\log Z_*/Z_\odot:%.2f$\n$\log T_0$/Gyr$:%.2f$\n$\log \\tau$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
label = 'ID: %s\n$z:%.2f$\n$\log M_*/M_\odot:%.2f$\n$\log Z_*/Z_\odot:%.2f$\n$\log T_0$/Gyr$:%.2f$\n$\log \\tau$/Gyr$:%.2f$\n$A_V$/mag$:%.2f$\n$\\chi^2/\\nu:%.2f$'\
%(ID, zbes, float(fd['Mstel_50']), float(fd['Z_MW_50']), float(fd['T_MW_50']), float(fd['TAU_50']), float(fd['AV_50']), fin_chi2)
ylabel = ymax*0.4

Expand Down Expand Up @@ -2910,19 +2910,19 @@ def plot_corner_physparam_summary(MB, fig=None, out_ind=0, DIR_OUT='./', mmax=30
# For redshift
if zbes<2:
zred = [zbes, 2, 3, 6]
zredl = ['$z_\mathrm{obs.}$', 2, 3, 6]
zredl = ['$z$', 2, 3, 6]
elif zbes<2.5:
zred = [zbes, 2.5, 3, 6]
zredl = ['$z_\mathrm{obs.}$', 2.5, 3, 6]
zredl = ['$z$', 2.5, 3, 6]
elif zbes<3.:
zred = [zbes, 3, 6]
zredl = ['$z_\mathrm{obs.}$', 3, 6]
zredl = ['$z$', 3, 6]
elif zbes<6:
zred = [zbes, 6]
zredl = ['$z_\mathrm{obs.}$', 6]
zredl = ['$z$', 6]
else:
zred = [zbes, 12]
zredl = ['$z_\mathrm{obs.}$', 12]
zredl = ['$z$', 12]

Tzz = np.zeros(len(zred), dtype='float')
for zz in range(len(zred)):
Expand Down Expand Up @@ -3981,17 +3981,17 @@ def plot_corner_physparam_frame(ID, PA, Zall=np.arange(-1.2,0.4249,0.05), age=[0
# For redshift
if zbes<2:
zred = [zbes, 2, 3, 6]
#zredl = ['$z_\mathrm{obs.}$', 2, 3, 6]
zredl = ['$z_\mathrm{obs.}$', 2, 3, 6]
#zredl = ['$z$', 2, 3, 6]
zredl = ['$z$', 2, 3, 6]
elif zbes<2.5:
zred = [zbes, 2.5, 3, 6]
zredl = ['$z_\mathrm{obs.}$', 2.5, 3, 6]
zredl = ['$z$', 2.5, 3, 6]
elif zbes<3.:
zred = [zbes, 3, 6]
zredl = ['$z_\mathrm{obs.}$', 3, 6]
zredl = ['$z$', 3, 6]
elif zbes<6:
zred = [zbes, 6]
zredl = ['$z_\mathrm{obs.}$', 6]
zredl = ['$z$', 6]

Tzz = np.zeros(len(zred), dtype='float')
for zz in range(len(zred)):
Expand Down

0 comments on commit fd24b97

Please sign in to comment.