sblunt / orbitize

Orbit-fitting for directly imaged objects
https://orbitize.info
Other
74 stars 43 forks source link

Result File From Resumed MCMC Fails to Save #370

Closed HenryDennen closed 2 weeks ago

HenryDennen commented 1 month ago

Describe the bug Trying to resume a previous MCMC fit that used Gaia-Hipparcos, Relative Astrometry, and RV. After initializing a new a MCMC sampler (with the path to the previous hdf5 file passed through the keyword "prev_result_filename") the sampler fails to save the the result (with results.save_results) and gives the below error. FileNotFoundError: [Errno 2] No such file or directory: 'thisisprettyhackysorrylmao'

To Reproduce 1: Click on this GitHub gist

  1. Scroll down to the end of the gist
  2. See error

Expected behavior When creating a new MCMC sampler, according to the orbitize! docs, if a filename to an HDF5 containing a .Results object is passed to prev_result_filename, the MCM will restart from where it left off. After running the MCMC sampler for the specified number of burn-in steps and posterior samples, the results should be saved to an HDF5 named "Hip21547_RERUN_results.hdf5". and then print a message saying the results were saved there to that filename.

Screenshots

Screen Shot 2024-07-15 at 12 00 10 PM

Desktop (please complete the following information):

Additional context @wbalmer has been helping me out.

wbalmer commented 1 month ago

Wanted to bump and say that I encountered this error a while ago but was too lazy to create a new issue at the time (oops!)

sblunt commented 2 weeks ago

Addressed in PR #374