Last active
September 29, 2018 01:54
-
-
Save NinjaComics/26259d0d2a1b0daae183 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import commpy | |
test_dat = np.random.random_integers(0,1,100) | |
#The following three lines work | |
mod_ch1 = commpy.QAMModem(16) | |
mod_test1 = mod_ch1.modulate(test_dat) | |
print mod_test1 | |
#PSK Modulation throws a TypeError | |
mod_ch = commpy.PSKModem(2) | |
mod_test = mod_ch.modulate(test_dat) | |
#Error | |
#Traceback (most recent call last): | |
#File "./commpy_psktest.py", line 16, in <module> | |
#mod_test = mod_ch.modulate(test_dat) | |
#File "/usr/local/lib/python2.7/dist-packages/scikit_commpy-0.3.0-py2.7.egg/commpy/modulation.py", line 46, in modulate | |
#baseband_symbols = self.constellation[index_list] | |
#TypeError: list indices must be integers, not list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do u solve the problem?