-
Notifications
You must be signed in to change notification settings - Fork 22
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
Errors in the Voigt profile functions #1019
Comments
I created a branch with the changes. Time spent applying masks passes from 1413 seconds to 603. This reduces the total time by about 25%! No significant differences in the delta statistics. More updates soon... |
Looks great! Can you open a PR so that we can merge the updates? |
Great work! Before you finalize this, please also fix the following lines in Ly b: picca/py/picca/delta_extraction/masks/dla_mask.py Lines 119 to 120 in c757ca4
Sorry, I don't know why I haven't done this myself! |
This looks like a great improvement! Wouldn't have guessed that our DLA model is that off. And the new one will be faster as well :-). |
desisim DLA profiles are implemented using It would be good to discuss the choice of coefficients. Currently, desisim uses Here are the values for Lyb line from NIST: I am inclined to pick the strongest line from these, i.e. |
ok, then at least the same functional form is used as the voigt_profile function is just a wrapper around wofz (maybe we should use the voigt_profile function in desisim as well as it's a C++ based wrapper by scipy ppl instead of our own thing). It would be great to use a unified model for all approaches and I agree that we'd ideally have someone in the decision loop who actually is an expert on those details. |
There are errors in the methods defining Voigt profiles.
I wanted to understand the Vogt profile functions in order to improve their performance (using scipy). But the code in
py/picca/dla.py
is very difficult to understand.Thankfully there is a different version of the Voigt profile functions in
bin/picca_compute_fvoigt.py
(functions voigt and tau). However, they lead to different results. For example, for a random choice of z_dla and N_hi these are the differences (settingT=5e4
for both):I was able to understand the process followed in picca_compute_fvoigt, and I am fairly sure it is correct. I followed Rutten 2003 at 3.3.3. I also wrote independently a function using Garnett et al 2018 Section 6:
which I think is easier to understand. This new function perfectly matches the results in picca_compute_fvoigt.
After confirming this, I was able to find the errors in
py/picca/dla.py
:picca/py/picca/dla.py
Line 85 in 72f27b7
This should be
6.265e8
picca/py/picca/dla.py
Line 95 in 72f27b7
This should be
lambda_rest_frame / lambda_lya
picca/py/picca/dla.py
Line 99 in 72f27b7
The Voigt function defined here gives different values in the very suppressed region. This should have a small impact. I did not understand what the function does anyway. I think we should use external libraries whenever is possible.
picca/py/picca/dla.py
Line 105 in 72f27b7
lambda_rest_frame
here should belambda_lya
.I tested the speed of the three functions
Note that the version we are using right now is more than a thousand times slower than any of the other two.
In conclusion, we need to implement one of this two methods as the standard one in
picca/dla.py
. But deltas and correlations will be affected, so maybe it is better if we could check the impact of this change first.The text was updated successfully, but these errors were encountered: