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

Sample gaussian_phz() with bounds #114

Closed
ntessore opened this issue Jul 19, 2023 · 0 comments · Fixed by #115
Closed

Sample gaussian_phz() with bounds #114

ntessore opened this issue Jul 19, 2023 · 0 comments · Fixed by #115
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ntessore
Copy link
Collaborator

It would be useful if the gaussian_phz() accepted lower= and upper= bounds, so that photometric redshifts can be sampled conditional on being in a given bin.

@ntessore ntessore added enhancement New feature or request ⚡ glass.galaxies labels Jul 19, 2023
@ntessore ntessore added this to the v2023.7 milestone Jul 19, 2023
@ntessore ntessore self-assigned this Jul 19, 2023
ntessore added a commit that referenced this issue Jul 20, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant