foo
This commit is contained in:
parent
9debe084fc
commit
000ced2b54
4 changed files with 40 additions and 40 deletions
|
|
@ -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('<f', e))"
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue