ifftshift

Contents

ifftshift#

class saiunit.fft.ifftshift(x, axes=None, **kwargs)#

Inverse of saiunit.fft.fftshift().

Unit-aware implementation of numpy.fft.ifftshift(). The unit of the input is preserved in the output.

Parameters:
  • x (Quantity | Array | ndarray | bool | number | bool | int | float | complex) – N-dimensional input whose components should be inverse-shifted.

  • axes (None | int | Sequence[int]) – Axes over which to shift. If None (default), all axes are shifted.

Returns:

An inverse-shifted copy of x with the same unit.

Return type:

Quantity | Array | ndarray | bool | number | bool | int | float | complex

See also

saiunit.fft.fftshift

Shift zero-frequency component to the centre.

saiunit.fft.fftfreq

Return sample frequencies for the DFT.

Examples

>>> import saiunit as u
>>> import saiunit.fft as sufft
>>> freq = sufft.fftfreq(4, 1.0 * u.second)
>>> shifted = sufft.fftshift(freq)
>>> recovered = sufft.ifftshift(shifted)