Closed astroshrey closed 3 years ago
Thanks for the bug fix!
After some tests, I realized that this bug fix will return an empty array if there are no values in the input array that are below lambda_0, and this creates a bug when I use nearest_index
in another part of the code. I will revert back to the previous implementation, and I will implement a quick fix in the calculation of cross-sections that returns zero when lambda[i] > lambda_0.
Hydrogen photoionization calculation fails on an off-by-one error when the nearest index to lambda_0 is > lambda_0 (causing epsilon to be sqrt(negative number) in the hydrogen photoionization cross section). The fix should ensure you're getting the closest index strictly less than lambda_0.