still do not understand how undersampling can be applied to a NON-band-limited signal.
I'm afraid some misunderstanding is going on. Admittedly, I have used the term "under sampling", but only to explain why it is possible -in principle- to reconstruct signals above the Nyquist frequency. But that doesn't mean DiAna works in the same way as the under-sampled AD conversion in an IF stage, for example.Hm, I have re-read that discussion and still do not understand how undersampling can be applied to a NON-band-limited signal. The principle of undersampling is quite obvious https://www.eetimes.com/how-to-use-undersampling/ but any material about undersampling always stresses the applicability to a signal with frequency range fitting into the multiple of fs/2 - the signal spectrum must be band-limited to <n*fs/2, (n+1)*fs/2> before the AD conversion.
The THD spectrum of DiAna is an FHT of the residual*. So it starts at the fundamental, in this example 19kHz. Therefore anything below this frequency stays out of view. Remember, DiAna is a harmonic distortion analyzer and not some ordinary spectrum (or spurious) analyzer.[..] But what if the input signal really contains the 2kHz spurious? [..]
Let's assume an ADC with no low-pass filter, doing just regular sampling of the continuous (analog) signal (e.g. SAR ADC). The sample rate is 48kHz.
The sampled analog signal is 20kHz fundamental at -6dBFs + H2 (40kHz) at -12dBFs, all zero-phase based.
The sampled analog signal is 20kHz fundamental at -6dBFs + spurious 8kHz at -12dBFs with inverted phase at start.
These two very different analog signals, when sampled by the ADC without any filter, will yield exactly same stream of samples:
Now how can the processing stage 2 distinguish between the two signals when in both cases it receives identical data to process? IMO it will claim H2 at -12dB for both cases, even though for case B) the 20kHz signal has zero harmonic distortions.