intvert.select_coeffs_1D

select_coeffs_1D(N, Ls=[])

Selects a set of DFT coefficient frequencies.

Constructs a dictionary mapping divisors of N to sets of equivalent DFT coefficient frequencies for an integer signal of length N. The divisor d is mapped to a set of DFT frequencies containing integers between 0 and N - 1 whose greatest common divisor with N is d. The number of frequencies in this set is determined by Ls. If Ls is an integer, the number of frequencies in set of frequencies will be at most Ls. If Ls is a list, Ls[i] is the number of frequencies in selected[d] if d generates a cyclic subgroup at the i’th level of the subgroup lattice of \(\mathbb{Z}_N\). If Ls[i] is larger than the number of generators of selected[d] which are between 0 and N / 2, selected[d] is just this maximal set of such generators.

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

  • Ls (int or list, optional) – Number of coefficients to include for each class, by default []

Returns:

selected – Dictionary of selected coefficients.

Return type:

Dict[int, Set[int]]

See also

get_coeff_classes_1D

structure of full DFT coefficient equivalence classes

sample_1D

use the selected coefficients to sample an integer signal

select_coeffs_2D

analogous 2D function

Examples

By default, get 1 element of each coefficient class

>>> intvert.select_coeffs_1D(10)
{10: {0}, 1: {1}, 2: {2}, 5: {5}}

If Ls is an integer, there are Ls generators in every class with with more than one generator between 0 and N / 2.

>>> intvert.select_coeffs_1D(10, 2)
{10: {0}, 1: {1, 3}, 2: {2, 4}, 5: {5}}

If Ls is a list of length 2, all classes on the top two levels of the lattice may have up to two generators. This is realized for d = 1 and d = 2. However, there is only one generator for the subgroup corresponding to d = 5.

>>> intvert.select_coeffs_1D(10, [2])
{10: {0}, 1: {1, 3}, 2: {2}, 5: {5}}