Closed facero closed 1 year ago
Have a look at the log-likelihood definition:
with pyxspec: https://github.com/JohannesBuchner/BXA/blob/master/bxa/xspec/solver.py#L160
with sherpa: https://github.com/JohannesBuchner/BXA/blob/master/bxa/sherpa/solver.py#L123
Ah ok so it keeps the original Sherpa choice and just mulitply by -0.5. Thanks
Description
As a way to understand how the NS works and to visualize the evolution of likelihood as a function of iterations, I'm looking at the logL column in the
weighted_post.txt
.I'm using unbinned X-ray spectral data and the
set_stat("wstat")
in Sherpa. The background is extracted from the same observation. The BXA fileweighted_post.txt
looks this :In this case, the BXA maximized the logL value (the last rows with higher value are better) whereas in the sherpa or Xspec implementation, we minize Cstat or Wstat. How is this logL value is calculated ? Can it be related to Wstat value computed by sherpa ?
One the thing I'm trying is comparing the Wstat values from sherpa's fit to the solutions found by BXA.