Пример #1
0
outfile.write(getHeader(fname))
for i in range(1,101):
#for i in range(82,83):
    print("%d %s" % (i, Elements[i-1]))
    if i == 1:
        text  = '#S 1 K Shell Fluorescence Yields\n'
        label_text = ""
        n = 1
        label_text += '  omegaK'
        n += 1
        text += '#N %d\n' % n
        text += '#L Z' + label_text
        text += '\n'
        outfile.write(text)
    text = "%d" % i
    ddict = EADLParser.getFluorescenceYields(i)
    value = ddict.get('K (1s1/2)', 0.0)
    text += '  %.4E' % (value)
    text += '\n'
    outfile.write(text)
outfile.write("\n")
outfile.close()

#L Shell
fname = "EADL97_LShellConstants.dat"
if os.path.exists(fname):
    os.remove(fname)
outfile = open(fname, 'wb')
outfile.write(getHeader(fname))
shell_list =  ['L1 (2s1/2)', 'L2 (2p1/2)', 'L3 (2p3/2)']
for nshell in range(1,4):
            'Bh', 'Hs', 'Mt']

def getHeader(filename):
    text  = '#F %s\n' % filename
    text += '#U00 This file is a conversion to specfile format of \n'
    text += '#U01 directly extracted EADL97 radiative transition probabilities.\n'
    text += '#U02 EADL itself can be found at:\n'
    text += '#U03           http://www-nds.iaea.org/epdl97/libsall.htm\n'
    text += '#U04 The code used to generate this file has been:\n'
    text += '#U05 %s\n' % os.path.basename(__file__)
    text += '#U06\n'
    text += '\n'
    return text

if __name__ == "__main__":
    shellList = EADLParser.getBaseShellList()
    workingShells = ['K', 'L1', 'L2', 'L3', 'M1', 'M2', 'M3', 'M4', 'M5']
    for shell in workingShells:
        fname = "EADL97_%sShellRadiativeRates.dat" % shell[0]
        print("fname = %s" % fname)
        if shell in ['K', 'L1', 'M1']:
            if os.path.exists(fname):
                os.remove(fname)
            nscan = 0
            outfile = open(fname, 'wb')
            if sys.version < '3.0':
                outfile.write(getHeader(fname))
            else:
                outfile.write(getHeader(fname).encode('UTF-8'))
        nscan += 1
        for i in range(1,101):
Пример #3
0
            'Bh', 'Hs', 'Mt']

def getHeader(filename):
    text  = '#F %s\n' % filename
    text += '#U00 This file is a conversion to specfile format of \n'
    text += '#U01 directly extracted EADL97 nonradiative transition probabilities.\n'
    text += '#U02 EADL itself can be found at:\n'
    text += '#U03           http://www-nds.iaea.org/epdl97/libsall.htm\n'
    text += '#U04 The code used to generate this file has been:\n'
    text += '#U05 %s\n' % os.path.basename(__file__)
    text += '#U06\n'
    text += '\n'
    return text

if __name__ == "__main__":
    shellList = EADLParser.getBaseShellList()
    workingShells = ['K', 'L1', 'L2', 'L3', 'M1', 'M2', 'M3', 'M4', 'M5']
    for shell in workingShells:
        fname = "EADL97_%sShellNonradiativeRates.dat" % shell[0]
        print("fname = %s" % fname)
        if shell in ['K', 'L1', 'M1']:
            if os.path.exists(fname):
                os.remove(fname)
            nscan = 0
            outfile = open(fname, 'wb')
            tmpText = getHeader(fname)
            if sys.version < '3.0':
                outfile.write(tmpText)
            else:
                outfile.write(tmpText.encode('UTF-8'))
        nscan += 1
Пример #4
0
    text += '#U02 EADL itself can be found at:\n'
    text += '#U03           http://www-nds.iaea.org/epdl97/libsall.htm\n'
    text += '#U04 The code used to generate this file has been:\n'
    text += '#U05 %s\n' % os.path.basename(__file__)
    text += '#U06\n'
    text += '\n'
    return text

if os.path.exists(fname):
    os.remove(fname)

outfile = open(fname, 'wb')
outfile.write(getHeader(fname))


shells = EADLParser.getBaseShellList()
LONG_LABEL = True
for i in range(1,101):
    print(i, Elements[i-1])
    if i == 1:
        text  = '#S 1 Binding energies in keV\n'
        label_text = ""
        n = 0
        for label in shells:
            if LONG_LABEL:
                label_text += "  "+label.replace(' ','')
            else:
                label_text += '  %s' % label.replace(' ','').split("(")[0]
            n += 1
        text += '#N %d\n' % n
        text += '#L Z' + label_text
Пример #5
0
    return text


if __name__ == "__main__":
    if len(sys.argv) > 1:
        fname = sys.argv[1]
    else:
        fname = "EADL97_BindingEnergies.dat"

    if os.path.exists(fname):
        os.remove(fname)

    outfile = open(fname, 'wb')
    outfile.write(getHeader(fname))

    shells = EADLParser.getBaseShellList()
    LONG_LABEL = True
    for i in range(1, 101):
        print(i, Elements[i - 1])
        if i == 1:
            text = '#S 1 Binding energies in keV\n'
            label_text = ""
            n = 0
            for label in shells:
                if LONG_LABEL:
                    label_text += "  " + label.replace(' ', '')
                else:
                    label_text += '  %s' % label.replace(' ', '').split("(")[0]
                n += 1
            text += '#N %d\n' % n
            text += '#L Z' + label_text
    outfile.write(getHeader(fname))
    for i in range(1,101):
    #for i in range(82,83):
        print("%d %s" % (i, Elements[i-1]))
        if i == 1:
            text  = '#S 1 K Shell Fluorescence Yields\n'
            label_text = ""
            n = 1
            label_text += '  omegaK'
            n += 1
            text += '#N %d\n' % n
            text += '#L Z' + label_text
            text += '\n'
            outfile.write(text)
        text = "%d" % i
        ddict = EADLParser.getFluorescenceYields(i)
        value = ddict.get('K (1s1/2)', 0.0)
        text += '  %.4E' % (value)
        text += '\n'
        outfile.write(text)
    outfile.write("\n")
    outfile.close()

    #L Shell
    fname = "EADL97_LShellConstants.dat"
    if os.path.exists(fname):
        os.remove(fname)
    outfile = open(fname, 'wb')
    outfile.write(getHeader(fname))
    shell_list =  ['L1 (2s1/2)', 'L2 (2p1/2)', 'L3 (2p3/2)']
    for nshell in range(1,4):