cut_cell#
- abtem.atoms.cut_cell(atoms, cell=None, plane='xy', origin=(0.0, 0.0, 0.0), margin=0.0)[source]#
Fit the given atoms into a given cell by cropping atoms that are outside the cell, ignoring periodicity. If the given atoms do not originally fill the cell, they are first repeated until they do.
- Parameters:
atoms (ase.Atoms) – Atoms to be fit.
cell (tuple of floats) – Cell to be fit into.
plane (str or tuple of tuples) – Plane to be rotated into given as either a string or two tuples (by default xy which results in no rotation for a standardized cell).
origin (tuple of floats) – Offset of the origin for the given cell with respect to the original cell.
margin (float or tuple of three floats) – Atoms that are outside the cell by this margin are not cropped (by default no margin).
- Returns:
cut – Atoms fit into the cell.
- Return type:
ase.Atoms