import atomap.api as am import hyperspy.api as hs import numpy as np import os path_to_data = os.path.join(os.path.dirname(__file__), "data") os.chdir(path_to_data) # Open the original PTO Junction dataset image = hs.load("filtered_PTO_HAADF_STEM.hspy") sampling = image.axes_manager[-1].scale # nm/pix units = image.axes_manager[-1].units image.plot() # Open the pre-made PTO atom lattice. atom_lattice = am.load_atom_lattice_from_hdf5("Atom_Lattice.hdf5", False) sublattice1 = atom_lattice.sublattice_list[0] # Pb Sublattice sublattice2 = atom_lattice.sublattice_list[1] # Ti Sublattice sublattice1.construct_zone_axes(atom_plane_tolerance=1) # Set up parameters for plotting the strain, rotation, and c/a ratio maps: zone_vector_index_A = 0 zone_vector_index_B = 1 # Note that sometimes the 0 and 1 axes are constructed first or second, # so you may have to swap them. filename = None # Set to a string if you want to save the map ''' You can use return_x_y_z=True to get the x,y, and strain/rotation/ratio values also! Check the documentation here: temul-toolkit.readthedocs.io
my_path, 'line_monolayer.png'), overwrite=True) def dd_line(): zone = sublattice_B.zones_axis_average_distances[1] plane = sublattice_B.atom_planes_by_zone_vector[zone][-1] s_line = sublattice_B.get_atom_distance_difference_line_profile( zone, plane) s_line.plot() s_line._plot.signal_plot.figure.savefig(os.path.join( my_path, 'line_dd.png'), overwrite=True) atom_lattice = am.load_atom_lattice_from_hdf5( os.path.join(my_path, 'fantasite.hdf5')) sublattice_A = atom_lattice.sublattice_list[0] sublattice_B = atom_lattice.sublattice_list[1] plot_elli_maps() plot_monolayer_map() plot_atom_plane_monolayer_map() plot_atom_dd() plot_dd_plane() plot_voronoi_integration(atom_lattice) plot_watershed_integration(atom_lattice) plot_angle_figs() plot_al_zoom() elli_line() elli_line_errorbar() plot_line_plane()
import atomap.api as am import hyperspy.api as hs import os path_to_data = os.path.join(os.path.dirname(__file__), "data") os.chdir(path_to_data) # Open the PTO/SRO dataset image = hs.load('Cropped_PTO-SRO_Aligned.hspy') sampling = image.axes_manager[-1].scale # nm/pix units = image.axes_manager[-1].units image.plot() # Open the pre-made PTO-SRO atom lattice. atom_lattice = am.load_atom_lattice_from_hdf5("Atom_Lattice_crop.hdf5") sublattice1 = atom_lattice.sublattice_list[0] # Pb-Sr Sublattice sublattice2 = atom_lattice.sublattice_list[1] # Ti-Ru Sublattice # Plot the sublattice planes to see which zone_vector_index we use sublattice2.construct_zone_axes(atom_plane_tolerance=1) # sublattice2.plot_planes() # Set up parameters for calculate_atom_plane_curvature zone_vector_index = 0 atom_planes = (2, 6) # chooses the starting and ending atom planes vmin, vmax = 1, 2 cmap = 'bwr' # see matplotlib and colorcet for more colormaps title = 'Curvature Map' filename = None # Set to a string if you want to save the map
transparent=True, frameon=False, bbox_inches='tight', pad_inches=None, dpi=300, labels=False) plt.close() from temul.model_refiner import Model_Refiner import atomap.api as am import temul.example_data as example_data s_original = example_data.load_Se_implanted_MoS2_data() real_sampling = s_original.axes_manager[-1].scale atom_lattice = am.load_atom_lattice_from_hdf5('Atom_Lattice_max.hdf5') sub1 = atom_lattice.sublattice_list[0] sub2 = atom_lattice.sublattice_list[1] sub3 = atom_lattice.sublattice_list[2] ''' Refine the Sublattice elements ''' element_list_sub1 = ['Mo_0', 'Mo_1', 'Mo_1.S_1', 'Mo_1.Se_1', 'Mo_2'] element_list_sub2 = ['S_0', 'S_1', 'S_2', 'Se_1', 'Se_1.S_1', 'Se_2'] element_list_sub3 = [ 'H_0', 'S_1', 'Se_1', 'Mo_1', ] sub_dict = { sub1: element_list_sub1,