intvert.sample_2D
- sample_2D(signal, known_coeffs={})
Sample DFT coefficients of a 2D integer signal.
Samples a subset of the DFT coefficients of a 2D integer signal in frequency space. DFT coefficients besides the sampled ones are set to 0, and the inverse DFT is returned. If known_coeffs is given, the DFT frequencies in known_coeffs are sampled. Otherwise, a minimial set of DFT coefficients is sampled to ensure uniqueness of recovery. To make the returned signal real, conjugate pairs of DFT coefficients are both sampled, as described in Notes.
- Parameters:
signal (arraylike) – Signal to be sampled.
known_coeffs (Dict, optional) – Dictionary of coefficients to sample, structured as in
get_coeff_classes_2D, by default None
- Returns:
out – Real space signal sampled along the last two axes.
- Return type:
mpfr ndarray
See also
select_coeffs_2Dselecting a partial set of known DFT coefficients
invert_2Dinverting the sampled matrix to recover the original integer matrix
sample_1Danalogous 1D function
Notes
Let \((N_1, N_2)\) be the size of the last two axes of signal. If the frequency \((k, l)\) is to be sampled, the frequency \((N_1 - k, N_2 - l)\) is also sampled. This ensures that the sampled signal in real space is real-valued. If we write \(S\) as the set of known DFT frequencies, which satisfies \((k, l) \in S \implies (N_1 - k, N_2 - l) \in S\), the returned signal \(\overline{\bf X}\) is given entrywise by
\[\overline{X}_{mn} = \sum_{(k, l) \in S} \tilde{X}_{kl} e^{-2\pi{\rm i}(mk/N_1 + nl/N_2)}.\]