Re: [Discuss-gnuradio] Determine index of max value in FFT

2019-09-30 Thread Paul Boven
Hi Tom, On 9/30/19 3:27 PM, tom sutherland via Discuss-gnuradio wrote: How do you determine the index of the maximum value of the output of a FFT? e.g. I have a FFT  and then a "ComplexToMag^2" block and I want to know the max value and its corresponding index (i.e. for a 4096 point FFT the

Re: [Discuss-gnuradio] Determine index of max value in FFT

2019-09-30 Thread Derek Kozel
Hi Tom, My usual approach is to write an Embedded Python Block and use the numpy functions to find the max. You can add in any other operations that you want to do once you know the max value and index such as converting it to a frequency. Regards, Derek On 30/09/2019 14:27, tom sutherland

Re: [Discuss-gnuradio] Keeping an index into a file or data being read

2019-09-30 Thread Derek Kozel
Hi Tom, Each block has counters for how many samples have passed through it. https://www.gnuradio.org/doc/doxygen/classgr_1_1block.html#a2279d1eb421203bc5b0f100a6d5dc263 uint64_t gr::block::nitems_read(unsigned int which_input) On 30/09/2019 14:32, tom sutherland via Discuss-gnuradio wrote:

Re: [Discuss-gnuradio] GNU-Radio Companion Python flowgraph - return signal that it is finished?

2019-09-30 Thread Kevin Reid
On Mon, Sep 30, 2019 at 8:02 AM Andrew Payne wrote: > I always do a tb.stop() followed by a tb.wait(), because I assume that > .stop() is not blocking but .wait() is blocking Yes, this is correct. If you call stop() then wait() you stop the flow graph and wait for the threads to actually shut

Re: [Discuss-gnuradio] GNU-Radio Companion Python flowgraph - return signal that it is finished?

2019-09-30 Thread Andrew Payne
Thanks Kevin. I ended up calling the python method os.stat.st_size on the IQ file that the flowgraph will transmit, converted that file size to a time duration in seconds considering the sample size and rate, start the flowgraph, then have a sleep function that checks for a flag every 100

[Discuss-gnuradio] Keeping an index into a file or data being read

2019-09-30 Thread tom sutherland via Discuss-gnuradio
How do I keep up with how many values in a file or streamed value (from RTL device) that have been read into my flow graph? Normally in C/C++, Matlab etc... I would just have a counter of some variety. ___ Discuss-gnuradio mailing list

[Discuss-gnuradio] Determine index of max value in FFT

2019-09-30 Thread tom sutherland via Discuss-gnuradio
How do you determine the index of the maximum value of the output of a FFT? e.g. I have a FFT  and then a "ComplexToMag^2" block and I want to know the max value and its corresponding index (i.e. for a 4096 point FFT the index occured at 63).Thanks...Tom

Re: [Discuss-gnuradio] [RFC] PMT succession: experts' opinions on serialization libs

2019-09-30 Thread Sylvain Munaut
Hi, > I'm very certain that flatbuffers does handle this correctly, yes. > Haven't tried it, though. But "serialization library that doesn't deal > with cross-platform" sounds bad, doesn't it? You would think so yes, but it's not like it's un-heard of, especially if the primary goal was

Re: [Discuss-gnuradio] [RFC] PMT succession: experts' opinions on serialization libs

2019-09-30 Thread CEL
Hi Sylvain, I'm very certain that flatbuffers does handle this correctly, yes. Haven't tried it, though. But "serialization library that doesn't deal with cross-platform" sounds bad, doesn't it? Best regards, Marcus On Mon, 2019-09-30 at 08:37 +0200, Sylvain Munaut wrote: > Hi, > > > > Tbh,

Re: [Discuss-gnuradio] [RFC] PMT succession: experts' opinions on serialization libs

2019-09-30 Thread Sylvain Munaut
Hi, >> Tbh, I'd just assume that in all these formats, being tight-packing by >> default, std::complex can just be represented by the equivalent >> of struct {float re; float im;} complex;. I haven't delved into the code, but do you know if it handles properly architecture differences between

[Discuss-gnuradio] UHD / -lboost_system / pkg-config / Debian patch

2019-09-30 Thread Harald Welte
Hi all, Ettus points at this mailing list as the official forum for raising UHD related questions. This mail is sent to seek input on a recent regression we are seeing when the official Debian UHD package removed "-lboost_system" from uhd.pc 'Libs' in the following patch: