intvert.sample_1D
- sample_1D(signal, known_coeffs=None)
Sample DFT coefficients of a 1D integer signal.
Samples a subset of the DFT coefficients of a 1D 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_1D, by default None
- Returns:
out – Real space signal sampled along last axis.
- Return type:
mpfr ndarray
See also
select_coeffs_1Dselecting a partial set of known DFT coefficients
invert_1Dinverting the sampled signal to recover the original integer signal
sample_2Danalogous 2D function
Notes
Let \(N\) be the signal size of the last axis of signal. If the frequency \(k\) is to be sampled, the frequency \(N - k\) 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 \in S \implies N - k \in S\), the returned signal \(\overline{\bf x}\) is given entrywise by
\[\overline{x}_n = \sum_{k \in S} \tilde{x}_k e^{-2\pi{\rm i}nk/N}.\]