GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Additional check is added · kirlf/ModulationPy@a8e4bf4

This repository was archived by the owner on Mar 25, 2024. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • ModulationPy
    • ModulationPy.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎ModulationPy/ModulationPy.py‎

Copy file name to clipboardExpand all lines: ModulationPy/ModulationPy.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ def modulate(self, x):
255255
modulated : 1-D array of complex values
256256
Modulated symbols (signal envelope).
257257
'''
258-
258+
259+
if (self.bin_input == True) and ((len(x) % int(np.log2(self.M))) != 0):
260+
raise ValueError("The length of the binary input should be a multiple of log2(M)")
261+
259262
if self.bin_input == True:
260263
modulated = self.__bin_modulate(x)
261264
else:
@@ -268,7 +271,7 @@ def demodulate(self, x, noise_var=1.):
268271
Parameters
269272
----------
270273
x : 1-D ndarray of complex symbols
271-
Decimal or binary stream to be modulated.
274+
Decimal or binary stream to be demodulated.
272275
noise_var: float
273276
Additive noise variance.
274277
Returns

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.