Git Product home page Git Product logo

Comments (4)

tschoonj avatar tschoonj commented on May 26, 2024

Hi Gromitsu,

Thanks for reporting the bug: it has to do with the fact that there are no KB transitions for this element.
I am currently on holidays and should be able to fix somewhere around the end of next week.

In the meantime, you should assume that RadRate(6, KA_LINE) is equal to 1, or use the individual contributions KL3_LINE and KL2_LINE (which are the corresponding IUPAC notations of KA1_LINE and KA2_LINE), which is the recommended usage anyway.

Best,

Tom

Op 18-apr.-2014, om 19:08 heeft gromitsun [email protected] het volgende geschreven:

I found RadRate sometimes gives an error message (e.g. "Line not available in function RadRate") but returns a nonzero value.

For example, if you try RadRate(6, KB_LINE), it gives the error message, but also returns 1.0 instead of 0.0.

And RadRate(6, KA_LINE) does not equal RadRate(6, KA1_LINE)+RadRate(6, KA2_LINE)


Reply to this email directly or view it on GitHub.

from xraylib.

gromitsun avatar gromitsun commented on May 26, 2024

Hi Tom,

Thanks for your reply. Actually, I found that even with the recommended IUPAC notations, the problem still exists. For example, LineEnergy(30,-91) is zero and gives an error message, while RadRate(30, -91) is nonzero. The same is true for Z = 30, line = -65.

Thanks.

from xraylib.

tschoonj avatar tschoonj commented on May 26, 2024

Hi Gromitsun,

This is actually a different issue: the default XRF line energies in xraylib have been calculated using the difference of the binding energies of the electrons involved in the transition. You can get these binding energies using the EdgeEnergy function. So what you get in your example (L3N1_LINE = -91) corresponds to EdgeEnergy(30, L3_SHELL) - EdgeEnergy(30,N1_SHELL)

However these values have been precalculated and have been inserted into the edges.dat file that you will find in the data subdirectory of the xraylib source tarball. This file is converted into C source code during the build and these values cannot be altered afterwards.

Now to get back to the root of your problem: there is no edge energy available for the N1 shell of Zn, so there cannot be any line energies for this element involving the N1 shell.

The RadRate database is in no way connected to the LineEnergy database and comes from an author that had his own set of XRF line energies, which differ from the values in xraylib.

I recommend you either find an N1 edge energy for Zn and calculate the line energy or find the L3N1 XRF line energy directly in literature or obtain it from experimental data and add it to the fluor_lines.dat file before compiling xraylib: it will then become available…

A quick search in my Lynn Kissel cross section files tells me that the value she found for the N1 absorption shell energy is 8.61513E-03 keV, but I have no idea about whether or not it is reliable… If you could confirm this, I might add it to a future release.

Cheers,

Tom

from xraylib.

tschoonj avatar tschoonj commented on May 26, 2024

Hello again,

I realized that in the case of Zn, the N1 shell electrons correspond to the valence electrons 4s2, which, in all cases I can think of, will participate in chemical bonds and therefore lose their 'well-defined' edge energies and line energies.

The databases that xraylib uses are the result of quantum mechanical calculations that assume a single isolated, uncharged atom: this is obviously very different from what occurs when dealing with a real life specimen… As a rule, do not trust any data from xraylib that concerns valence electrons.

from xraylib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.