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

Problems generating cdfs from an array with very few points #979

Open
kslong opened this issue Nov 16, 2022 · 0 comments
Open

Problems generating cdfs from an array with very few points #979

kslong opened this issue Nov 16, 2022 · 0 comments

Comments

@kslong
Copy link
Collaborator

kslong commented Nov 16, 2022

In trying to generate a cdf from a very sparse grid for a certain interval (of wavelength space), cdf_gen_from_array seems to fail if there are no points in the cdf within the interval, even though there are points in the array both above and below the interval. Currently, the program exits in this instance.

What should happen is that a cdf should be created so that one not a uniform sampling, but one that is linear depending on the value of the pdf at the two points that are on the outside of the region.

(Note that in looking at this problem, it is clear that some additional work could be done on cdfs. The problem proobaly would not have arisen had the cdf been generated on a larger range, and cdf_get_rand_limit had been used to generate random numbers in a small region. Instead here, a special effort was made to generate a cdf for a small range (of wavelength) space so that cdf_get_rand was used. Alll of this dates back to a lot of surgery that Nick did on cdfs some years ago. What was done generally works, but as a result the cdf routines are not used in exactly the same way throughout the code)

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

No branches or pull requests

1 participant