Skip to content

Commit

Permalink
plot scale removed
Browse files Browse the repository at this point in the history
addressing #31 .
  • Loading branch information
mtakahiro committed Aug 4, 2022
1 parent 53418c1 commit 2f2c957
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions gsf/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def update_input(self, inputs, c:float=3e18, Mpc_cm:float=3.08568025e+24, m0set:
self.zmcmin = self.zgal - float(self.fd_cat['ez_l'][iix])
self.zmcmax = self.zgal + float(self.fd_cat['ez_u'][iix])
except:
print('ZMCMIN and ZMCMAX cannot be found. z range is set to z \pm 1.0')
self.zmcmin = None
self.zmcmax = None

Expand Down
4 changes: 2 additions & 2 deletions gsf/maketmp_z0.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def make_tmp_z0_bpass(MB, lammin=100, lammax=160000, Zforce=None, \
fd_sed = ascii.read(file_sed)
fd_stm = ascii.read(file_stm)

wave0 = fd_sed['col1']
wave0 = fd_sed['col1']
age_stm = fd_stm['col1']
mass_formed = fd_stm['col2'][0]

Expand Down Expand Up @@ -429,7 +429,7 @@ def make_tmp_z0_bpass(MB, lammin=100, lammax=160000, Zforce=None, \
tautmp = ( 10**(lage_temp[iis]+0.05) - 10**(lage_temp[iis]-0.05) ) / 1e9 # Gyr
agetmp = (age[ss]+age[ss-1])/2.

flux0 = fd_sed['col%d'%(iis+2)] #sp.get_spectrum(tage=age[ss], peraa=True)
flux0 = fd_sed['col%d'%(iis+2)]
ms[ss] = fd_stm['col2'][iistm]
mass_formed_tot += mass_formed

Expand Down
23 changes: 12 additions & 11 deletions gsf/plot_sed.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,17 +519,18 @@ def gaus(x,a,x0,sigma):
ax1.set_xticks(xticks)
ax1.set_xticklabels(xlabels)

dely1 = 0.5
while (ymax-0)/dely1<1:
dely1 /= 2.
while (ymax-0)/dely1>4:
dely1 *= 2.

y1ticks = np.arange(0, ymax, dely1)
ax1.set_yticks(y1ticks)
ax1.set_yticklabels(np.arange(0, ymax, dely1), minor=False)
ax1.yaxis.set_major_formatter(FormatStrFormatter('%.1f'))
ax1.yaxis.labelpad = 1.5
if False:
dely1 = 0.5
while (ymax-0)/dely1<1:
dely1 /= 2.
while (ymax-0)/dely1>4:
dely1 *= 2.

y1ticks = np.arange(0, ymax, dely1)
ax1.set_yticks(y1ticks)
ax1.set_yticklabels(np.arange(0, ymax, dely1), minor=False)
ax1.yaxis.set_major_formatter(FormatStrFormatter('%.1f'))
ax1.yaxis.labelpad = 1.5

xx = np.arange(100,400000)
yy = xx * 0
Expand Down

0 comments on commit 2f2c957

Please sign in to comment.