skued.powder_calq

skued.powder_calq(I, crystal, peak_indices, miller_indices)

Determine the scattering vector q corresponding to a polycrystalline diffraction pattern and a known crystal structure.

For best results, multiple peaks (and corresponding Miller indices) should be provided; the absolute minimum is two.

Parameters:
  • I (~numpy.ndarray, ndim 1) – Polycristalline diffraction pattern. It is assumed that the diffraction pattern is defined on an equidistant grid.

  • crystal (crystals.Crystal instance) – Crystal that gave rise to the diffraction pattern I.

  • peak_indices (n-tuple of ints) – Array index location of diffraction peaks in the array I. For best results, peaks should be well-separated. More than two peaks can be used.

  • miller_indices (iterable of 3-tuples) – Indices associated with the peaks of peak_indices. More than two peaks can be used. E.g. indices = [(2,2,0), (-3,0,2)]

Returns:

q – Scattering vectors associated with the intensity profile I.

Return type:

~numpy.ndarray, ndim 1

:raises ValueError : if I is not a 1D diffraction pattern.: :raises ValueError : if the number of peak indices does not match the number of Miller indices.: :raises ValueError : if the number of peaks given is lower than two.: