Fun with filterbanks

I’ve recently tried out the synthesis_filterbank method provided in
filterbank.py and received unexpected results. I’m trying to use the
filterbank to create one signal from multiple baseband signals. When I
use
two signals to create one output, I can see both signals using the FFT
sink.
I can extract both of the channels and replay them (FM stations).
However,
when I use three or four input signals, the output is three or four
copies(respectively) of one of the input signals. What’s going on here?

class app_flow_graph(gr.flow_graph):
def init(self, options, args):
gr.flow_graph.init(self)
self.options = options
self.args = args

    num_files = args[0]
    samp_rate = args[1]
    logfile   = args[2]
    outfile   = args[3]

    ## Sanity
    print "Num files: %d" % int(num_files)
    print "Outfile:   %s" % outfile

    ## Create low pass filter
    taps = gr.firdes.low_pass(1.0, int(samp_rate), 20e3, 10e3,

gr.firdes.WIN_HANN)
print “Len taps: %d” % int(len(taps))

    self.OUT = gr.file_sink(gr.sizeof_gr_complex, outfile)
    self.SYN = synthesize(self, num_files, taps)

    ## Set input file streams
    self.STREAM1 = gr.file_source(gr.sizeof_gr_complex, "nws_25kHz", 
  1.  self.STREAM2 = gr.file_source(gr.sizeof_gr_complex, 
    

“nws_-50kHz”, 0)
self.STREAM3 = gr.file_source(gr.sizeof_gr_complex, “nws_75kHz”,
0)

    ## Connect input to synthesis filterbank
    self.connect(self.STREAM1, (self.SYN, 0))
    self.connect(self.STREAM2, (self.SYN, 1))
    self.connect(self.STREAM3, (self.SYN, 2))

    ## Connect output of filterbank to file
    self.connect(self.SYN, self.OUT)

class synthesize(blks.synthesis_filterbank):
def init(self, fg, num_bins, taps):
blks.synthesis_filterbank.init(self, fg, int(num_bins),
taps)

def main():
usage = “usage: %prog num_input_files logfile outfile”

parser = OptionParser(option_class=eng_option, usage=usage)

(options, args) = parser.parse_args()

if(len(args) < 4):
    parser.print_help()
    sys.exit(1)

fg = app_flow_graph(options, args)

try:
    fg.run()
except KeyboardInterrupt:
    pass

if name == “main”:
main()