EBSDsquare.trim edit page

crop a map to the smallest rectangle containing all indexed data

Description

Registering, rotating or masking a map leaves a border of points carrying no data. trim removes it. Points inside the rectangle are kept as they are, so notIndexed points enclosed by the data survive - in contrast to subGrid, which sets everything outside the mask to NaN.

Syntax

ebsd = trim(ebsd)
% the smallest rectangle containing a mask
ebsd = trim(ebsd,~isnan(ebsd.bc))

Input

ebsd EBSDsquare
ind logical mask or indices, by default ebsd.isIndexed

Output

ebsd EBSDsquare

See also

EBSDsquare.subGrid EBSD.subSet