summaryrefslogtreecommitdiff
path: root/gr-digital/python/cpm.py
diff options
context:
space:
mode:
authorBen Reynwar <ben@reynwar.net>2012-08-13 13:46:28 -0700
committerBen Reynwar <ben@reynwar.net>2012-08-13 13:46:28 -0700
commitfe96ee8d82b2666951cf3cef8f7f5d991396273f (patch)
tree8551ea48c509098f14aa49bbd7e9a87123a95137 /gr-digital/python/cpm.py
parent41041c3d2d1468c4d37f9ed36a3b172b3d60da9c (diff)
docs: Formatted python docstrings for sphinx docs.
Diffstat (limited to 'gr-digital/python/cpm.py')
-rw-r--r--gr-digital/python/cpm.py61
1 files changed, 25 insertions, 36 deletions
diff --git a/gr-digital/python/cpm.py b/gr-digital/python/cpm.py
index f11832b626..194eb71a81 100644
--- a/gr-digital/python/cpm.py
+++ b/gr-digital/python/cpm.py
@@ -49,6 +49,31 @@ _def_log = False
# /////////////////////////////////////////////////////////////////////////////
class cpm_mod(gr.hier_block2):
+ """
+ Hierarchical block for Continuous Phase modulation.
+
+ The input is a byte stream (unsigned char) representing packed
+ bits and the output is the complex modulated signal at baseband.
+
+ See Proakis for definition of generic CPM signals:
+ s(t)=exp(j phi(t))
+ phi(t)= 2 pi h int_0^t f(t') dt'
+ f(t)=sum_k a_k g(t-kT)
+ (normalizing assumption: int_0^infty g(t) dt = 1/2)
+
+ Args:
+ samples_per_symbol: samples per baud >= 2 (integer)
+ bits_per_symbol: bits per symbol (integer)
+ h_numerator: numerator of modulation index (integer)
+ h_denominator: denominator of modulation index (numerator and denominator must be relative primes) (integer)
+ cpm_type: supported types are: 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL (integer)
+ bt: bandwidth symbol time product for GMSK (float)
+ symbols_per_pulse: shaping pulse duration in symbols (integer)
+ generic_taps: define a generic CPM pulse shape (sum = samples_per_symbol/2) (list/array of floats)
+ verbose: Print information about modulator? (boolean)
+ debug: Print modulation data to files? (boolean)
+ """
+
def __init__(self,
samples_per_symbol=_def_samples_per_symbol,
bits_per_symbol=_def_bits_per_symbol,
@@ -60,42 +85,6 @@ class cpm_mod(gr.hier_block2):
generic_taps=_def_generic_taps,
verbose=_def_verbose,
log=_def_log):
- """
- Hierarchical block for Continuous Phase
- modulation.
-
- The input is a byte stream (unsigned char)
- representing packed bits and the
- output is the complex modulated signal at baseband.
-
- See Proakis for definition of generic CPM signals:
- s(t)=exp(j phi(t))
- phi(t)= 2 pi h int_0^t f(t') dt'
- f(t)=sum_k a_k g(t-kT)
- (normalizing assumption: int_0^infty g(t) dt = 1/2)
-
- @param samples_per_symbol: samples per baud >= 2
- @type samples_per_symbol: integer
- @param bits_per_symbol: bits per symbol
- @type bits_per_symbol: integer
- @param h_numerator: numerator of modulation index
- @type h_numerator: integer
- @param h_denominator: denominator of modulation index (numerator and denominator must be relative primes)
- @type h_denominator: integer
- @param cpm_type: supported types are: 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL
- @type cpm_type: integer
- @param bt: bandwidth symbol time product for GMSK
- @type bt: float
- @param symbols_per_pulse: shaping pulse duration in symbols
- @type symbols_per_pulse: integer
- @param generic_taps: define a generic CPM pulse shape (sum = samples_per_symbol/2)
- @type generic_taps: array of floats
-
- @param verbose: Print information about modulator?
- @type verbose: bool
- @param debug: Print modulation data to files?
- @type debug: bool
- """
gr.hier_block2.__init__(self, "cpm_mod",
gr.io_signature(1, 1, gr.sizeof_char), # Input signature