Module Expr Str ImportFrom alias alias alias alias alias alias alias alias alias ImportFrom alias alias alias alias alias alias ImportFrom alias alias alias Assign NameStore ListLoad Str Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index CompareLtE Call NameLoad Call NameLoad NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore CompareLtE Call NameLoad Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpBitXor Num SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore BinOpDiv Call NameLoad BinOpMult NameLoad NameLoad Call NameLoad NameLoad Assign NameStore BinOpPow Num BinOpDiv NameLoad Num Assign NameStore BinOpDiv NameLoad BinOpMult BinOpMult Num NameLoad NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpAdd BinOpMult Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad BinOpMult BinOpMult Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Num orelse Assign NameStore BinOpMult Call NameLoad BinOpMult Num NameLoad Call NameLoad Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
============================================
Channel Models (:mod:`commpy.channels`)
============================================

.. autosummary::
   :toctree: generated/

   bec                 -- Binary Erasure Channel.
   bsc                 -- Binary Symmetric Channel.
   awgn                -- Additive White Gaussian Noise Channel.

 numpy complex sum pi arange array size shape real sqrt numpy matrix sqrt sum zeros concatenate sinc numpy.random randn seed random N/A __all__ N/A bec bsc awgn bec N/A N/A input_bits p_e N/A N/A N/A 
    Binary Erasure Channel.

    Parameters
    ----------
    input_bits : 1D ndarray containing {0, 1}
        Input arrary of bits to the channel.

    p_e : float in [0, 1]
        Erasure probability of the channel.

    Returns
    -------
    output_bits : 1D ndarray containing {0, 1}
        Output bits from the channel.
     N/A output_bits N/A N/A input_bits copy N/A N/A output_bits N/A N/A N/A random N/A len output_bits p_e -1 N/A output_bits N/A bsc N/A N/A input_bits p_t N/A N/A N/A 
    Binary Symmetric Channel.

    Parameters
    ----------
    input_bits : 1D ndarray containing {0, 1}
        Input arrary of bits to the channel.

    p_t : float in [0, 1]
        Transition/Error probability of the channel.

    Returns
    -------
    output_bits : 1D ndarray containing {0, 1}
        Output bits from the channel.
     N/A output_bits N/A N/A input_bits copy N/A flip_locs N/A N/A random N/A len output_bits p_t N/A N/A output_bits N/A flip_locs N/A 1 N/A output_bits N/A flip_locs N/A output_bits N/A awgn N/A N/A input_signal snr_dB rate N/A 1.0 N/A N/A 
    Addditive White Gaussian Noise (AWGN) Channel.

    Parameters
    ----------
    input_signal : 1D ndarray of floats
        Input signal to the channel.

    snr_dB : float
        Output SNR required in dB.

    rate : float
        Rate of the a FEC code used if any, otherwise 1.

    Returns
    -------
    output_signal : 1D ndarray of floats
        Output signal from the channel with the specified SNR.
     N/A avg_energy N/A N/A sum N/A input_signal input_signal N/A len input_signal N/A snr_linear N/A 10 N/A snr_dB 10.0 N/A noise_variance N/A avg_energy N/A N/A 2 rate snr_linear N/A N/A N/A input_signal dtype complex N/A N/A noise N/A N/A N/A sqrt noise_variance N/A randn N/A len input_signal N/A N/A N/A sqrt noise_variance N/A randn N/A len input_signal 1j N/A N/A noise N/A N/A sqrt N/A 2 noise_variance N/A randn N/A len input_signal N/A output_signal N/A input_signal noise N/A output_signal N/A