Re: [Discuss-gnuradio] Python block with vector input and vector output

2015-10-30 Thread Marcus Müller
Hi Chad, so in that case, the trick would probably be writing good unit tests! For example, you could take the `for` loop out of your work, and put it into a method of its own: import numpy from gnuradio import gr from yall1 import * class yall1_reconstruction_cc(gr.sync_block): """ Yall

Re: [Discuss-gnuradio] Python block with vector input and vector output

2015-10-29 Thread Marcus Müller
Hi Chad, thanks for re-posting your code; it's much clearer to read now. I'm not quite sure what I'm looking at now: Is this your own implementation of the yall1 minimization function, or something that can be tested? If I remember correctly, the matlab call has a matrix input, and a "target" vect

Re: [Discuss-gnuradio] Python block with vector input and vector output

2015-10-29 Thread Chad R
Sorry. Something went wrong when I copied pasted it but my actual code is: import numpyfrom gnuradio import grfrom yall1 import * class yall1_reconstruction_cc(gr.sync_block): """Yall1_reconstruction_block""" def __init__(self,n,m): self.N = n self.M = m phi

Re: [Discuss-gnuradio] Python block with vector input and vector output

2015-10-29 Thread Marcus Müller
Hi Chad, there's something wrong with the indention of the lines between "def __init__" and "g.sync_block", and the same goes for your work function; so that's my first stab at explaining misbehaviour. Best regards, Marcus On 29.10.2015 13:01, Chad R wrote: > Good day every one > > I have imple

[Discuss-gnuradio] Python block with vector input and vector output

2015-10-29 Thread Chad R
Good day every one I have implemented a Python block but I am not getting the results I expected. I get the results I expect at any frequency=samp_rate/2^n where n is any integer. My block makes use of a yall1 reconstruction algorithm to reconstruct a signal from M=100 to N=1024 vector. The code f