How to use the amodem.common.izip function in amodem

To help you get started, we’ve selected a few amodem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github romanz / amodem / tests / test_common.py View on Github external
def test_izip():
    x = range(10)
    y = range(-10, 0)
    assert list(common.izip([x, y])) == list(zip(x, y))
github romanz / amodem / amodem / recv.py View on Github external
def _bitstream(self, symbols, error_handler):
        streams = []
        symbol_list = []
        generators = common.split(symbols, n=len(self.omegas))
        for freq, S in zip(self.frequencies, generators):
            equalized = []
            S = common.icapture(S, result=equalized)
            symbol_list.append(equalized)

            freq_handler = functools.partial(error_handler, freq=freq)
            bits = self.modem.decode(S, freq_handler)  # list of bit tuples
            streams.append(bits)  # bit stream per frequency

        return common.izip(streams), symbol_list
github romanz / amodem / amodem / loop.py View on Github external
def __iter__(self):
        return common.izip(*self.gens)