Changeset 4198
- Timestamp:
- 06/18/07 16:29:44 (6 years ago)
- Files:
-
- 1 modified
-
experimental/AWG/trunk/AWG/sources.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
experimental/AWG/trunk/AWG/sources.py
r4197 r4198 41 41 42 42 def gen_sine(self): 43 '''freq is frequency in cycles per packet. signal_len is the length of the packet. type is the data type to return (e.g., "float", "short", "int")'''44 43 45 44 count = 0 46 45 sine = [] 47 46 while count < self.parent.signal_len: 48 sine.append(math.sin(self.parent.freq *2*math.pi*count/self.parent.signal_len))47 sine.append(math.sin(self.parent.frequency*2*math.pi*count/self.parent.signal_len)) 49 48 count = count + 1 50 49 … … 53 52 54 53 def gen_cosine(self): 55 '''freq is frequency in cycles per packet. signal_len is the length of the packet. type is the data type to return (e.g., "float", "short", "int")'''56 54 57 55 count = 0 58 56 cosine = [] 59 57 while count < self.parent.signal_len: 60 cosine.append(math.cos(self.parent.freq *2*math.pi*count/self.parent.signal_len))58 cosine.append(math.cos(self.parent.frequency*2*math.pi*count/self.parent.signal_len)) 61 59 count = count + 1 62 60