tensormap#

anri.phantom.tensormap(ph, lattice_parameters, spacegroup, phase_name, step)[source]#

Turn a phantom from polycrystal() into a single-phase ImageD11 TensorMap, with its truth maps.

Parameters:
Returns:

TensorMap – ImageD11.sinograms.tensor_map.TensorMap of shape (1, n, n) with “UBI”, “phase_ids” (0 inside, -1 outside), “labels” (grain), “cell”, “twin” (int8) and “misorientation”: each voxel’s disorientation in degrees from its grain’s mean orientation (taken over the grain’s non-twin voxels); and “sig_rot” (radians) if the phantom has an intrinsic spread