Skip to content

Instantly share code, notes, and snippets.

@NinjaComics
Last active September 29, 2018 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NinjaComics/26259d0d2a1b0daae183 to your computer and use it in GitHub Desktop.
Save NinjaComics/26259d0d2a1b0daae183 to your computer and use it in GitHub Desktop.
#!/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
@FakerRan
Copy link

Do u solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment