Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marginalize over supernova M parameter #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Marginalize over supernova M parameter #64

wants to merge 1 commit into from

Conversation

joezuntz
Copy link
Owner

This adds analytic marginalization over the supernova absolute magnitude M in the pantheon likelihood.

@joezuntz
Copy link
Owner Author

Comparison plots for pantheon example (without Riess or H0) with and without marginalization

2D_cosmological_parameters--omega_m_cosmological_parameters--omega_k
2D_supernova_params--m_cosmological_parameters--omega_k

@tamarastro
Copy link

Based on the equations in Goliath et al. 2001 the constant term on line 37 and line 148 is flipped, and has a superfluous 0.5. Although on line 156 you multiply D by 2 so that gets rid of the superfluous 0.5 (but I think you could drop both the 0.5 and the 2). Then on line 156 the sign of -2 * D should be +2 * D I think.
Line 37:
self.marginalize_const_term = 0.5 * np.log(2 * np.pi / self.marginalize_c_term)
->
self.marginalize_const_term = np.log( self.marginalize_c_term / ( 2 * np.pi ) )
Line 148:
D = (1/2) log(2 pi / C)
->
D = log(C / 2 pi)
Line 156:
change = -B ** 2 / C - 2 * D
->
change = -B ** 2 / C + D

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