Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinematic EBSD simulation from tetragonal phase #231

Open
DorianDepriester opened this issue Jun 19, 2024 · 1 comment
Open

Kinematic EBSD simulation from tetragonal phase #231

DorianDepriester opened this issue Jun 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@DorianDepriester
Copy link

DorianDepriester commented Jun 19, 2024

Dear developpers,
I try to simulate the Kikuchi pattern of the CIGS [1] phase (see InCuSe2.cif.txt). I have followed the corresponding tutorial and ended up with the following script:

from diffsims.crystallography import ReciprocalLatticeVector
import kikuchipy as kp
from orix.crystal_map import Phase


phase_CIGS = Phase.from_cif('InCuSe2.cif')
phase_CIGS.space_group=122 # Not in CIF file
print(phase_CIGS)
print(phase_CIGS.structure.lattice)

ref_CIGS = ReciprocalLatticeVector.from_min_dspacing(phase_CIGS, 2) # Large threshold

# Exclude non-allowed reflectors (not available for hexagonal or trigonal
# phases!)
ref_CIGS = ref_CIGS.unique(use_symmetry=True).symmetrise()

ref_CIGS.sanitise_phase()
ref_CIGS.phase.structure

ref_CIGS.calculate_structure_factor()
F_CIGS = abs(ref_CIGS.structure_factor)
ref_CIGS = ref_CIGS[F_CIGS > 0.05 * F_CIGS.max()]
ref_CIGS.print_table()

But if I try to reduce the interplanar spacing threshold (say, 0.5 like in the tutorial), the last command above fails, raising:
File "C:\ProgramData\Anaconda3\envs\Kikuchipy\lib\site-packages\diffsims\crystallography\reciprocal_lattice_vector.py", line 888, in print_table hkl_string_i = hkl_string[i].lstrip(" ") IndexError: list index out of range

Am I doing something wrong?
Rgds

[1] https://next-gen.materialsproject.org/materials/mp-22811

@hakonanes
Copy link
Member

Hi @DorianDepriester. Sorry for the late reply.

This is strange, I cannot reproduce your error. After downloading the CIF file (not "CIF (Symmetrized)", just "CIF"), I get the following output:

<name: incuse2. space group: I-42d. point group: -42m. proper point group: 222. color: tab:blue>
Lattice(a=5.806, b=5.806, c=11.6581, alpha=90, beta=90, gamma=90)
 h k l      d     |F|_hkl   |F|^2   |F|^2_rel   Mult 
1  1 -2   3.357    15.5     239.3     100.0      4   
1  1  2   3.357    15.5     239.3     100.0      4   
0  0  4   2.915    14.3     204.6      85.5      2   
2  0  0   2.903    14.3     203.7      85.1      4   
1  0  1   5.197    13.2     173.3      72.4      8   
2  0  4   2.057    11.5     131.1      54.8      8   
2  2  0   2.053    11.4     130.8      54.6      4   
1  0  3   3.229    10.7     114.8      48.0      8   
2  1  1   2.534     9.3     86.4       36.1      8   
2  1 -1   2.534     9.3     86.4       36.1      8   
1  0  5   2.164     8.4     70.3       29.4      8   
2  1  3   2.159     8.4     70.1       29.3      8   
2  1 -3   2.159     8.4     70.1       29.3      8   

@hakonanes hakonanes added the bug Something isn't working label Dec 1, 2024
@hakonanes hakonanes transferred this issue from pyxem/kikuchipy Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants