nifty7.library.nft module#

class FinuFFT(target, pos, eps=2e-10)[source]#

Bases: LinearOperator

Compute non-uniform 1D, 2D and 3D FFTs with finufft.

Parameters:
  • target (Domain, tuple of domains or DomainTuple.) – Target domain, must be an RGSpace with one to three dimensions.

  • pos (np.ndarray) – Coordinates of the data-points, shape (n, ndim).

  • eps (float) – Requested precision, defaults to 2e-10.

apply(x, mode)[source]#

Applies the Operator to a given x, in a specified mode.

Parameters:
  • x (Field) – The input Field, defined on the Operator’s domain or target, depending on mode.

  • mode (int) –

    • TIMES: normal application

    • ADJOINT_TIMES: adjoint application

    • INVERSE_TIMES: inverse application

    • ADJOINT_INVERSE_TIMES or INVERSE_ADJOINT_TIMES: adjoint inverse application

Returns:

The processed Field defined on the Operator’s target or domain, depending on mode.

Return type:

Field

class Gridder(target, uv, eps=2e-10)[source]#

Bases: LinearOperator

Compute non-uniform 2D FFT with ducc.

Parameters:
  • target (Domain, tuple of domains or DomainTuple.) – Target domain, must be a single two-dimensional RGSpace.

  • uv (np.ndarray) – Coordinates of the data-points, shape (n, 2).

  • eps (float) – Requested precision, defaults to 2e-10.

apply(x, mode)[source]#

Applies the Operator to a given x, in a specified mode.

Parameters:
  • x (Field) – The input Field, defined on the Operator’s domain or target, depending on mode.

  • mode (int) –

    • TIMES: normal application

    • ADJOINT_TIMES: adjoint application

    • INVERSE_TIMES: inverse application

    • ADJOINT_INVERSE_TIMES or INVERSE_ADJOINT_TIMES: adjoint inverse application

Returns:

The processed Field defined on the Operator’s target or domain, depending on mode.

Return type:

Field