You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: