Hello Pedro,

On 2024-03-01 17:51 +0000, pav.vie...@gmail.com wrote:
> in time... the NUMPY vector is of type complex 128 or complex 64.

"fc32" means complex<float> in C/C++. In NumPy, it means np.complex64.
When I load the .npy you provided, I get a np.float64 array.
I have never used the UHD Python API, so I am not sure how it
behaves when it receives np.float64 instead of np.complex64.
But to be sure, provide an array of the same type as the one you
specified in the StreamArgs.

If the structure of your float64 array is
[sample_00_real, sample_00_imag, sample_01_real, sample_01_imag,...],

then it should be safe to do:
sinal_ofdm = np.load(...).view(np.complex128)

and instead of "fc32" in the steamer args, write "fc64".

"sc16" means complex<short>. If the data you provide is of type
complex<float> but you specify "sc16" as the "CPU format",
then UHD will read the array as if it was complex<short>.
Note that it will not convert your complex<float> into a complex<short>
(by e.g. mapping -1.0f to SHRT_MIN and 1.0f to SHRT_MAX),
but will interpret the actual bytes as complex<short>.

Regards
-- 

Cédric Hannotier
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to