From 000ced2b546e73c8b1e8a2b870173f5c2a5b5ca0 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 9 Mar 2020 13:47:08 +0100 Subject: foo --- lab-windows/dsss_experiments-ber.ipynb | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'lab-windows') diff --git a/lab-windows/dsss_experiments-ber.ipynb b/lab-windows/dsss_experiments-ber.ipynb index c483cfc..fd2466b 100644 --- a/lab-windows/dsss_experiments-ber.ipynb +++ b/lab-windows/dsss_experiments-ber.ipynb @@ -188,17 +188,9 @@ }, { "cell_type": "code", - "execution_count": 130, + "execution_count": 134, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "start 14880 end 24800 rec 29760\n" - ] - } - ], + "outputs": [], "source": [ "test_duration = 32\n", "test_nbits = 5\n", @@ -211,11 +203,10 @@ "#test_data = np.array([0, 1, 2, 3] * 50)\n", "test_data = np.array(range(test_duration))\n", "signal = np.repeat(modulate(test_data, test_nbits, pad=False) * 2.0 - 1, test_decimation) * test_signal_amplitude\n", - "noise = colorednoise.powerlaw_psd_gaussian(1, len(signal)*3) * noise_level\n", - "noise[int(1.5*len(signal)):][:len(signal)] += signal\n", - "print('start', int(1.5*len(signal)), 'end', int(1.5*len(signal))+len(signal), 'rec', len(noise))\n", + "noise = colorednoise.powerlaw_psd_gaussian(1, len(signal)*10) * noise_level\n", + "noise[-int(1.5*len(signal)):][:len(signal)] += signal\n", "\n", - "with open(f'dsss_test_signals/dsss_test_noiseless_padded.bin', 'wb') as f:\n", + "with open(f'dsss_test_signals/dsss_test_noisy_padded.bin', 'wb') as f:\n", " for e in noise:\n", " f.write(struct.pack('