Forum: GNU Radio Configure UHD source and File sink to save integers

Posted by mepard (Guest)
on 2013-03-04 21:37
(Received via mailing list)
I'd like to feed a File Sink from a UHD Source with 4 channels -- 2 
motherboards, each with A:A A:B subdev specs. To cut down on the file 
size, I'd like to record integers instead of floating point.

Which data type should I tell the UHD source to produce? Which type 
should I tell the File Sink to record? What conversions do I need in 
between? I'd like to stay in GRC, if possible.

TIA

-Marc
Posted by Josh Blum (Guest)
on 2013-03-04 21:44
(Received via mailing list)
On 03/04/2013 02:36 PM, mepard wrote:
> I'd like to feed a File Sink from a UHD Source with 4 channels -- 2
> motherboards, each with A:A A:B subdev specs. To cut down on the file
> size, I'd like to record integers instead of floating point.
>
> Which data type should I tell the UHD source to produce? Which type
> should I tell the File Sink to record? What conversions do I need in
> between? I'd like to stay in GRC, if possible.
>

Sure thing. You can set the file sink to integer (int32), and either set
the usrp source block to vita word32 or sc16 type (both are 32 bits per
sample).

Thats still 4 streams, not sure if you are interleaving them or using 4
file sinks.

-josh
Posted by mepard (Guest)
on 2013-03-04 22:08
(Received via mailing list)
On Mar 4, 2013, at 2:43 PM, Josh Blum <josh@ettus.com> wrote:
>
> Sure thing. You can set the file sink to integer (int32), and either set
> the usrp source block to vita word32 or sc16 type (both are 32 bits per
> sample).
>
> Thats still 4 streams, not sure if you are interleaving them or using 4
> file sinks.
>

One thing I forgot is that I'd like to convert complex<sint16> to a 
single sint16 with just the "real" part, like I can convert 
complex<float> to single float. It doesn't look like there is the 
equivalent of Complex To Real for integers.

Is there an alternative to converting to floating point and back?

-Marc
Posted by Josh Blum (Guest)
on 2013-03-05 01:12
(Received via mailing list)
On 03/04/2013 03:07 PM, mepard wrote:
>>> between? I'd like to stay in GRC, if possible.
> One thing I forgot is that I'd like to convert complex<sint16> to a single 
sint16 with just the "real" part, like I can convert complex<float> to single 
float. It doesn't look like there is the equivalent of Complex To Real for 
integers.
>
> Is there an alternative to converting to floating point and back?

you could vector to streams, and null sink the second stream.

* 1 input stream of vec length 2 and item size short
* 2 output streams of item size short

-josh
Posted by mepard (Guest)
on 2013-03-06 00:05
(Received via mailing list)
On Mar 4, 2013, at 6:11 PM, Josh Blum <josh@ettus.com> wrote:

> * 2 output streams of item size short
This works well. Thanks!

-Marc
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.