diff options
author | Johnathan Corgan <jcorgan@corganenterprises.com> | 2012-08-28 12:52:09 -0700 |
---|---|---|
committer | Johnathan Corgan <jcorgan@corganenterprises.com> | 2012-08-28 12:52:09 -0700 |
commit | 5892c29ee0509ff8aa226f14da524f7ec30f9654 (patch) | |
tree | 759624a4c9f9b5d6c2e2da13906be99aebf25152 /gnuradio-core/src/python/gnuradio/blks2impl | |
parent | 7adff515181de5cfbd7392d934cac9083a8a6a58 (diff) | |
parent | fc4d37062c46886d3bc1fb0b6c3626d779be4ecd (diff) |
Merge remote branch 'reynwar/comments_next' into next
Conflicts:
gr-digital/include/digital_constellation.h
gr-digital/python/bpsk.py
gr-digital/python/qpsk.py
Diffstat (limited to 'gnuradio-core/src/python/gnuradio/blks2impl')
12 files changed, 86 insertions, 104 deletions
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py b/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py index 68d024565a..6420348be3 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py @@ -30,14 +30,11 @@ class am_demod_cf(gr.hier_block2): filtering to the audio output. It produces a float stream in the range [-1.0, +1.0]. - @param channel_rate: incoming sample rate of the AM baseband - @type sample_rate: integer - @param audio_decim: input to output decimation rate - @type audio_decim: integer - @param audio_pass: audio low pass filter passband frequency - @type audio_pass: float - @param audio_stop: audio low pass filter stop frequency - @type audio_stop: float + Args: + channel_rate: incoming sample rate of the AM baseband (integer) + audio_decim: input to output decimation rate (integer) + audio_pass: audio low pass filter passband frequency (float) + audio_stop: audio low pass filter stop frequency (float) """ def __init__(self, channel_rate, audio_decim, audio_pass, audio_stop): gr.hier_block2.__init__(self, "am_demod_cf", @@ -64,10 +61,9 @@ class demod_10k0a3e_cf(am_demod_cf): This block demodulates an AM channel conformant to 10K0A3E emission standards, such as broadcast band AM transmissions. - @param channel_rate: incoming sample rate of the AM baseband - @type sample_rate: integer - @param audio_decim: input to output decimation rate - @type audio_decim: integer + Args: + channel_rate: incoming sample rate of the AM baseband (integer) + audio_decim: input to output decimation rate (integer) """ def __init__(self, channel_rate, audio_decim): am_demod_cf.__init__(self, channel_rate, audio_decim, diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py b/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py index 08f1d450ba..29e50bc2a3 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py @@ -45,8 +45,9 @@ class synthesis_filterbank(gr.hier_block2): Takes M complex streams in, produces single complex stream out that runs at M times the input sample rate - @param mpoints: number of freq bins/interpolation factor/subbands - @param taps: filter taps for subband filter + Args: + mpoints: number of freq bins/interpolation factor/subbands + taps: filter taps for subband filter The channel spacing is equal to the input sample rate. The total bandwidth and output sample rate are equal the input @@ -128,8 +129,9 @@ class analysis_filterbank(gr.hier_block2): Takes 1 complex stream in, produces M complex streams out that runs at 1/M times the input sample rate - @param mpoints: number of freq bins/interpolation factor/subbands - @param taps: filter taps for subband filter + Args: + mpoints: number of freq bins/interpolation factor/subbands + taps: filter taps for subband filter Same channel to frequency mapping as described above. """ diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py b/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py index 6bc0d7ed0d..cc93d5b45c 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py @@ -33,20 +33,14 @@ class fm_demod_cf(gr.hier_block2): deemphasis. Low pass filtering is done on the resultant signal. It produces an output float strem in the range of [-1.0, +1.0]. - @param channel_rate: incoming sample rate of the FM baseband - @type sample_rate: integer - @param deviation: maximum FM deviation (default = 5000) - @type deviation: float - @param audio_decim: input to output decimation rate - @type audio_decim: integer - @param audio_pass: audio low pass filter passband frequency - @type audio_pass: float - @param audio_stop: audio low pass filter stop frequency - @type audio_stop: float - @param gain: gain applied to audio output (default = 1.0) - @type gain: float - @param tau: deemphasis time constant (default = 75e-6), specify 'None' - to prevent deemphasis + Args: + channel_rate: incoming sample rate of the FM baseband (integer) + deviation: maximum FM deviation (default = 5000) (float) + audio_decim: input to output decimation rate (integer) + audio_pass: audio low pass filter passband frequency (float) + audio_stop: audio low pass filter stop frequency (float) + gain: gain applied to audio output (default = 1.0) (float) + tau: deemphasis time constant (default = 75e-6), specify 'None' to prevent deemphasis """ def __init__(self, channel_rate, audio_decim, deviation, audio_pass, audio_stop, gain=1.0, tau=75e-6): @@ -79,10 +73,9 @@ class demod_20k0f3e_cf(fm_demod_cf): channel conforming to 20K0F3E emission standards, outputting floats in the range [-1.0, +1.0]. - @param sample_rate: incoming sample rate of the FM baseband - @type sample_rate: integer - @param audio_decim: input to output decimation rate - @type audio_decim: integer + Args: + sample_rate: incoming sample rate of the FM baseband (integer) + audio_decim: input to output decimation rate (integer) """ def __init__(self, channel_rate, audio_decim): fm_demod_cf.__init__(self, channel_rate, audio_decim, @@ -98,10 +91,9 @@ class demod_200kf3e_cf(fm_demod_cf): channel conforming to 200KF3E emission standards, outputting floats in the range [-1.0, +1.0]. - @param sample_rate: incoming sample rate of the FM baseband - @type sample_rate: integer - @param audio_decim: input to output decimation rate - @type audio_decim: integer + Args: + sample_rate: incoming sample rate of the FM baseband (integer) + audio_decim: input to output decimation rate (integer) """ def __init__(self, channel_rate, audio_decim): fm_demod_cf.__init__(self, channel_rate, audio_decim, diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py b/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py index fc3f2d60d2..29e052f6f5 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py @@ -43,10 +43,10 @@ class fm_deemph(gr.hier_block2): def __init__(self, fs, tau=75e-6): """ - @param fs: sampling frequency in Hz - @type fs: float - @param tau: Time constant in seconds (75us in US, 50us in EUR) - @type tau: float + + Args: + fs: sampling frequency in Hz (float) + tau: Time constant in seconds (75us in US, 50us in EUR) (float) """ gr.hier_block2.__init__(self, "fm_deemph", gr.io_signature(1, 1, gr.sizeof_float), # Input signature @@ -126,10 +126,10 @@ class fm_preemph(gr.hier_block2): """ def __init__(self, fs, tau=75e-6): """ - @param fs: sampling frequency in Hz - @type fs: float - @param tau: Time constant in seconds (75us in US, 50us in EUR) - @type tau: float + + Args: + fs: sampling frequency in Hz (float) + tau: Time constant in seconds (75us in US, 50us in EUR) (float) """ gr.hier_block2.__init__(self, "fm_deemph", diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py index 8bcb47ae19..40eb255e1e 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py @@ -32,14 +32,11 @@ class nbfm_rx(gr.hier_block2): Takes a single complex baseband input stream and produces a single float output stream of audio sample in the range [-1, +1]. - @param audio_rate: sample rate of audio stream, >= 16k - @type audio_rate: integer - @param quad_rate: sample rate of output stream - @type quad_rate: integer - @param tau: preemphasis time constant (default 75e-6) - @type tau: float - @param max_dev: maximum deviation in Hz (default 5e3) - @type max_dev: float + Args: + audio_rate: sample rate of audio stream, >= 16k (integer) + quad_rate: sample rate of output stream (integer) + tau: preemphasis time constant (default 75e-6) (float) + max_dev: maximum deviation in Hz (default 5e3) (float) quad_rate must be an integer multiple of audio_rate. diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py index 839cf6784a..a2c4310467 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py @@ -33,14 +33,11 @@ class nbfm_tx(gr.hier_block2): Takes a single float input stream of audio samples in the range [-1,+1] and produces a single FM modulated complex baseband output. - @param audio_rate: sample rate of audio stream, >= 16k - @type audio_rate: integer - @param quad_rate: sample rate of output stream - @type quad_rate: integer - @param tau: preemphasis time constant (default 75e-6) - @type tau: float - @param max_dev: maximum deviation in Hz (default 5e3) - @type max_dev: float + Args: + audio_rate: sample rate of audio stream, >= 16k (integer) + quad_rate: sample rate of output stream (integer) + tau: preemphasis time constant (default 75e-6) (float) + max_dev: maximum deviation in Hz (default 5e3) (float) quad_rate must be an integer multiple of audio_rate. """ diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py b/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py index eea12af958..02c8421d9e 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py @@ -28,13 +28,12 @@ def design_filter(interpolation, decimation, fractional_bw): Given the interpolation rate, decimation rate and a fractional bandwidth, design a set of taps. - @param interpolation: interpolation factor - @type interpolation: integer > 0 - @param decimation: decimation factor - @type decimation: integer > 0 - @param fractional_bw: fractional bandwidth in (0, 0.5) 0.4 works well. - @type fractional_bw: float - @returns: sequence of numbers + Args: + interpolation: interpolation factor (integer > 0) + decimation: decimation factor (integer > 0) + fractional_bw: fractional bandwidth in (0, 0.5) 0.4 works well. (float) + Returns: + : sequence of numbers """ if fractional_bw >= 0.5 or fractional_bw <= 0: @@ -69,14 +68,11 @@ class _rational_resampler_base(gr.hier_block2): If neither is specified, a reasonable default, 0.4, is used as the fractional_bw. - @param interpolation: interpolation factor - @type interpolation: integer > 0 - @param decimation: decimation factor - @type decimation: integer > 0 - @param taps: optional filter coefficients - @type taps: sequence - @param fractional_bw: fractional bandwidth in (0, 0.5), measured at final freq (use 0.4) - @type fractional_bw: float + Args: + interpolation: interpolation factor (integer > 0) + decimation: decimation factor (integer > 0) + taps: optional filter coefficients (sequence) + fractional_bw: fractional bandwidth in (0, 0.5), measured at final freq (use 0.4) (float) """ if not isinstance(interpolation, int) or interpolation < 1: diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py b/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py index 8f75729c91..d6808b722f 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py @@ -29,10 +29,12 @@ class stream_to_vector_decimator(gr.hier_block2): def __init__(self, item_size, sample_rate, vec_rate, vec_len): """ Create the block chain. - @param item_size the number of bytes per sample - @param sample_rate the rate of incoming samples - @param vec_rate the rate of outgoing vectors (same units as sample_rate) - @param vec_len the length of the outgoing vectors in items + + Args: + item_size: the number of bytes per sample + sample_rate: the rate of incoming samples + vec_rate: the rate of outgoing vectors (same units as sample_rate) + vec_len: the length of the outgoing vectors in items """ self._vec_rate = vec_rate self._vec_len = vec_len @@ -50,7 +52,9 @@ class stream_to_vector_decimator(gr.hier_block2): def set_sample_rate(self, sample_rate): """ Set the new sampling rate and update the decimator. - @param sample_rate the new rate + + Args: + sample_rate: the new rate """ self._sample_rate = sample_rate self._update_decimator() @@ -58,7 +62,9 @@ class stream_to_vector_decimator(gr.hier_block2): def set_vec_rate(self, vec_rate): """ Set the new vector rate and update the decimator. - @param vec_rate the new rate + + Args: + vec_rate: the new rate """ self._vec_rate = vec_rate self._update_decimator() @@ -66,7 +72,9 @@ class stream_to_vector_decimator(gr.hier_block2): def set_decimation(self, decim): """ Set the decimation parameter directly. - @param decim the new decimation + + Args: + decim: the new decimation """ self._decim = max(1, int(round(decim))) self.one_in_n.set_n(self._decim) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py index d1cbcf9127..fe4fdd1a6a 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py @@ -31,10 +31,9 @@ class wfm_rcv(gr.hier_block2): The input is the downconverted complex baseband signal (gr_complex). The output is the demodulated audio (float). - @param quad_rate: input sample rate of complex baseband input. - @type quad_rate: float - @param audio_decimation: how much to decimate quad_rate to get to audio. - @type audio_decimation: integer + Args: + quad_rate: input sample rate of complex baseband input. (float) + audio_decimation: how much to decimate quad_rate to get to audio. (integer) """ gr.hier_block2.__init__(self, "wfm_rcv", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py index e229bcc2e6..24c710a494 100755 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py @@ -32,10 +32,9 @@ class wfm_rcv_fmdet(gr.hier_block2): (gr_complex). The output is two streams of the demodulated audio (float) 0=Left, 1=Right. - @param demod_rate: input sample rate of complex baseband input. - @type demod_rate: float - @param audio_decimation: how much to decimate demod_rate to get to audio. - @type audio_decimation: integer + Args: + demod_rate: input sample rate of complex baseband input. (float) + audio_decimation: how much to decimate demod_rate to get to audio. (integer) """ gr.hier_block2.__init__(self, "wfm_rcv_fmdet", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py index d4ce6d2231..0b8706bf27 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py @@ -31,10 +31,9 @@ class wfm_rcv_pll(gr.hier_block2): The input is the downconverted complex baseband signal (gr_complex). The output is two streams of the demodulated audio (float) 0=Left, 1=Right. - @param demod_rate: input sample rate of complex baseband input. - @type demod_rate: float - @param audio_decimation: how much to decimate demod_rate to get to audio. - @type audio_decimation: integer + Args: + demod_rate: input sample rate of complex baseband input. (float) + audio_decimation: how much to decimate demod_rate to get to audio. (integer) """ gr.hier_block2.__init__(self, "wfm_rcv_pll", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py index 3fcf98f891..e7547d6524 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py @@ -31,14 +31,11 @@ class wfm_tx(gr.hier_block2): Takes a single float input stream of audio samples in the range [-1,+1] and produces a single FM modulated complex baseband output. - @param audio_rate: sample rate of audio stream, >= 16k - @type audio_rate: integer - @param quad_rate: sample rate of output stream - @type quad_rate: integer - @param tau: preemphasis time constant (default 75e-6) - @type tau: float - @param max_dev: maximum deviation in Hz (default 75e3) - @type max_dev: float + Args: + audio_rate: sample rate of audio stream, >= 16k (integer) + quad_rate: sample rate of output stream (integer) + tau: preemphasis time constant (default 75e-6) (float) + max_dev: maximum deviation in Hz (default 75e3) (float) quad_rate must be an integer multiple of audio_rate. """ |