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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Conj FS IQBal
# Author: matt@ettus.com
# Description: Frequency Selective Conjugate Method IQ Balance Corrector
# Generated: Thu Aug 1 13:00:27 2013
##################################################
from gnuradio import blocks
from gnuradio import filter
from gnuradio import gr
from gnuradio.filter import firdes
class conj_fs_iqcorr(gr.hier_block2):
def __init__(self, delay=0, taps=[]):
gr.hier_block2.__init__(
self, "Conj FS IQBal",
gr.io_signature(1, 1, gr.sizeof_gr_complex*1),
gr.io_signature(1, 1, gr.sizeof_gr_complex*1),
)
##################################################
# Parameters
##################################################
self.delay = delay
self.taps = taps
##################################################
# Blocks
##################################################
self.filter_fir_filter_xxx_0 = filter.fir_filter_ccc(1, (taps))
self.delay_0 = blocks.delay(gr.sizeof_gr_complex*1, delay)
self.blocks_conjugate_cc_0 = blocks.conjugate_cc()
self.blocks_add_xx_0 = blocks.add_vcc(1)
##################################################
# Connections
##################################################
self.connect((self.blocks_add_xx_0, 0), (self, 0))
self.connect((self, 0), (self.blocks_conjugate_cc_0, 0))
self.connect((self.filter_fir_filter_xxx_0, 0), (self.blocks_add_xx_0, 1))
self.connect((self.blocks_conjugate_cc_0, 0), (self.filter_fir_filter_xxx_0, 0))
self.connect((self, 0), (self.delay_0, 0))
self.connect((self.delay_0, 0), (self.blocks_add_xx_0, 0))
# QT sink close method reimplementation
def get_delay(self):
return self.delay
def set_delay(self, delay):
self.delay = delay
self.delay_0.set_dly(self.delay)
def get_taps(self):
return self.taps
def set_taps(self, taps):
self.taps = taps
self.filter_fir_filter_xxx_0.set_taps((self.taps))
|