Sorry, and just as an addition, obviously I could use the "Multiply by...." blocks in GRC, but I am trying to do a much more complex loop involving this block, so multiplying is only part of the process, and I'm running into issues there already. Thanks.
On Tue, Jun 7, 2016 at 4:30 PM, Pavan Yedavalli <[email protected]> wrote: > 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 > -- Pavan
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
