Skip to content

Commit

Permalink
Trying to find what's wrong in simulated ra and dec data file
Browse files Browse the repository at this point in the history
  • Loading branch information
Farrmol committed Oct 31, 2024
1 parent f7c2208 commit 8890f96
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mcmc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")



0 comments on commit 8890f96

Please sign in to comment.