-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
144 changed files
with
32,803 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
__pycache__ | ||
*.pyc | ||
*.py~ | ||
.eggs/ | ||
.ipynb_checkpoints/ | ||
.vscode/ | ||
*.egg-info/ | ||
build/ | ||
docs/_autosummary/ | ||
docs/_build/ | ||
dist/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# scikit-sdr | ||
Python 3 library that provides algorithms for building digital communication systems and for experimenting with DSP and SDR | ||
|
||
**scikit-sdr** is a Python 3 library that provides algorithms for building digital communication systems and for experimenting with DSP and SDR. | ||
The structure of the library is as follows: | ||
|
||
- ``sksdr``: source code for algorithms | ||
- ``tests``: units tests using the pytest framework | ||
- ``demo``: demonstrations using Jupyter notebooks | ||
- ``gnuradio``: GNU Radio wrappers contained in an OOT module (``gnuradio/gr-grsksdr``) and some demonstration flowgraphs (``gnuradio/demo``) | ||
- ``docs``: Sphinx documentation | ||
|
||
Some of this work as been inspired and/or based of other libraries such as [komm](https://github.com/rwnobrega/komm) and [scikit-dsp-comm](https://github.com/mwickert/scikit-dsp-comm). Other sources include the books: | ||
- "Digital Communications: A Discrete-time Approach" by Michael Rice | ||
- "Understanding Digital Signal Processing" by Richard G. Lyons | ||
- "Digital Signal Processing: Principles, Algorithms and Applications" by John G. Proakis and Dimitris G. Manolakis | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import numpy as np | ||
|
||
import sksdr | ||
|
||
msgs = ['Hello World {:03d}'.format(i) for i in range(100)] | ||
rx_msg_idx = 0 | ||
ret = dict() | ||
frame_size_bits = 250 | ||
preamble = np.repeat(sksdr.UNIPOLAR_BARKER_SEQ[13], 2) | ||
scrambler_poly = [1, 1, 1, 0, 1] | ||
scrambler_init_state = [0, 1, 1, 0] | ||
scrambler = sksdr.Scrambler(scrambler_poly, scrambler_init_state) | ||
fid = open('test.dat', 'wb') | ||
|
||
for i, msg in enumerate(msgs): | ||
ret['payload'] = sksdr.x2binlist(msg, 8) | ||
ret['fill'] = np.random.randint(0, 1, frame_size_bits - len(preamble) - len(ret['payload'])) | ||
ret['bits'] = np.hstack((ret['payload'], ret['fill'])) | ||
ret['sbits'] = scrambler(ret['bits']) | ||
bits = np.hstack((preamble, ret['sbits'])) | ||
nbits = len(bits) | ||
if nbits % 8 > 0: | ||
bits = np.hstack((bits, [0] * (8 - nbits % 8))) | ||
chars = [int(''.join(map(str, bits[i : i + 8])), 2) for i in range(0, len(bits), 8)] | ||
fid.write(bytes(chars)) |
Oops, something went wrong.