Skip to content

Commit

Permalink
changed deprecated keyword normed to density
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarayan committed Apr 26, 2018
1 parent bc72541 commit 0879780
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WDmodel/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def plot_mcmc_line_fit(spec, linedata, model, cont_model, draws, balmer=None):
``dtype=[('wave', '<f8'), ('flux', '<f8'), ('flux_err', '<f8')]``
linedata : :py:class:`numpy.recarray`
The observations of the spectrum corresponding to the hydrogen Balmer
lines. Must have
lines. Must have
``dtype=[('wave', '<f8'), ('flux', '<f8'), ('flux_err', '<f8'), ('line_mask', 'i4'), ('line_ind', 'i4')]``
model : :py:class:`WDmodel.WDmodel.WDmodel` instance
The DA White Dwarf SED model generator
Expand Down Expand Up @@ -588,7 +588,7 @@ def plot_mcmc_line_fit(spec, linedata, model, cont_model, draws, balmer=None):
ax_resid = fig2.add_subplot(gs2[0])
smoothedmod, wres, _, _, _ = draws[-1]
res = spec.flux - smoothedmod - wres
hist(res, bins='knuth', normed=True, histtype='stepfilled', color='grey', alpha=0.5, label='Residuals',ax=ax_resid)
hist(res, bins='knuth', density=True, histtype='stepfilled', color='grey', alpha=0.5, label='Residuals',ax=ax_resid)
ax_resid.axvline(0., color='red', linestyle='--')

# label the axes, rotate the tick labels, and get the xlim
Expand Down Expand Up @@ -657,7 +657,7 @@ def plot_draw(draw, color='red', alpha=1.0):

# plot the residuals of this line
ax_resid = fig2.add_subplot(gs2[k])
hist(linedata.flux[mask] - (smoothedmod + wres)[ind] , bins='knuth', normed=True,ax=ax_resid,\
hist(linedata.flux[mask] - (smoothedmod + wres)[ind] , bins='knuth', density=True, ax=ax_resid,\
histtype='stepfilled', label=label, alpha=0.3, color=next(colors))
ax_resid.axvline(0., color='red', linestyle='--')

Expand Down Expand Up @@ -705,7 +705,7 @@ def plot_mcmc_model(spec, phot, linedata, scale_factor, phot_dispersion,\
``dtype=[('pb', 'str'), ('mag', '<f8'), ('mag_err', '<f8')]``
linedata : :py:class:`numpy.recarray`
The observations of the spectrum corresponding to the hydrogen Balmer
lines. Must have
lines. Must have
``dtype=[('wave', '<f8'), ('flux', '<f8'), ('flux_err', '<f8'), ('line_mask', 'i4'), ('line_ind', 'i4')]``
scale_factor : float
factor by which the flux was scaled for y-axis label
Expand Down

0 comments on commit 0879780

Please sign in to comment.