Skip to content

Commit 1f07bca

Browse files
committed
Refactor: calculate_ed_data--> calculate_diffraction2d in examples
1 parent 5351d95 commit 1f07bca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/creating_a_simulation_library/migration_guide.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
p = Phase("Al", point_group="m-3m", structure=structure_matrix)
5858
gen = SimulationGenerator(accelerating_voltage=200)
5959
rot = Rotation.from_euler([[0, 0, 0], [10.0, 0.0, 0.0]], degrees=True)
60-
sim = gen.calculate_ed_data(
60+
sim = gen.calculate_diffraction2d(
6161
phase=p,
6262
rotation=rot,
6363
reciprocal_radius=1.6768,

examples/creating_a_simulation_library/simulating_diffraction_patterns.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
rot = Rotation.from_axes_angles(
3030
[1, 0, 0], 45, degrees=True
3131
) # 45 degree rotation around x-axis
32-
sim = gen.calculate_ed_data(phase=p, rotation=rot)
32+
sim = gen.calculate_diffraction2d(phase=p, rotation=rot)
3333

3434
sim.plot(show_labels=True) # plot the first (and only) diffraction pattern
3535

@@ -47,7 +47,7 @@
4747
rot = Rotation.from_axes_angles(
4848
[1, 0, 0], (0, 15, 30, 45, 60, 75, 90), degrees=True
4949
) # 45 degree rotation around x-axis
50-
sim = gen.calculate_ed_data(phase=p, rotation=rot)
50+
sim = gen.calculate_diffraction2d(phase=p, rotation=rot)
5151

5252
sim.plot(show_labels=True) # plot the first diffraction pattern
5353

@@ -69,7 +69,7 @@
6969
rot = Rotation.from_axes_angles(
7070
[1, 0, 0], (0, 15, 30, 45, 60, 75, 90), degrees=True
7171
) # 45 degree rotation around x-axis
72-
sim = gen.calculate_ed_data(phase=[p, p2], rotation=[rot, rot])
72+
sim = gen.calculate_diffraction2d(phase=[p, p2], rotation=[rot, rot])
7373

7474
sim.plot(
7575
include_direct_beam=True, show_labels=True, min_label_intensity=0.1

0 commit comments

Comments
 (0)