tools.shot_phase_basis

tools.shot_phase_basis#

bartorch.tools.shot_phase_basis()#

Legendre products in y and x of total degree at most order, per partition.

The polynomials run over [-1, 1] across the field of view, so a shot’s phase is fitted to each partition (each band of a multiband unit) on its own.

Parameters:
  • shape (tuple of int) – (z, y, x) image grid.

  • order (int) – Largest total degree.

Returns:

(z * terms, z, y, x) float32 functions, terms the (order + 1) (order + 2) / 2 products.

Return type:

torch.Tensor

Raises:

ValueError – If order is negative.