Skip to content

Added calc_chisq method to fix issue with calculated chi2#63

Merged
wbalmer merged 5 commits intowbalmer:mainfrom
tomasstolker:chi2_fix
May 21, 2025
Merged

Added calc_chisq method to fix issue with calculated chi2#63
wbalmer merged 5 commits intowbalmer:mainfrom
tomasstolker:chi2_fix

Conversation

@tomasstolker
Copy link
Contributor

The median_chi2_red was not correct because it was calculated from the likelihood function, which also contains the additive normalization term.

I have added the calc_chisq method, which is basically duplicating loglike, so not an elegant solution. loglike is used by the nested sampler so should only return the likelihood, therefore I could not quickly come up with a better solution.

Note that median_chi2_red is only shown in the plot, so the issue did not impact the fit.

@wbalmer wbalmer merged commit e4e481a into wbalmer:main May 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants