tschoonj / xraylib

A library for X-ray matter interaction cross sections for X-ray fluorescence applications
https://github.com/tschoonj/xraylib/wiki
Other
120 stars 54 forks source link

Breast tissue - NIST #95

Open badruk opened 5 years ago

badruk commented 5 years ago

Am I missing something or is there no way to access to NIST's breast tissue datas with the script? I can't find anything under xrl.GetCompoundDataNISTList() relatable to this link

At the same time would it be possible to add a way to automatically retrieve NIST's density for compounds?

Using python + version downloaded via conda-forge

tschoonj commented 5 years ago

Unfortunately not: if it's not available via https://physics.nist.gov/cgi-bin/Star/compos.pl, then it's not in xraylib.

I am not sure what you are asking for: do you mean that for a given chemical formula, xraylib should fetch or calculate the density? Or is this only for compounds from the NIST catalog in xraylib?

badruk commented 5 years ago

Thank you for your quick reply.

An analog for compounds of xraylib.ElementDensity(elem), obviously only for those compounds available via NIST catalog in xraylib

tschoonj commented 5 years ago

I can see how this could be useful when combined with CS_Total_CP.

I don't really have time to write this right now... feel free to open a pull request.

badruk commented 5 years ago

Unfortunately not: if it's not available via https://physics.nist.gov/cgi-bin/Star/compos.pl, then it's not in xraylib.

Would it be possible knowing the composition (https://physics.nist.gov/PhysRefData/XrayMassCoef/tab2.html) of a compound to use it inside xraylib?

tschoonj commented 5 years ago

Well if you know the atomic numbers and weights of all constituent elements, then you can certainly produce the compound cross sections by looping over it.

If you're asking if you can modify the internal xraylib tables with your own compositions, unfortunately that's not possible.