Coder Social home page Coder Social logo

rwnobrega / komm Goto Github PK

View Code? Open in Web Editor NEW
77.0 7.0 13.0 7.96 MB

An open-source library for Python 3 providing tools for analysis and simulation of analog and digital communication systems.

Home Page: https://komm.dev/

License: GNU General Public License v3.0

Python 94.55% TeX 0.68% CSS 0.22% HTML 4.16% JavaScript 0.11% Jinja 0.29%
communications error-control block-coding convolutional-coding modulation pulse-formatting sequences source-coding information-theory

komm's People

Contributors

dependabot[bot] avatar mbe9a avatar rwnobrega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

komm's Issues

TypeError in komm

Revisited komm projects for my class next semester and found errors in modulation and demodulation examples using PSK and QAM.
After updating to latest version of komm, I'm left with the following problem.

I can supply example codes if needed.

Thanks,
Prof. David Hutchings

runfile('C:/Users/dch2y/OneDrive - University of Glasgow/DigiComms4/parity_psk.py', wdir='C:/Users/dch2y/OneDrive - University of Glasgow/DigiComms4')
Traceback (most recent call last):

File C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\users\dch2y\onedrive - university of glasgow\digicomms4\parity_psk.py:12
import komm

File C:\ProgramData\Anaconda3\lib\site-packages\komm_init_.py:3
from ._algebra import *

File C:\ProgramData\Anaconda3\lib\site-packages\komm_algebra_init_.py:2
from .BinaryPolynomialFraction import BinaryPolynomialFraction

File C:\ProgramData\Anaconda3\lib\site-packages\komm_algebra\BinaryPolynomialFraction.py:5
class BinaryPolynomialFraction:

File C:\ProgramData\Anaconda3\lib\site-packages\komm_algebra\BinaryPolynomialFraction.py:10 in BinaryPolynomialFraction
def init(self, numerator: int | BinaryPolynomial, denominator: int | BinaryPolynomial = 0b1):

TypeError: unsupported operand type(s) for |: 'type' and 'type'

Implement convolutional code puncturing

I found komm.TerminatedConvolutionalCode.decode() only 1/2 decoding, cannot achieve 3/4 decoding. Excuse me, komm.TerminatedConvolutionalCode.decode can achieve similar to the function of comm.ViterbiDecoder(ā€¦. 'PuncturePattern':[1;0;1;1;0;1]) in Matlab Communications Toolbox?

possible bug/feature in Convolutional Coding

I'm impressed with the communications utilities implementation so far.

I have found that the message obtained with komm.ConvolutionalStreamEncoder followed by komm.ConvolutionalStreamDecoder does not match the original, as per the current Matlab Communications Toolbox implementation. The data bits have been shifted by a number of bits corresponding to the traceback_length. The documentation notes "... The output stream has a delay equal to kĻ„, where k is the number of input bits of the convolutional code..."

A workaround in porting Matlab Communications Toolbox examples to komm is to append a traceback_length array of zeros to the input message, and discard the first traceback_array length (zeros) from the decoded message. This effective latency is not too dissimilar to convolutional code use in practice.

Example code excerpt which uses tx_bin as a 8*Npixels array of binary:

code = komm.ConvolutionalCode(feedforward_polynomials=[[0o117, 0o155]])
len = code.overall_constraint_length
conv_encoder = komm.ConvolutionalStreamEncoder(code)
conv_decoder = komm.ConvolutionalStreamDecoder(code, traceback_length=5*len)

tx_enc = numpy.uint8(conv_encoder(numpy.append(tx_bin,numpy.zeros(conv_decoder._traceback_length))))
rx_enc = tx_enc
rx_bin = numpy.uint8(conv_decoder(rx_enc))[-8*Npixels:]

RRC frequency_response missing

Love the code, great job! Did you mean to leave the frequency response function missing for RRC pulses? I guess you could just take the sqrt() of the RC frequency response, but it would be nice to be able to call 'pulse.frequency_response' for RRC pulses.

Cannot install from requirements.txt

Hey there! To share my komm project I used pip freeze > requirements.txt to document the required packages for my software. But I cannot do pip install -r requirements.txt in a separate virtual environment, it fails with the following error:

Collecting komm==0.7.0
Using cached komm-0.7.0.tar.gz (48 kB)
ERROR: Command errored out with exit status 1:
command: /home/..../venv/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h00a48ef/komm/setup.py'"'"'; _file_='"'"'/tmp/pip-install-h00a48ef/komm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(_file_);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, _file_, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_mqzfwp5
cwd: /tmp/pip-install-h00a48ef/komm/
Complete output (9 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-h00a48ef/komm/setup.py", line 2, in
from komm import _version_
File "/tmp/pip-install-h00a48ef/komm/komm/_init_.py", line 3, in
from ._algebra import *
File "/tmp/pip-install-h00a48ef/komm/komm/_algebra.py", line 3, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It seems that komm depends on numpy upon installation and as a result one first has to install numpy and then komm afterwards with two separate pip commands. Therefore it is be impossible to use a single pip install -r requirements.txt to install all dependencies. This is not the case for other libraries that depend on numpy. Is it necessary to depend on numpy during installation or could this be fixed?
Thanks!

issues with BCHCode and CyclicCode

Hi,

again many thanks for providing the komm library which I've been using within student coding projects in my university class.
I've run into some problems with the BCHCode, which we sorted out a few months ago by upgrading python to >3.10 (thanks again). However in the class we're getting an error from berlekamp.py which indicates an unknown variable 't'.

I can provide further details once I get on my main computer.

Reviewing the documentation I've looked at the keywords of BCHCode() and they seem to be different in the documentation (mu, delta) to previous (mu, tau).
Similar issue with CyclicCode(), documentation refers to keyword generator_polynomial, which isn't recognised.

We have two possible workarounds. (1) Revert to an earlier version of komm, or (2) limit use HammingCode() for the block code (but we can't try out multiple bit error correction).

Any advice or suggestions. Sorry for the immediacy, but we only ran into it whilst in class.

David Hutchings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.