Пример #1
0
 def test_refine_position_gaussian(self):
     signal = self.signal
     atom_positions = am.get_atom_positions(signal, 4)
     vector = ipf.find_dumbbell_vector(atom_positions)
     dumbbell_positions = am.get_atom_positions(signal, separation=13)
     atom_lattice = ipf.make_atom_lattice_dumbbell_structure(
         signal, dumbbell_positions, vector)
     atom_lattice.refine_position_gaussian()
Пример #2
0
 def test_simple_running(self):
     s = self.s
     atom_positions = am.get_atom_positions(s, separation=4)
     vector = ipf.find_dumbbell_vector(atom_positions)
     dumbbell_positions = am.get_atom_positions(s, 14)
     dumbbell_array0, dumbbell_array1 = ipf._get_dumbbell_arrays(
             s, dumbbell_positions, vector)
     assert len(dumbbell_array0) == 100
     assert len(dumbbell_array1) == 100
Пример #3
0
 def test_5_separation_x(self):
     test_data = MakeTestData(200, 200)
     x0, y0 = np.mgrid[10:200:20, 10:200:20]
     x1, y1 = np.mgrid[16:200:20, 10:200:20]
     x, y = np.vstack((x0, x1)).flatten(), np.vstack((y0, y1)).flatten()
     test_data.add_atom_list(x, y, sigma_x=1, sigma_y=1, amplitude=50)
     atom_positions = am.get_atom_positions(test_data.signal, 4)
     vector = ipf.find_dumbbell_vector(atom_positions)
     assert approx(abs(vector[0]), abs=1e-7) == 6.
     assert approx(abs(vector[1]), abs=1e-7) == 0.
Пример #4
0
 def test_simple_running(self):
     s = self.s
     atom_positions = am.get_atom_positions(s, separation=4)
     vector = ipf.find_dumbbell_vector(atom_positions)
     dumbbell_positions = am.get_atom_positions(s, separation=13)
     atom_lattice = ipf.make_atom_lattice_dumbbell_structure(
             s, dumbbell_positions, vector)
     assert len(atom_lattice.sublattice_list) == 2
     sublattice0 = atom_lattice.sublattice_list[0]
     sublattice1 = atom_lattice.sublattice_list[1]
     assert len(sublattice0.atom_list) == 100
     assert len(sublattice1.atom_list) == 100
Пример #5
0
if not os.path.exists(my_path):
    os.makedirs(my_path)

#####
s = am.dummy_data.get_dumbbell_heterostructure_signal()
s.plot()
s._plot.signal_plot.figure.savefig(os.path.join(my_path, 'dummy_data.png'))

#####
s_peaks = am.get_feature_separation(s, separation_range=(2, 6))
s_peaks.plot()
s_peaks._plot.signal_plot.figure.savefig(os.path.join(my_path, 'feature_separation_all_atoms.png'))

#####
atom_positions = am.get_atom_positions(s, separation=2)
dumbbell_vector = ipf.find_dumbbell_vector(atom_positions)

#####
s_peaks = am.get_feature_separation(s, separation_range=(5, 20))
s_peaks.axes_manager.indices = (3,)
s_peaks.plot()
s_peaks._plot.signal_plot.figure.savefig(os.path.join(my_path, 'feature_separation_dumbbell.png'))

#####
dumbbell_positions = am.get_atom_positions(s, separation=8)
dumbbell_lattice = ipf.make_atom_lattice_dumbbell_structure(s, dumbbell_positions, dumbbell_vector)
dumbbell_lattice.refine_position_gaussian()
s_ap = dumbbell_lattice.get_sublattice_atom_list_on_image()
s_ap.plot()
s_ap._plot.signal_plot.figure.savefig(os.path.join(my_path, 'dumbbell_lattice_initial.png'))