-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
executable file
·27 lines (23 loc) · 1.26 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Options:
def __init__(self):
# Source and Sink options
self.srctype = 'random' # options are '0' (null), '1' (all 1's), '01' (for unitstep), 'random'
self.numbits = 200 # number of data bits (for the file=None option)
self.fname = None # if set, data is read from the file; should be a string giving filename
self.header = True # True <==> use a 16-bit header specifying the length
# Phy-layer Transmitter and Receiver options
self.samplerate = 48000
self.chunksize = 256
self.prefill = 60
self.spb = 256 # samples per bit
self.channel = 1000 # channel type: bypass (synthetic) or carrier freq
self.silence = 80
# Modulation (signaling) and Demodulation options
self.one = 1.0 # voltage for bit "1"
# BypassChannel options
self.bypass = False
self.noise = 0.25 # Gaussian noise variance for bypass channel
self.lag = 0 # channel lag (delay) for bypass channel
self.h = "1" # unit sample response for bypass channel; given as string with elements seperated by a space each
# Got graphs?
self.graph = False # True <==> plot some interesting graphs