@@ -0,0 +1,14 | |||||
|
1 | # compute the two scaled butterfly equations | |||
|
2 | ||||
|
3 | class ButterflyProcessor(object): | |||
|
4 | """docstring for ClassName""" | |||
|
5 | def __init__(self, arg): | |||
|
6 | super(ButterflyProcessor, self).__init__() | |||
|
7 | self.arg = arg | |||
|
8 | ||||
|
9 | def butterfly(self): | |||
|
10 | Dre = ( Are + Bre ) / 2 | |||
|
11 | Dim = ( Aim + Bim ) / 2 | |||
|
12 | Ere = ( Are - Bre ) / 2 | |||
|
13 | Eim = ( Aim - Bim ) / 2 | |||
|
14 |
@@ -0,0 +1,13 | |||||
|
1 | # compute the complex twiddle factor multiplication R + jI = (X + jY) x (C + jS) | |||
|
2 | ||||
|
3 | class EfficientComplexMultiplier(object): | |||
|
4 | """docstring for ClassName""" | |||
|
5 | def __init__(self, arg): | |||
|
6 | super(EfficientComplexMultiplier, self).__init__() | |||
|
7 | self.arg = arg | |||
|
8 | ||||
|
9 | def multiply(self, X, Y, C, C_plus_S, C_minus_S): | |||
|
10 | Z = C * ( X - Y) | |||
|
11 | R = C_minus_S * Y + Z | |||
|
12 | I = C_plus_S * X - Z | |||
|
13 | return [R, I] |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
General Comments 0
You need to be logged in to leave comments.
Login now