Hi,

I created my own block because I wanted to multiply the source sinusoids by
weights before transmitting them out, as shown in the attached GRC diagram
(my_block.png).

However, in my work() function for the block created, I am seeing that
simply multiplying the inputs by anything (first test was multiply by 1 and
then by complex(1.0,0.0)) completely alters the level of the signal.
Multiplying by unity should not do anything, but instead, using a spectrum
analyzer, I see the signal jump up by 30 dBm and then fluctuate up and down
for some reason, using the code below:

    def work(self, input_items, output_items):
        in0 = input_items[0]
        in1 = input_items[1]
        out0 = output_items[0]
        out1 = output_items[1]

        out0[:] = [x * 1 for x in in1]
        out1[:] = [x * 1 for x in in1]

        #did this afterward
        #out0[:] = [x * complex(1.0,0.0) for x in in1]
        #out1[:] = [x * complex(1.0,0.0) for x in in1]

        return len(output_items[0])

 When I don't multiply the inputs by anything, using the code below, the
signal stays stable:

    def work(self, input_items, output_items):
        in0 = input_items[0]
        in1 = input_items[1]
        out0 = output_items[0]
        out1 = output_items[1]

        return len(output_items[0])

Since my intent is simply to multiply the signal by some complex weights
(eventually), I'm not sure what I am doing wrong here. Something is clearly
wrong with how/what I'm multiplying, and I don't think I am understanding.
Please keep me posted. Thank you so much for the help!

-- 
Pavan
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to