mirror of
https://github.com/romanz/amodem.git
synced 2026-02-09 02:48:01 +08:00
Remove unused code
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import numpy as np
|
||||
import reedsolo as rs
|
||||
|
||||
import hashlib
|
||||
import struct
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -62,6 +59,4 @@ if __name__ == '__main__':
|
||||
pylab.plot(t / Tsym, x, '.k')
|
||||
|
||||
plot(Fc)
|
||||
plot(F0)
|
||||
plot(F1)
|
||||
pylab.show()
|
||||
|
||||
5
recv.py
5
recv.py
@@ -1,8 +1,6 @@
|
||||
import numpy as np
|
||||
import pylab
|
||||
|
||||
import sys
|
||||
import struct
|
||||
import logging
|
||||
import itertools
|
||||
logging.basicConfig(level=0, format='%(message)s')
|
||||
@@ -10,7 +8,6 @@ log = logging.getLogger(__name__)
|
||||
|
||||
import sigproc
|
||||
import ecc
|
||||
import show
|
||||
from common import *
|
||||
|
||||
COHERENCE_THRESHOLD = 0.9
|
||||
@@ -153,11 +150,9 @@ def main(t, x):
|
||||
|
||||
begin, end = result
|
||||
x_ = x[begin:end]
|
||||
t_ = t[begin:end]
|
||||
Hc = exp_iwt(-Fc, len(x_))
|
||||
Zc = np.dot(Hc, x_) / (0.5*len(x_))
|
||||
amp = abs(Zc)
|
||||
phase = np.angle(Zc, deg=True)
|
||||
log.info('Carrier detected at ~{:.1f} ms @ {:.1f} kHz: coherence={:.3f}%, amplitude={:.3f}'.format(
|
||||
begin * Tsym * 1e3 / Nsym, Fc / 1e3, abs(coherence(x_, Fc)) * 100, amp
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user