Skip to content

Commit

Permalink
add verbose reading options; return sample probabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Apr 10, 2020
1 parent 3c10af5 commit 17cfb74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ultranest/integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ def plot_run(self):
self.logger.debug('Making run plot ... done')


def read_file(log_dir, x_dim, num_bootstraps=20, random=True):
def read_file(log_dir, x_dim, num_bootstraps=20, random=True, verbose=False):
"""
Read the output HDF5 file of UltraNest.
Expand All @@ -2309,6 +2309,8 @@ def read_file(log_dir, x_dim, num_bootstraps=20, random=True):
number of bootstraps to use for estimating logZ.
random: bool
use randomization for volume estimation.
verbose: bool
show progress
Returns
----------
Expand Down Expand Up @@ -2405,6 +2407,8 @@ def pop(Lmin):
logvol.append(main_iterator.logVolremaining)

niter += 1
if verbose:
print("%d..." % niter, end='\r')

saved_logl.append(Lmin)
saved_nodeids.append(node.id)
Expand Down Expand Up @@ -2474,6 +2478,7 @@ def pop(Lmin):
logwt=logwt,
niter=niter,
logl=saved_logl,
normalised_weights=saved_wt0,
)

return sequence, results

0 comments on commit 17cfb74

Please sign in to comment.