Skip to content

Fixes#53

Open
richardson-t wants to merge 23 commits into
keflavich:masterfrom
richardson-t:fixes
Open

Fixes#53
richardson-t wants to merge 23 commits into
keflavich:masterfrom
richardson-t:fixes

Conversation

@richardson-t
Copy link
Copy Markdown
Collaborator

Spot fixes for data/process errors found during paper review.

@richardson-t richardson-t requested a review from keflavich May 22, 2026 14:19
@keflavich
Copy link
Copy Markdown
Owner

In opt_sampling.ipynb, don't show the Koen & Kondlo mass function. I think that's not a sensible thing to do: Koen & Kondlo assumes measurement error, but optimal sampling assumes that the mass function is set by physics, not measurement error. Right?

Comment thread imf/sampling.py
Comment on lines +482 to +489
def _max_star_prime(m, M_res, massfunc):
"""
Returns the derivative of _max_star at mass m. Used for Newton's method in
the case of an infinite upper bound on the provided mass function.
"""
term1 = _prefactor(m, massfunc)**2 * massfunc(m) * massfunc.m_integrate(massfunc.mmin, m)[0]
term2 = m * massfunc(m) * _prefactor(m, massfunc)
return -term1 - term2 - 1
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M_res isn't used. I suspect it's needed as a dummy variable here because of the use in root_scalar below. If that's right, add a note that M_res is a dummy variable or change its name to _ and still add that note

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