prism_operator

colibri.optics.functional.prism_operator(x, shift_sign=1)[source]

Prism operator, shifts linearly the input tensor x in the spectral dimension.

Parameters:
  • x (torch.Tensor) – Input tensor with shape (B, L, M, N)

  • shift_sign (int) – Integer, it can be 1 or -1, it indicates the direction of the shift if 1 the shift is to the right, if -1 the shift is to the left

Returns:

Output tensor with shape (1, L, M, N+L-1) if shift_sign is 1, or (1, L, M, N-L+1) if shift_sign is -1

Return type:

torch.Tensor