Comments (5)
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 CS_Photo
function only has data starting at 100 eV, which is why you are now getting that error. Basically xraylib doesn't have any data available for the soft X-ray energy range, mainly because it's not available, and would have large uncertainties if it did.
Hope this helps!
from xraylib.
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 ValueError
I can implement the behaviour I want? Or are all of cross section data over the same range (I'm afraid our library does not give me access to the paper where I may well find this information - sorry!)
from xraylib.
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).
from xraylib.
I am not sure that the cross section data has the same range across types and atomic numbers
Ok, thanks - this is what I was thinking. At the moment CP_Photo(10,0.00001)
raises the same exception as CP_Photo(10,100000)
but since I can assume that they all work at 1 keV I can catch the ValueError and sort out the logic at my end.
from xraylib.
Thanks for the answer. This was also my question
from xraylib.
Related Issues (20)
- Python memory leak
- New language bindings for Go and Rust HOT 1
- questions about installation with meson HOT 4
- Cross-compilation issue with prdata HOT 3
- static lib for MS VSC++
- TypeError in python bindings using numpy ints HOT 5
- Difference in #shells between xraylib and xmimsimdata.h5 HOT 3
- EdgeEnergy shell is invalid HOT 2
- Issue with python example xrlexample5.py (numpy: int64 vs int) HOT 2
- How to install xraylib package in win10? HOT 3
- Repository for Win installer can't be reached HOT 2
- lvserver packages offline HOT 1
- The photoelectric cross sections of Hydrogen HOT 3
- can't open xraylib-web, and build php failed HOT 1
- Non-zero return despite error for PM3_auger_cascade_kissel and PM4_auger_cascade_kissel HOT 2
- The value of the photoionization cross section of hydrogen at energies above 1 keV HOT 1
- Compile error HOT 9
- How to cross-compile the xraylib code to used on Android HOT 1
- Version in PyPI HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xraylib.