def __init__(self, name=None, line=None, volt=None, opt=None): if all_or_none(name, line, opt): name, line, z, volt, opt = self.user_input(volt) # volt can be specified if the others are not # Atomic Symbol self.name = name # Atomic Number self.z = at_els.index(name.capitalize()) + 1 # X-Ray emmision line self.line = line # Accelerating voltage used for this element self.volt = volt # Options for analysis((S)toic, (C)omp, (D)iff, (E)lem) self.opt = opt self.setup_vars() # Setup Unknowns/initial values (Place holders) # Working Concentration (Maybe Kratio and weight fraction) self.c1 = 1 # Log previous c values (clog[0]-values, clog[1]-setby) self.clog = [[1, 'init']] # Start all elements with valence of -1 self.valence = -1
def get_rjump(self, z=None, shell=None): if all_or_none(z, shell): z = self.z shell = self.shell rjump = {'K': get_data(z, 'rjump1'), 'L1': 1.17, 'L2': 1.39, 'L3': get_data(z, 'rjump4'), 'M1': 1.16, 'M2': 1.207, 'M3': 1.158, 'M4': 1.895, 'M5': 1.895, 'N': 2.0} return rjump[shell]
def get_omega(self, z=None, shell=None): """Fluorescence Yields""" if all_or_none(z, shell): z = self.z shell = self.shell omega = 0.0 if shell == 'K': # Bambynek etal., Rev. Mod. Physics. 1972 pg 757 # Could updat to Bambynek 1984 d = (0.015 + 0.0327*z - 0.64e-6*z**3)**4 omega = d/(1.0 + d) elif shell == 'M4' or shell == 'M5': # ???? REF?? omega = 0.68e-9*(z - 13)**4 elif shell == 'N1': # ??? Ref?? omega = 1.0e-9*(z - 13)**4 elif shell == 'M2' or shell == 'M3' or shell[0] == 'N': # 5 omega = 0.0 else: # Krause, J. Phys. Chem. Ref. Data Vol. 8, No. 2, 1979, p. 307. if shell == 'M1': shell = 'L3' shell = shell.lower() omega = get_data(z, shell) return omega