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

ENH: specify bounds for Gaussian photometric redshifts #115

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Conversation

ntessore
Copy link
Collaborator

Adds lower= and upper= keyword parameters to the gaussian_phz() function to sample Gaussian photometric redshifts within the given limits.

This currently uses a trivial rejection sampler from the full normal distribution, so it can easily become very inefficient if the bounds don't contain significant probability mass. Needs to be improved for serious use.

Closes: #114
Changed: The gaussian_phz() function now accepts bounds using lower= and upper= keyword parameters.

@ntessore ntessore merged commit 2f5d861 into main Jul 20, 2023
9 checks passed
@ntessore ntessore deleted the pr/gh-114 branch July 20, 2023 12:39
ntessore added a commit that referenced this pull request Jul 20, 2023
Fixes a print statement left in #115.

Also makes sure this doesn't happen again by adding the `flake8-print`
plugin to the pre-commit config.
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.

Sample gaussian_phz() with bounds
1 participant