def get_data(): sym, z, group, period, _type = ([], [], [], [], []) mass, density, absedge, alw, flyield, augyield = ([], [], [], [], [], []) for i in range(1, 104): s = xraylib.AtomicNumberToSymbol(i) sym.append(s) z.append(i) mass.append(xraylib.AtomicWeight(i)) density.append(str(xraylib.ElementDensity(i)) + ' g/cm^3') absedge.append(str(xraylib.EdgeEnergy(i, 0)) + ' keV') alw.append(str(xraylib.AtomicLevelWidth(i, 0)) + ' keV') flyield.append(str(xraylib.FluorYield(i, 0))) augyield.append(str(xraylib.AugerYield(i, 0))) pop_period(i, period) pop_group(i, group) pop_type(i, _type) data = { 'sym': sym, 'z': z, 'mass': mass, 'group': group, 'period': period, '_type': _type, 'density': density, 'flyield': flyield, 'augyield': augyield, 'absedge': absedge, 'alw': alw } return data
xraylib.ComptonProfile_Partial(26, xraylib.M5_SHELL, 1.1))) print("M1->M5 Coster-Kronig transition probability for Au : {}".format( xraylib.CosKronTransProb(79, xraylib.FM15_TRANS))) print("L1->L3 Coster-Kronig transition probability for Fe : {}".format( xraylib.CosKronTransProb(26, xraylib.FL13_TRANS))) print("Au Ma1 XRF production cs at 10.0 keV (Kissel): {}".format( xraylib.CS_FluorLine_Kissel(79, xraylib.MA1_LINE, 10.0))) print("Au Mb XRF production cs at 10.0 keV (Kissel): {}".format( xraylib.CS_FluorLine_Kissel(79, xraylib.MB_LINE, 10.0))) print("Au Mg XRF production cs at 10.0 keV (Kissel): {}".format( xraylib.CS_FluorLine_Kissel(79, xraylib.MG_LINE, 10.0))) print("K atomic level width for Fe: {}".format( xraylib.AtomicLevelWidth(26, xraylib.K_SHELL))) print("Bi L2-M5M5 Auger non-radiative rate: {}".format( xraylib.AugerRate(86, xraylib.L2_M5M5_AUGER))) print("Bi L3 Auger yield: {}".format(xraylib.AugerYield(86, xraylib.L3_SHELL))) symbol = xraylib.AtomicNumberToSymbol(26) print("Symbol of element 26 is: {}".format(symbol)) print("Number of element Fe is: {}".format(xraylib.SymbolToAtomicNumber("Fe"))) Z = np.array([26]) symbol = xraylib.AtomicNumberToSymbol(Z[0]) print("Symbol of element 26 is: {}".format(symbol)) print("Pb Malpha XRF production cs at 20.0 keV with cascade effect: {}".format( xraylib.CS_FluorLine_Kissel(82, xraylib.MA1_LINE, 20.0))) print( "Pb Malpha XRF production cs at 20.0 keV with radiative cascade effect: {}" .format( xraylib.CS_FluorLine_Kissel_Radiative_Cascade(82, xraylib.MA1_LINE, 20.0))) print( "Pb Malpha XRF production cs at 20.0 keV with non-radiative cascade effect: {}"
print ("Element %i: %lf %%" % (cdtest['Elements'][i],cdtest['massFractions'][i]*100.0)) print ("CS2 Refractive Index at 10.0 keV : %g - %g i" % (xraylib.Refractive_Index_Re("CS2",10.0,1.261),xraylib.Refractive_Index_Im("CS2",10.0,1.261))) print ("C16H14O3 Refractive Index at 1 keV : %g - %g i" % (xraylib.Refractive_Index_Re("C16H14O3",1.0,1.2),xraylib.Refractive_Index_Im("C16H14O3",1.0,1.2))) print ("SiO2 Refractive Index at 5 keV : %g - %g i" % (xraylib.Refractive_Index_Re("SiO2",5.0,2.65),xraylib.Refractive_Index_Im("SiO2",5.0,2.65))) print ("Compton profile for Fe at pz = 1.1 : %g" % xraylib.ComptonProfile(26,1.1)) print ("M5 Compton profile for Fe at pz = 1.1 : %g" % xraylib.ComptonProfile_Partial(26,xraylib.M5_SHELL,1.1)) print ("M1->M5 Coster-Kronig transition probability for Au : %f" % xraylib.CosKronTransProb(79,xraylib.FM15_TRANS)) print ("L1->L3 Coster-Kronig transition probability for Fe : %f" % xraylib.CosKronTransProb(26,xraylib.FL13_TRANS)) print ("Au Ma1 XRF production cs at 10.0 keV (Kissel): %f" % xraylib.CS_FluorLine_Kissel(79,xraylib.MA1_LINE,10.0)) print ("Au Mb XRF production cs at 10.0 keV (Kissel): %f" % xraylib.CS_FluorLine_Kissel(79,xraylib.MB_LINE,10.0)) print ("Au Mg XRF production cs at 10.0 keV (Kissel): %f" % xraylib.CS_FluorLine_Kissel(79,xraylib.MG_LINE,10.0)) print ("K atomic level width for Fe: %g" % xraylib.AtomicLevelWidth(26,xraylib.K_SHELL)) print ("Bi L2-M5M5 Auger non-radiative rate: %g" % xraylib.AugerRate(86,xraylib.L2_M5M5_AUGER)) print ("Bi L3 Auger yield: %g" % xraylib.AugerYield(86, xraylib.L3_SHELL)) symbol = xraylib.AtomicNumberToSymbol(26) print ("Symbol of element 26 is: %s" % symbol) print ("Number of element Fe is: %i" % xraylib.SymbolToAtomicNumber("Fe")) print ("Pb Malpha XRF production cs at 20.0 keV with cascade effect: %g" % xraylib.CS_FluorLine_Kissel(82,xraylib.MA1_LINE,20.0)) print ("Pb Malpha XRF production cs at 20.0 keV with radiative cascade effect: %g" % xraylib.CS_FluorLine_Kissel_Radiative_Cascade(82,xraylib.MA1_LINE,20.0)) print ("Pb Malpha XRF production cs at 20.0 keV with non-radiative cascade effect: %g" % xraylib.CS_FluorLine_Kissel_Nonradiative_Cascade(82,xraylib.MA1_LINE,20.0)) print ("Pb Malpha XRF production cs at 20.0 keV without cascade effect: %g" % xraylib.CS_FluorLine_Kissel_no_Cascade(82,xraylib.MA1_LINE,20.0)) print ("Al mass energy-absorption cs at 20.0 keV: %f" % xraylib.CS_Energy(13, 20.0)) print ("Pb mass energy-absorption cs at 40.0 keV: %f" % xraylib.CS_Energy(82, 40.0)) print ("CdTe mass energy-absorption cs at 40.0 keV: %f" % xraylib.CS_Energy_CP("CdTe", 40.0)) cryst = xraylib.Crystal_GetCrystal("Si") if (cryst == None): sys.exit(1)
def test_bad_shell(self): with self.assertRaises(ValueError): ayield = xraylib.AugerYield(82, xraylib.N2_SHELL)
def test_bad_Z(self): with self.assertRaises(ValueError): ayield = xraylib.AugerYield(-35, xraylib.K_SHELL)
def test_Pb_M3(self): ayield = xraylib.AugerYield(82, xraylib.M3_SHELL) self.assertAlmostEqual(ayield, 0.1719525)
def test_Pb_K(self): ayield = xraylib.AugerYield(82, xraylib.K_SHELL) self.assertAlmostEqual(ayield, 1.0 - xraylib.FluorYield(82, xraylib.K_SHELL))