Skip to content
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

Difference in #shells between xraylib and xmimsimdata.h5 #214

Closed
bbazi opened this issue Nov 28, 2022 · 3 comments
Closed

Difference in #shells between xraylib and xmimsimdata.h5 #214

bbazi opened this issue Nov 28, 2022 · 3 comments

Comments

@bbazi
Copy link

bbazi commented Nov 28, 2022

Hi Tom,

I was going through the 'advanced Compton energy' calculation in xmi_main.F90 of xmimsim and saw that a function 'ElectronConfig_Biggs' (see picture) is used to find the number of electrons inside a given shell of a certain element Z.

ElectronConfig_Biggs in advanced compton energy in xmi_main f90 of xmimsim

I went through all the xmimsim source files and xraylib functions and could not find this ElectronConfig_Biggs function, could you show where I can find/call this function? I'm trying to implement the advanced Compton energy calculation in my own scripts.

I do see that one could use the ElectronConfig function from xraylib but here I see some differences with the number of shells which are reported in the xmimsimdata.h5 file. See pictures for difference in carbon Z=6, 4 shells in xraylib and 3 shells in xmimsimdata).

C shell indices xraylib

C shell indices xmimsimdata

Here, I have added a table which shows all the differenced in #shells between xraylib and xmimsimdata.h5 for Z between 1 and 92. Please let me know if there is an error or if I'm totally misinterpreting what's going on here ;-) (maybe this Biggs function corrects for this?...)

Shells xraylib vs xmimsimdata

PS: The xmimsimdata file that I use for calculations I got from installing XMI-MSIM 8.1.

Cheers,
Benjamin

@tschoonj
Copy link
Owner

You did not look very hard then 😃

https://github.com/tschoonj/xraylib/search?q=ElectronConfig_Biggs shows you where this function is defined and how it is made available through the different languages.

The reason this function exists is that the Compton profiles from Biggs come with their own set of values for electron orbital occupancy, which happens to be different from the Kissel ones, which I consider to be 'canonical'. This is also why I never advertised this method, as I don't think that people should be really using it.

However, in XMI-MSIM I needed it because the Compton profiles are inextricably linked to these values...

@bbazi
Copy link
Author

bbazi commented Nov 28, 2022

Oh I see, thanks for the feedback and history behind this.
I found the Biggs electron configuration stored as:
xraylib/data/comptonprofiles/biggs_electron_configuration.dat

These do indeed match with the number of shells as given in the xmimsimdata.h5 file after 'scrapping' the shells with 0 electrons 😄

Again, thanks for the quick reply!
Cheers, Benjamin

@tschoonj
Copy link
Owner

You're welcome

Best,

Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants