The calculated refraction index is much different with XOP software.
Closed this issue · 4 comments
The refraction index of C, Si, Ca with Xraylib are much different with XOP software (https://www.esrf.fr/Instrumentation/software/data-analysis/xop2.4). The calculation energy ranges from 10keV to 100keV. The fuctions I used in the python code are xraylib.Refractive_Index_Re and xraylib.Refractive_Index_Im.
The results come from Xraylab 4.0:
The results come from XOP 2.3:
So I am confused which one is right. Do you have any tests about the refraction index to make sure they are right?
I'm looking forward to hearing from you. Thanks.
@srio what do you think is happening here? I guess we are using rather different values for the attenuation coefficients?
Yes. It is due to attenuation. The differences should appear in beta and it is due to the absorption cross section.
In XOP we were using absorption due to only photoelectric effect.
In xraylib we discussed this issue many years ago and concluded that it is more accurate to include the total cross section, thus including inelastic and also Rayleigh cross sections.
In OASYS/XOPPY we are also using the same philosophy than in xraylib, so the results in OASYS/f1f2 are different than in XOP/xf1f2. I would suggest to use better OASYS instead XOP. Almost all functionality is there. XOP is not longer maintained.
Depending on the type of calculation you do the xraylib absorption may be overestimated: it consider "absorbed" (in fact: attenuated or removed from the beam) all photons that interact. If your interest is to calculate the power load this is "too much" as there are many photons that may scape and do not contribute to the absorbed energy.
I hope this clarifies the situation.