From 8890f96f3528978f25e401ff3be6b2f1dabd0424 Mon Sep 17 00:00:00 2001 From: Farrah Molina Date: Thu, 31 Oct 2024 12:11:20 -0500 Subject: [PATCH] Trying to find what's wrong in simulated ra and dec data file --- mcmc_test.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mcmc_test.py b/mcmc_test.py index 46f0ae78..378826c2 100644 --- a/mcmc_test.py +++ b/mcmc_test.py @@ -42,10 +42,22 @@ my_driver.sampler.run_sampler(total_orbits, burn_steps=burn_steps, thin=thin) +try: + my_driver.sampler.run_sampler(total_orbits, burn_steps=burn_steps, thin=thin) + print("Sampler ran successfully.") +except Exception as e: + print(f"Error during sampling: {e}") + if my_driver.sampler.results is not None: print("Sampler results are available.") - print("Number of orbits:", len(my_driver.sampler.results.post)) + print("Results attributes:", dir(my_driver.sampler.results)) + + if my_driver.sampler.results.post is not None: + print("Posterior samples found.") + else: + print("No posteriors generated; `post` is None.") else: - print("No sampler results available. Sampler may not have run correctly.") + print("No sampler results available.") +