astropy/halotools

Edge case bug in `noisy_percentile`

Closed this issue · 3 comments

I'm finding that when passing in a correlation of -1 to noisy_percentile, i get identical results to passing in 1, but passing in something like -0.9 gives the correct behavior. I think the solution would be to remove the abs in the check condition on line 149, and possibly add another check for -1 that returns percentile[::-1]

Good catch on this edge case, @mclaughlin6464. Looks like an easy fix. I should be able to get to this soon, and will make sure this makes it into v0.7.

I can make a pull request if you need too, I was feeling lazy last night but feel more inspired this Monday morning

Agree this resolves the issue, thanks for doing this!