magnet.graph_utils.align_to_x_axis#
- magnet.graph_utils.align_to_x_axis(coords_sample: Tensor) Tensor #
Rotate the data so to align it with the x-axis.
Rotates the mesh coordinates so that the largest direction is aligned with the x-axis.
- Parameters:
coords_sample (torch.Tensor) – Coordinates of the mesh.
- Returns:
Ther aligned coordinates.
- Return type:
torch.Tensor
Notes
Rotation is always computed on GPU if available, so the returned tensor is on ‘DEVICE’.