mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 16:48:06 +08:00
25 lines
780 B
Python
Executable File
25 lines
780 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
import logging
|
|
logging.basicConfig(level=logging.DEBUG,
|
|
format='%(asctime)s %(levelname)-12s %(message)s')
|
|
|
|
import argparse
|
|
p = argparse.ArgumentParser()
|
|
p.add_argument('--skip', type=int, default=128,
|
|
help='skip initial N samples, due to spurious spikes')
|
|
p.add_argument('--plot', dest='plt', action='store_true', default=False,
|
|
help='plot results using pylab module')
|
|
p.add_argument('-i', '--input', type=argparse.FileType('rb'),
|
|
default=sys.stdin)
|
|
p.add_argument('-o', '--output', type=argparse.FileType('wb'),
|
|
default=sys.stdout)
|
|
args = p.parse_args()
|
|
|
|
from amodem.recv import main
|
|
if args.plt:
|
|
from matplotlib import pyplot
|
|
args.plt = pyplot
|
|
|
|
main(args)
|