Skip to content

sampler.MCMC._logl() 2d-array handling #392

@manduhmia

Description

@manduhmia

Describe the bug
The current ._logl() function of the Sampler.MCMC object does not produce the same lnlikelihood posteriors as in the results.lnlike attribute. In order to produce the same posteriors you need to individually pass in an array of orbit parameters for each orbit.

To Reproduce
Steps to reproduce the behavior:

  1. load in some orbitize run results using results.Results()
  2. produce the lnlikelihood posterior from the results object ()
  3. create a sampler.MCMC() object from the results.system object -- orbitize.sampler.MCMC(results.system)
  4. use the sampler.MCMC._logl() function passing in the results.post (an MxR array of M orbits and R fitting params()
  5. compare the two posteriors (should be the same distribution, but arent)

Expected behavior
We expect that the results.lnlike distribution and the sampler.MCMC._logl() distributions are the same for the same orbit fit.

Desktop (please complete the following information):

  • macOS 15.7.4
  • orbitize! Version 3.1.0

Additional context
Seems like the actual logl calculation is correct in sampler.MCMC._logl() but the handling of many orbits goes wrong somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions