How to plot a phase map #666
-
Dear all Thanks in advance, Andrea The following is a test piece of code that I'm using (the reflectors part was taken from this forum). phase_list = PhaseList(
names=["Fe", "Al"],
space_groups=[215, 229],
structures=[
Structure(
atoms=[Atom("fe", [0] * 3)],
lattice=Lattice(0.379, 0.379, 0.379, 90, 90, 90)
),
Structure(
atoms=[Atom("al", [0] * 3)],
lattice=Lattice(0.286, 0.286, 0.286, 90, 90, 90)
),
]
)
reflectors = []
for indx, ph in phase_list:
if indx != -1:
lattice = ph.structure.lattice
lattice.setLatPar(lattice.a * 10, lattice.b * 10, lattice.c * 10)
rlv = ReciprocalLatticeVector.from_min_dspacing(ph, 0.7)
rlv.sanitise_phase()
rlv = rlv.unique(use_symmetry=True)
rlv.calculate_structure_factor("lobato")
structure_factor = abs(rlv.structure_factor)
order = np.argsort(structure_factor)[::-1]
rlv = rlv[order[0:7]] # I workaround: slice the array because it contains values giving ValueError: negative dimensions are not allowed
rlv = rlv.symmetrise()
rlv.print_table()
reflectors.append(rlv)
indexer = det.get_indexer(
phase_list=phase_list,
reflectors=reflectors,
nBands = 10,
tSigma = 2,
rSigma = 2
)
print(indexer.vendor)
print(indexer.sampleTilt)
print(indexer.camElev)
print(indexer.PC)
print(indexer.phaselist[0].latticeparameter)
print(indexer.phaselist[0].polefamilies)
print(indexer.phaselist[1].latticeparameter)
print(indexer.phaselist[1].polefamilies)
det = s_grid.hough_indexing_optimize_pc(
pc0=[0.42, 0.22, 0.50], # Initial guess based on previous experiments
indexer=indexer,
batch=True,
method="PSO",
search_limit=0.05,
)
# Print mean and standard deviation
print(det.pc_flattened.mean(axis=0))
print(det.pc_flattened.std(0))
det.plot_pc("scatter", s=50, annotate=True)
det.pc = det.pc_average
det.plot(pattern=s_grid.inav[0, 0].data)
indexer = det.get_indexer(
phase_list=phase_list,
reflectors=reflectors,
nBands = 10,
tSigma = 2,
rSigma = 2
)
indexer.PC
xmap = s.hough_indexing(phase_list=phase_list, indexer=indexer, verbose=2) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi Andrea!
Given these phase descriptions:
I don't think we can distinguish between these two phases using Hough indexing. This is because they have the same Laue group, m-3m, and thus the same interplanar angles between high-symmetry planes. See e.g. this application note from EDAX. There, they had to use energy dispersive X-ray spectroscopy to distinguish the nitride from ferrite. You may, on the other hand, be able to differentiate between the two based on dynamical simulations! I haven't seen simulations for Fe4N myself, but given the differing crystal structures (lattice parameters, the nitrogen atoms), it may be possible. Regarding your technical questions, >>> xmap
Phase Orientations Name Space group Point group Proper point group Color
1 5657 (48.4%) austenite None 432 432 tab:blue
2 6043 (51.6%) ferrite None 432 432 tab:orange
Properties: iq, dp
Scan unit: um You can then plot the map using CrystalMap.plot() >>> xmap.plot() I hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Dear Håkon, Best, |
Beta Was this translation helpful? Give feedback.
-
Dear Håkon, I tried to use Kikuchipy for the same data, however, I am still far from getting similar results. The following is the code that I'm currently using.
Thank you in advance, |
Beta Was this translation helpful? Give feedback.
-
Dear Håkon, Best, Andrea |
Beta Was this translation helpful? Give feedback.
Hi Andrea!
Given these phase descriptions:
I don't think we can distinguish between these two phases using Hough indexing. This is because they have the same Laue group, m-3m, and thus the same interplanar angles between high-symmetry planes. See e.g. this application note from EDAX. There, they had to use energy dispersive X-ray spectroscopy to distinguish the nitride from ferrite.
You may, on the other hand, be able to differentiate between the two based on dynamical simulations! I haven'…