Пример #1
0
    aber=[[0,0],[0,0],[22.56,-20.1],[22.08,-7.5],[0.1198,0],[0.9018,-170.1],[0.04964,20.9],[28.43,-120.6],[11.84,153.8],[8.456,76.1],[0.622,0],[2.811,-125.5]]
    autostemparameters={'Electron energy': 200,'Spherical aberration': 1.4,'Defocus':0,'Aperture semiangle': 24.5,'Source size': 0.882,'Slice size': 25.0,'Pixels':976,'Chromatic aberration Coefficient':1.4,'Delta E':0.73,'aber':aber,'Scale Factor':0.00570113}

    # based on precalculated PSF("PSF.txt") and structure information("STEM_ref"), calculate the reference STEM image
    A = ConvStem(parameters=autostemparameters,calc_exp=False)
    atoms_ref=inp_out.read_xyz('STEM_ref',0)

    nk = autostemparameters['Pixels']
    A.psf = np.empty([nk,nk],dtype=float)
    fileobj = open('PSF.txt', 'r')
    lines = fileobj.readlines()
    for x in range(0,nk):
       A.psf[x] = lines[x].split()
    fileobj.close()

    STEM_ref = A.get_image(A.psf, atoms_ref, autostemparameters['Slice size'], autostemparameters['Pixels'])
    autostemparameters['Exp_Image'] = STEM_ref
    
    #setup parameters
    autostemparameters['Grid_sim2exp'] = 1
    autostemparameters['Pixelshift'] = False

    parameters={'structure':'Cluster',
     'optimizer_type':'GA',
     'atomlist':[('Au',1,196.9665,-3.6)],'natoms': 309,
     'nindiv': 60, 'maxgen': 100, 'reqrep': 10,
     'restart': True,
     'generate_flag': 'sphere',
     'tolerance': 0.01,
     'r_ab': 2.5, 'size': 23.0,
     'cxpb': 0.8, 'mutpb': 0.2, 'cx_scheme': 'cxtp', #rotct_rand', 
Пример #2
0
        'Scale Factor': 0.00570113
    }

    # based on precalculated PSF("PSF.txt") and structure information("STEM_ref"), calculate the reference STEM image
    A = ConvStem(parameters=autostemparameters, calc_exp=False)
    atoms_ref = inp_out.read_xyz('STEM_ref', 0)

    nk = autostemparameters['Pixels']
    A.psf = np.empty([nk, nk], dtype=float)
    fileobj = open('PSF.txt', 'r')
    lines = fileobj.readlines()
    for x in range(0, nk):
        A.psf[x] = lines[x].split()
    fileobj.close()

    STEM_ref = A.get_image(A.psf, atoms_ref, autostemparameters['Slice size'],
                           autostemparameters['Pixels'])
    autostemparameters['Exp_Image'] = STEM_ref

    #setup parameters
    autostemparameters['Grid_sim2exp'] = 1
    autostemparameters['Pixelshift'] = False

    parameters = {
        'structure':
        'Cluster',
        'optimizer_type':
        'GA',
        'atomlist': [('Au', 1, 196.9665, -3.6)],
        'natoms':
        309,
        'nindiv':
Пример #3
0
        "Scale Factor": 0.00570113,
    }

    # based on precalculated PSF("PSF.txt") and structure information("STEM_ref"), calculate the reference STEM image
    A = ConvStem(parameters=autostemparameters, calc_exp=False)
    atoms_ref = inp_out.read_xyz("STEM_ref", 0)

    nk = autostemparameters["Pixels"]
    A.psf = np.empty([nk, nk], dtype=float)
    fileobj = open("PSF.txt", "r")
    lines = fileobj.readlines()
    for x in range(0, nk):
        A.psf[x] = lines[x].split()
    fileobj.close()

    STEM_ref = A.get_image(A.psf, atoms_ref, autostemparameters["Slice size"], autostemparameters["Pixels"])
    autostemparameters["Exp_Image"] = STEM_ref

    # setup parameters
    autostemparameters["Grid_sim2exp"] = 1
    autostemparameters["Pixelshift"] = False

    parameters = {
        "structure": "Cluster",
        "optimizer_type": "GA",
        "atomlist": [("Au", 1, 196.9665, -3.6)],
        "natoms": 309,
        "nindiv": 20,
        "maxgen": 4000,
        "reqrep": 1200,
        "restart": False,
Пример #4
0
    "Scale Factor": 0.00570113,
}

# based on precalculated PSF("PSF.txt") and structure information(a xyz format file), calculate the STEM image
autostemparameters["Grid_sim2exp"] = 1
A = ConvStem(parameters=autostemparameters, calc_exp=False)

nk = autostemparameters["Pixels"]
A.psf = np.empty([nk, nk], dtype=float)
fileobj = open("PSF.txt", "r")
lines = fileobj.readlines()
for x in range(0, nk):
    A.psf[x] = lines[x].split()
fileobj.close()
# plt.imshow(A.psf)
# plt.show()

Au = inp_out.read_xyz("Output-rank0/indiv00.xyz", -1)
# Au=inp_out.read_xyz('STEM_ref',0)
imAu = A.get_image(A.psf, Au, autostemparameters["Slice size"], autostemparameters["Pixels"])
IPlot = imAu.T
plt.imshow(IPlot, origin="lower", cmap=plt.get_cmap("hot"))
cb = plt.colorbar()
tick_locator = ticker.MaxNLocator(nbins=7)
cb.locator = tick_locator
cb.update_ticks()
for t in cb.ax.get_yticklabels():
    t.set_fontsize(24)
plt.axis("off")
plt.show()
Пример #5
0
'Defocus':0,'Aperture semiangle': 24.5,'Source size': 0.882,
'Slice size': 25.0,'Pixels':976,'Chromatic aberration Coefficient':1.4,'Delta E':0.73,
'aber':aber,'Scale Factor':0.00570113}
autostemparameters['Grid_sim2exp'] = 1
A = ConvStem(parameters=autostemparameters,calc_exp=False)

nk = autostemparameters['Pixels']
A.psf = np.empty([nk,nk],dtype=float)
fileobj = open('PSF.txt', 'r')
lines = fileobj.readlines()
for x in range(0,nk):
   A.psf[x] = lines[x].split()
fileobj.close()
#plt.imshow(A.psf)
#plt.show()

Au=inp_out.read_xyz('Output-rank0/indiv00.xyz',-1)
#Au=inp_out.read_xyz('STEM_ref',0)
imAu = A.get_image(A.psf, Au, autostemparameters['Slice size'], autostemparameters['Pixels'])
IPlot = imAu.T
plt.imshow(IPlot,origin="lower",cmap = plt.get_cmap('hot'))
cb=plt.colorbar()
tick_locator = ticker.MaxNLocator(nbins=7)
cb.locator = tick_locator
cb.update_ticks()
for t in cb.ax.get_yticklabels():
     t.set_fontsize(24)
plt.axis('off')
plt.show()