fdaxis#

torchspin.fdaxis(dT_or_t, N=None)[source]#

Compute FFT frequency axis with DC at center.

Parameters:
  • dT_or_t – Either the sampling period dT (scalar) or a time-domain vector t from which dT and N are extracted.

  • N (int | None) – Number of points. Required if dT_or_t is a scalar sampling period; ignored if a time vector is given.

Returns:

freq – Frequency axis of length N, centered at DC. Units are 1/[dT] (e.g. if dT is in microseconds, output is in MHz).

Return type:

ndarray