On 27/11/2022 17:23, Marcus D. Leech wrote:
On 27/11/2022 05:26, Daniel Estévez wrote:That would only allow the first or first-N of the streams to be captured, rather than some arbitrary single stream, no?Hi,Another option for extracting one or a range of items from a vector is to use Vector to Stream followed by Keep 1 in N or Keep M in N. See near the bottom of this flowgraph for an example:https://github.com/daniestevez/reu-2022/blob/main/polyphase/polyphase_filter.grc Best, Daniel.
No, because these blocks have an initial offset parameter (and if they didn't, we could use "Skip Head"). As an example, say that we have 1024-point FFTs given as vectors and we only want the FFT bin number 42.
We do vector to stream, then Keep 1 in N with N = 1024 and initial offset = 42. This would give us a stream where only the FFT bin number 42 appears.
Now say that w want FFT bin numbers 42, 43, 44, 45. We do vector to stream, then Keep M in N with N = 1024, M = 4, initial offset = 42. This would give us a stream that contains:
bin_42(t0), bin_43(t0), bin_44(t0), bin_45(t0), bin_42(t1), bin_43(t1), bin_44(t1), bin_45(t1)...
If desired, we can turn this into vectors of 4 elements using stream to vector or use a deinterleave block to separate each of the bins in its own stream.
Best, Daniel.
OpenPGP_signature
Description: OpenPGP digital signature