diff options
Diffstat (limited to 'gr-digital/python/digital/qam.py')
-rw-r--r-- | gr-digital/python/digital/qam.py | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/gr-digital/python/digital/qam.py b/gr-digital/python/digital/qam.py index be4b7efa74..2da58246cc 100644 --- a/gr-digital/python/digital/qam.py +++ b/gr-digital/python/digital/qam.py @@ -257,107 +257,4 @@ def large_ampls_to_corners_mapping(side, points, width): sector_values.append(index) return sector_values - -# ///////////////////////////////////////////////////////////////////////////// -# QAM modulator -# ///////////////////////////////////////////////////////////////////////////// - -class qam_mod(generic_mod): - """ - Hierarchical block for RRC-filtered QAM modulation. - - The input is a byte stream (unsigned char) and the - output is the complex modulated signal at baseband. - - Args: - constellation_points: Number of constellation points (must be a power of four) (integer). - mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE). - differential: Whether to use differential encoding (boolean). - """ - # See generic_mod for additional arguments - __doc__ += shared_mod_args - - def __init__(self, constellation_points=_def_constellation_points, - differential=_def_differential, - mod_code=_def_mod_code, - *args, **kwargs): - - """ - Hierarchical block for RRC-filtered QAM modulation. - - The input is a byte stream (unsigned char) and the - output is the complex modulated signal at baseband. - - Args: - constellation_points: Number of constellation points. - Must be a power of 4. - mod_code: Specifies an encoding to use (typically used to indicated - if we want gray coding, see digital.utils.mod_codes) - - See generic_mod block for list of additional parameters. - """ - - constellation = qam_constellation(constellation_points, differential, - mod_code) - # We take care of the gray coding in the constellation - # generation so it doesn't need to be done in the block. - super(qam_mod, self).__init__(constellation, differential=differential, - *args, **kwargs) - -# ///////////////////////////////////////////////////////////////////////////// -# QAM demodulator -# -# ///////////////////////////////////////////////////////////////////////////// - -class qam_demod(generic_demod): - """ - Hierarchical block for RRC-filtered QAM modulation. - - The input is a byte stream (unsigned char) and the - output is the complex modulated signal at baseband. - - Args: - constellation_points: Number of constellation points (must be a power of four) (integer). - mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE). - differential: Whether to use differential encoding (boolean). - """ - # See generic_demod for additional arguments - __doc__ += shared_mod_args - - def __init__(self, constellation_points=_def_constellation_points, - differential=_def_differential, - mod_code=_def_mod_code, - large_ampls_to_corner = False, - *args, **kwargs): - """ - Hierarchical block for RRC-filtered QAM modulation. - - The input is a byte stream (unsigned char) and the - output is the complex modulated signal at baseband. - - Args: - constellation_points: Number of constellation points. - Must be a power of 4. - mod_code: Specifies an encoding to use (typically used to indicated - if we want gray coding, see digital.utils.mod_codes) - large_ampls_to_corners: If this is set to True then when the - constellation is making decisions, points that are far outside - the constellation are mapped to the closest corner rather than - the closet constellation point. This can help with phase - locking. - - See generic_demod block for list of additional parameters. - """ - constellation = qam_constellation(constellation_points, differential, - mod_code) - # We take care of the gray coding in the constellation - # generation so it doesn't need to be done in the block. - super(qam_demod, self).__init__(constellation, differential=differential, - *args, **kwargs) - -# -# Add these to the mod/demod registry -# -modulation_utils.add_type_1_mod('qam', qam_mod) -modulation_utils.add_type_1_demod('qam', qam_demod) modulation_utils.add_type_1_constellation('qam', qam_constellation) |