diff options
author | beadleha <beadleha@clarkson.edu> | 2015-07-14 07:06:42 +0000 |
---|---|---|
committer | beadleha <beadleha@clarkson.edu> | 2015-07-14 07:06:42 +0000 |
commit | d938708c3e697a3c6b1c4b8a4f0680c8c66bc68c (patch) | |
tree | 05a743a426ed395009c54179af787e9f6af630a8 /client.py | |
parent | e619561707ee8e21af6f77cc262e8c65d5c50763 (diff) |
Added a noise generator
Diffstat (limited to 'client.py')
-rw-r--r-- | client.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -10,6 +10,7 @@ import struct import socket import optparse import array +import random from packet import Packet, CMD, stoi @@ -71,6 +72,10 @@ def square_wave(theta): else: return -1 +@generator('Random (noise) generator') +def noise(theta): + return math.random() * 2 - 1 + @generator('File generator', '(<file>[, <bits=8>[, <signed=True>[, <0=linear interp (default), 1=nearest>[, <swapbytes=False>]]]])') class file_samp(object): LINEAR = 0 |