# DigCommPy Python3 package for digital communications simulations.
It includes channel coding and different channel models. Simulations can be run to calculate bit/block error rates for different configurations.
# Installation The package can be installed using pip with the command pip install digcommpy.
Alternatively, you can clone the Gitlab repository and install the local copy using the following commands:
- git clone https://gitlab.com/klb2/digcommpy.git
cd digcommpy pip install .
# Usage There are multiple example files in the examples folder.
## Basic Encoding/Decoding Example A simple encoding example using a polar code: `python from digcommpy import messages, encoders n, k = 16, 4 encoder = encoders.PolarEncoder(n, k, "BAWGN", 0.) mess = messages.generate_data(k, number=1000, binary=True) codewords = encoder.encode_messages(mess) `
A full transmission chain can be simulated as follows: `python from digcommpy import messages, encoders, decoders, channels, modulators, metrics # Parameters n, k = 16, 4 snr = 5. # dB # Blocks encoder = encoders.PolarEncoder(n, k, "BAWGN", snr) modulator = modulator.BpskModulator() channel = channels.BawgnChannel(snr, rate=k/n) decoder = decoders.PolarDecoder(n, k, "BAWGN", snr) # Simulation mess = messages.generate_data(k, number=1000, binary=True) codewords = encoder.encode_messages(mess) channel_input = modulator.modulate_symbols(codewords) channel_output = channel.transmit_data(channel_input) est_mess = decoder.decode_messages(channel_output) ber = metrics.ber(mess, est_mess) print("The BER is {}".format(ber)) `
This can be simplified by using the simulations module from the package (in progress).
# Used Software Some parts of this library are based on different open source implementations. The polar code encoding and decoding code is based on the Matlab implementation from Harish Vangala et al. (http://polarcodes.com/). The implementation of some functions, e.g., the QAM-modulation are based on the Octave communications package (https://octave.sourceforge.io/).
Metadata
Release files for digcommpy 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| digcommpy-0.9.tar.gz | 20.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| digcommpy-0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.9 kB
Release files / digcommpy-0.9.tar.gz
| Download URL | digcommpy-0.9.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7f7ab22e87b2b605647fbe256e9c7cfc64689d6874ee7b1a4a18a6e2345d297
|
|
BLAKE2b-256 checksum How to use checksums |
b879d7e78b5dc91863242a5e801c78ef90b047dd8cc7bbfe68eadaf2b1106e00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / digcommpy-0.9-py3-none-any.whl
| Download URL | digcommpy-0.9-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe12fd58043ecfd864c0822e9cc545f46dc835352651f404926b6e6af588b21c
|
|
BLAKE2b-256 checksum How to use checksums |
e44c1f3a302ac63b7322137138055c2c23ca759c7cf1699ae7a95e76d306ba6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|