mirror of
https://github.com/romanz/amodem.git
synced 2026-03-06 23:05:57 +08:00
fix pep8
This commit is contained in:
@@ -56,8 +56,7 @@ class Detector(object):
|
||||
|
||||
x = np.concatenate(tuple(bufs)[-self.CARRIER_THRESHOLD:-1])
|
||||
Hc = dsp.exp_iwt(-self.omega, len(x))
|
||||
Zc = np.dot(Hc, x) / (0.5*len(x))
|
||||
amplitude = abs(Zc)
|
||||
amplitude = np.abs(np.dot(Hc, x) / (0.5 * len(x)))
|
||||
start_time = begin * self.Tsym / self.Nsym
|
||||
log.info('Carrier detected at ~%.1f ms @ %.1f kHz:'
|
||||
' coherence=%.3f%%, amplitude=%.3f',
|
||||
|
||||
@@ -211,9 +211,8 @@ def main(config, src, dst, dump_audio=None, pylab=None):
|
||||
reader = stream.Reader(src, data_type=common.loads)
|
||||
signal = itertools.chain.from_iterable(reader)
|
||||
|
||||
to_skip = int(config.skip_start * config.Fs)
|
||||
log.debug('Skipping %.3f seconds', config.skip_start)
|
||||
common.take(signal, to_skip)
|
||||
common.take(signal, int(config.skip_start * config.Fs))
|
||||
|
||||
pylab = pylab or common.Dummy()
|
||||
detector = detect.Detector(config=config, pylab=pylab)
|
||||
|
||||
Reference in New Issue
Block a user