intvert.get_coeff_classes_2D
- get_coeff_classes_2D(M, N, include_conjugates=True)
Returns a dictionary of classes of DFT coefficient frequencies for a 2D integer matrix.
Constructs a dictionary describing the equivalence classes of DFT coefficient frequencies for a 2D integer signal. The dictionary is structured as follows. It maps pairs \((D_1, D_2)\) of divisors of M and N to sets of coefficient classes. Each coefficient class is a FrozenSet of frequency pairs \((k, l)\). A coefficient class containing \((k, l)\) is in the set mapped to by \((D_1, D_2)\) whenever \(\gcd(k, M) = D_1\) and \(\gcd(l, N) = D_2\). If include_conjugates is False, frequencies made redundant by the signal being real are excluded. Otherwise, all frequences are included.
- Parameters:
- Returns:
Dictionary mapping pairs of divisors of M and N to sets of coefficient classes.
- Return type:
See also
select_coeffs_2Dselecting a partial set of DFT coefficients sufficient for inversion
get_coeff_classes_1Danalogous 1D function
Notes
If \({\bf X}\) is an integer matrix of size M, N, two DFT coefficients \(\tilde{X}_{kl}\) and \(\tilde{X}_{k'l'}\) are equivalent if there exists lambda relatively prime with M and N such that \(k = \lambda k' \pmod{M}\) and \(l = \lambda l' \pmod{N}\) [LV]. Assuming \({\bf X}\) is real implies \(\tilde{X}_{kl} = \tilde{X}_{M - k, N - l}^*\), so these DFT coefficients are trivially equivalent.
Examples
>>> intvert.get_coeff_classes_2D(4, 4) {(4, 4): {frozenset({(0, 0)})}, (4, 1): {frozenset({(0, 1), (0, 3)})}, (4, 2): {frozenset({(0, 2)})}, (1, 4): {frozenset({(1, 0), (3, 0)})}, (1, 1): {frozenset({(3, 1), (1, 3)}), frozenset({(1, 1), (3, 3)})}, (1, 2): {frozenset({(3, 2), (1, 2)})}, (2, 4): {frozenset({(2, 0)})}, (2, 1): {frozenset({(2, 3), (2, 1)})}, (2, 2): {frozenset({(2, 2)})}}
>>> intvert.get_coeff_classes_2D(4, 4, False) {(4, 4): {frozenset({(0, 0)})}, (4, 1): {frozenset({(0, 1)})}, (4, 2): {frozenset({(0, 2)})}, (1, 4): {frozenset({(1, 0)})}, (1, 1): {frozenset({(1, 1)}), frozenset({(1, 3)})}, (1, 2): {frozenset({(1, 2)})}, (2, 4): {frozenset({(2, 0)})}, (2, 1): {frozenset({(2, 1)})}, (2, 2): {frozenset({(2, 2)})}}