Skip to content
Snippets Groups Projects
Commit 31ec8182 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Initial work

parent dded5f6c
No related branches found
No related tags found
1 merge request!778Add dynesty sample dump
...@@ -572,6 +572,16 @@ class Dynesty(NestedSampler): ...@@ -572,6 +572,16 @@ class Dynesty(NestedSampler):
if self.sampler.pool is not None: if self.sampler.pool is not None:
self.sampler.M = self.sampler.pool.map self.sampler.M = self.sampler.pool.map
self.dump_samples_to_dat()
def dump_samples_to_dat(self):
from dynesty.utils import resample_equal
sampler = self.sampler
weights = np.exp(sampler.saved_logwt - sampler.saved_logz[-1])
samples = resample_equal(np.array(sampler.saved_v), weights)
self.search_parameter_keys
import IPython; IPython.embed()
def plot_current_state(self): def plot_current_state(self):
if self.check_point_plot: if self.check_point_plot:
import dynesty.plotting as dyplot import dynesty.plotting as dyplot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment