Puzzled by Nyquist frequency
You actually need just over 2 kHz sampling rate to sample 1 kHz sine waves properly. It's
$$ f_N &lt; f_S / 2 $$
not
$$ f_N \le f_S / 2 $$
P.S. If you took your signal into complex space, where a sinusoid is of the form
$$v(t) = Ae^{j(2 \pi f t - \theta)} = A(\cos(2 \pi f t - \theta) + j \sin(2 \pi f t - \theta))$$
where t is time, A is amplitude, f is frequency, and θ is phase offset,
$$ f_N = f_S / 2 $$
is the point where the frequency &quot;folds over&quot;, i.e. you cannot distinguish f from -f. Further increases in frequency will appear, after sampling, to have the sampling frequency subtracted from them, in the case of a pure sinusoid.
Non-Sinusoids
For the case of a square wave at 1 kHz with a duty cycle less than or equal to 10% which is sampled at 10 kHz, you are misunderstanding the input.
First you would need to decompose your waveform into a Fourier series to figure out what the amplitudes of the component harmonics are. You will probably be surprised that the harmonics for this signal are quite large past 5 kHz! (The rule of thumb of third harmonic being 1/3 as strong as the fundamental, and 5th being 1/5 of fundamental, only applies to 50% duty cycle square waves.)
The rule of thumb for a communications signal is that your complex bandwidth is the same as the inverse of the time of your smallest pulse, so in this case you're looking at a 10 kHz bandwidth minimum (-5 kHz to 5 kHz) for a 10% duty cycle with the fundamental at 1 kHz (i.e. 10 kbps).
So what will ruin you is that these strong higher-order harmonics will fold over and interfere (constructively or destructively) with your in-band harmonics, so it's perfectly expected that you might not get a good sampling because so much information is outside the Nyquist band.