intvert.get_coeff_classes_1D

get_coeff_classes_1D(N, include_conjugates=True)

Returns a dictionary of classes of DFT coefficient frequencies for a 1D integer signal.

Constructs a dictionary mapping divisors of N to sets of equivalent DFT coefficient frequencies for a 1D integer signal of length N. The divisor d is mapped to a set of DFT frequencies containing all integers between 0 and N - 1 whose greatest common divisor with N is d. If include_conjugates is False, frequencies greater than or equal to N / 2 are excluded.

Parameters:
  • N (int) – Length of the signal.

  • include_conjugates (bool, optional) – Whether to include coefficients made redundant by the signal being real, by default True

Returns:

Dictionary mapping divisors of N to sets of equivalent frequencies.

Return type:

Dict[int, Set[int]]

See also

select_coeffs_1D

selecting a partial set of DFT coefficients sufficient for inversion

get_coeff_classes_2D

analogous 2D function

Notes

If \({\bf x}\) is an integer signal of length N, two DFT coefficients \(\tilde{x}_k\) and \(\tilde{x}_l\) are equivalent if \(\gcd(k, N)=\gcd(l, N)\) [PC]. Assuming \({\bf x}\) is real implies \(\tilde{x}_k = \tilde{x}_{N - k}^*\), so these DFT coefficients are trivially equivalent.

Examples

>>> intvert.get_coeff_classes_1D(6)
{6: {0}, 1: {1, 5}, 2: {2, 4}, 3: {3}}
>>> intvert.get_coeff_classes_1D(6, include_conjugates=False)
{6: {0}, 1: {1}, 2: {2}, 3: {3}}