Skip to content

Commit

Permalink
Refactor: calculate_ed_data--> calculate_diffraction2d in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
CSSFrancis committed Apr 21, 2024
1 parent 5351d95 commit 1f07bca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/creating_a_simulation_library/migration_guide.py
Expand Up @@ -57,7 +57,7 @@
p = Phase("Al", point_group="m-3m", structure=structure_matrix)
gen = SimulationGenerator(accelerating_voltage=200)
rot = Rotation.from_euler([[0, 0, 0], [10.0, 0.0, 0.0]], degrees=True)
sim = gen.calculate_ed_data(
sim = gen.calculate_diffraction2d(
phase=p,
rotation=rot,
reciprocal_radius=1.6768,
Expand Down
Expand Up @@ -29,7 +29,7 @@
rot = Rotation.from_axes_angles(
[1, 0, 0], 45, degrees=True
) # 45 degree rotation around x-axis
sim = gen.calculate_ed_data(phase=p, rotation=rot)
sim = gen.calculate_diffraction2d(phase=p, rotation=rot)

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

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

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

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

sim.plot(
include_direct_beam=True, show_labels=True, min_label_intensity=0.1
Expand Down

0 comments on commit 1f07bca

Please sign in to comment.