Skip to content

BCC diffraction pattern only shows first reflections and structure factors are reported as NaN #254

Description

@diegodeasantana

Title

BCC diffraction pattern only shows first reflections and structure factors are reported as NaN

Description

I am trying to simulate an electron diffraction pattern for a BCC Fe structure. However, only the first allowed reflections are appearing in the diffraction pattern.

For example, when using the zone axis [0, 0, 1], only the 110 and 200 reflections (and their symmetry-equivalent reflections) are present. Higher-order reflections that should also satisfy the BCC selection rules do not appear.

I also tried increasing the reciprocal_radius value, but the behavior remains unchanged and no additional reflections are generated.

Another issue is that the structure factor values reported by sim.coordinates.print_table() are returned as NaN:

 h k l      d     |F|_hkl   |F|^2   |F|^2_rel   Mult
 1 1 0    2.027     nan      nan       nan       12
 2 0 0    1.433     nan      nan       nan       6

Because of this, I am not sure whether the missing reflections are related to the structure factor calculation or to the diffraction pattern generation itself.

Minimal Reproducible Example

from orix.crystal_map import Phase
from orix.vector import Vector3d
from orix.quaternion import Rotation
from diffpy.structure import Atom, Lattice, Structure
from diffsims.generators.simulation_generator import SimulationGenerator
import numpy as np
import matplotlib.pyplot as plt

a = 2.866

latt = Lattice(a, a, a, 90, 90, 90)

motif = [
    Atom("Fe", [0, 0, 0], lattice=latt),
    Atom("Fe", [0.5, 0.5, 0.5], lattice=latt),
]

structure = Structure(atoms=motif, lattice=latt)

ferrite = Phase(
    name="Ferrite",
    structure=structure,
    space_group=229,
)

zone_axis = Vector3d([[0, 0, 1]])
rot = Rotation.from_align_vectors(zone_axis, Vector3d.zvector())

gen = SimulationGenerator(accelerating_voltage=200)

sim = gen.calculate_diffraction2d(
    phase=ferrite,
    rotation=rot,
)

sim.coordinates.print_table()

coordinates = sim.coordinates.data
intensity = sim.coordinates.intensity
indices = sim.coordinates.hkl

fig, ax = plt.subplots()

ax.scatter(
    coordinates[:, 0],
    coordinates[:, 1],
    s=100 * np.log10(intensity + 1),
    color="tab:blue",
)

ax.set_aspect("equal")
ax.set_xlabel(r"$\AA^{-1}$")
ax.set_ylabel(r"$\AA^{-1}$")

ax.set_xlim(-1, 1)
ax.set_ylim(-1, 1)

plt.show()

Expected Behavior
For a BCC structure viewed along the [001] zone axis, I would expect higher-order allowed reflections to appear when the reciprocal-space radius is sufficiently large. I would also expect valid structure factor values instead of NaN.

Questions

  • Is it possible to include the higher-order reflections in the calculation?
  • Why are the structure factor values (|F|_hkl, |F|^2, |F|^2_rel) returned as NaN for this structure?

Version:
diffsims: 0.7.0
diffpy: 3.4.0
orix: 0.14.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions