\(\renewcommand\AA{\unicode{x212B}}\)
ShowPossibleCells v1¶
Summary¶
Show conventional cells corresponding to the UB stored with the sample for this peaks works space.
See Also¶
FindUBUsingFFT, FindUBUsingIndexedPeaks, FindUBUsingLatticeParameters
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
PeaksWorkspace |
InOut |
IPeaksWorkspace |
Mandatory |
Input Peaks Workspace |
MaxScalarError |
Input |
number |
0.2 |
Max Scalar Error (0.2) |
BestOnly |
Input |
boolean |
True |
Show at most one for each Bravais Lattice |
NumberOfCells |
Output |
number |
Gets set with the number of possible cells. |
|
AllowPermutations |
Input |
boolean |
True |
Allow permutations of conventional cells |
Cells |
Output |
str list |
A list of the different cells |
Description¶
Given a PeaksWorkspace with a UB matrix corresponding to a Niggli reduced cell, this algorithm will display a list of possible conventional cells. The max scalar error property sets a limit on the maximum allowed error in the cell scalars, to restrict the list to possible cells that are a good match for the current reduced cell. The list can also be forced to contain only the best fitting conventional cell for each Bravais lattice type, by setting the best only property to true.
This algorithm is based on the paper: Alan D. Mighell, Lattice Symmetry and Identification—The Fundamental Role of Reduced Cells in Materials Characterization. Journal of research of the National Institute of Standards and Technology 106.6 (2001): 983, available from: nvlpubs.
Usage¶
Example:
import json
ws = LoadIsawPeaks("TOPAZ_3007.peaks")
FindUBUsingFFT(ws,MinD=8.0,MaxD=13.0)
number_of_cells, cells = ShowPossibleCells(PeaksWorkspace=ws)
print(f"Num Cells: {number_of_cells}")
cell1 = json.loads(cells[0])
cell2 = json.loads(cells[1])
print(f"First cell: Error={cell1['Error']:.3f} FormNumber={cell1['FormNumber']}, CellType={cell1['CellType']}, Centering={cell1['Centering']}")
print(f"Second cell: Error={cell2['Error']:.3f} FormNumber={cell2['FormNumber']}, CellType={cell2['CellType']}, Centering={cell2['Centering']}")
# the output can then be used by SelectCellOfType
SelectCellOfType(ws, CellType=cell1['CellType'], Centering=cell1['Centering'], Apply=True)
# or SelectCellWithForm
SelectCellWithForm(ws, FormNumber=cell1['FormNumber'], Apply=True)
# or SetUB
SetUB(ws, UB=cell1["UB"])
Output:
Num Cells: 2
First cell: Error=0.022 FormNumber=25, CellType=Monoclinic, Centering=C
Second cell: Error=0.000 FormNumber=44, CellType=Triclinic, Centering=P
Categories: AlgorithmIndex | Crystal\Cell
Source¶
C++ header: ShowPossibleCells.h
C++ source: ShowPossibleCells.cpp