Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jchodera committed Nov 4, 2016
1 parent 5b9e22e commit b35a12a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AssayTools/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def run_mcmc(self, dbfilename='output'):
sigma = keywords[keyword]

print('%-64ss : %8.5f' % (parameter_name, sigma))
mcmc.use_step_method(pymc.Metropolis, stochastic, proposal_sd=sigma, proposal_distribution='Normal')
mcmc.use_step_method(pymc.Metropolis, stochastic, proposal_sd=sigma, proposal_distribution=None)

print('Running MCMC...')
mcmc.sample(iter=(nburn+niter), burn=nburn, thin=nthin, progress_bar=True, tune_throughout=True)
Expand Down Expand Up @@ -894,10 +894,11 @@ def generate_plots(self, mcmc, map_fit=None, pdf_filename=None):
plt.figure(figsize=(12, 8))
plt.hold(True)
niterations = len(trace)
plt.plot([0, niterations], [mle, mle], 'k-')
plt.plot([0, niterations], [mle, mle], 'r-')
plt.plot(trace, 'k.')
plt.xlabel('iteration')
plt.ylabel(name)
plt.title(name)
pdf.savefig()
plt.close()

Expand Down

0 comments on commit b35a12a

Please sign in to comment.