-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Error returned when extrapolating cross section values #204
Comments
Hi Dean, I am well and hope that the same goes for you. What you have run into is not a bug and is in fact intended behaviour. Before 4.0.0 I allowed users querying lower and higher energies than were available in the energy range of the dataset. There wouldn't be any real extrapolation happening though, just the cross section for the lowest/highest available energy would be returned, which didn't feel right. The Hope this helps! |
Ah - I see. I suppose that sounds like a more reasonable approach than returning knowingly wrong answers! Is the raw data exposed anywhere through the python bindings, so I when I catch a |
The raw data is not exposed, not even in the core C library. I am not sure that the cross section data has the same range across types and atomic numbers. Let me know If you'd like a copy of the xraylib manuscript (even though it's outdated). |
Ok, thanks - this is what I was thinking. At the moment |
Thanks for the answer. This was also my question |
Hi Tom, hope you're well.
I'm updating some dependencies and found an issue with calculating cross section data for low energies. The error resembles #187 in that it's related to extrapolation of the source data. I have seen this affecting
CS_Photo
,CS_Compt
,CS_Rayl
, and their various childrenCS_Total
,*_CP
etc.Using the python bindings, version 3.3.0 gave:
and with the up-to-date version:
For #187 the fix appears to be linear ln-ln extrapolation from the lowest 2 energies. I'm happy to put in a PR to apply a similar fix to these 3 functions, but I'm not 100% sure whether this is physically meaningful in this case; or whether it's preferable to just return the lowest value in the source data. What do you think?
The text was updated successfully, but these errors were encountered: