From 4248a0f08ae0fe4761ba6e93f7d568ce29a22dcf Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Tue, 14 Oct 2014 19:35:23 +0300 Subject: [PATCH] calib: pep8 --- amodem/calib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/amodem/calib.py b/amodem/calib.py index 6be38fc..9ef3c0c 100644 --- a/amodem/calib.py +++ b/amodem/calib.py @@ -9,9 +9,9 @@ from . import config from . import wave CALIBRATION_SYMBOLS = int(1.0 * config.Fs) - ALLOWED_EXCEPTIONS = (IOError, KeyboardInterrupt) + def send(wave_play=wave.play): t = np.arange(0, CALIBRATION_SYMBOLS) * config.Ts signal = [np.sin(2 * np.pi * f * t) for f in config.frequencies] @@ -30,6 +30,7 @@ def send(wave_play=wave.play): FRAME_LENGTH = 100 * config.Nsym + def recorder(process): frame_size = int(wave.bytes_per_sample * FRAME_LENGTH) fd = process.stdout @@ -46,6 +47,7 @@ def recorder(process): finally: process.kill() + def recv(wave_record=wave.record, log=sys.stdout.write): t = np.arange(0, FRAME_LENGTH) * config.Ts carriers = [np.exp(2j * np.pi * f * t) for f in config.frequencies]